GithubHelp home page GithubHelp logo

add phylogeny output about ctgap HOT 8 OPEN

ammaraziz avatar ammaraziz commented on July 20, 2024
add phylogeny output

from ctgap.

Comments (8)

ammaraziz avatar ammaraziz commented on July 20, 2024 1

@gokeson this one is for you!

from ctgap.

gokeson avatar gokeson commented on July 20, 2024 1
  • Create representative reference set to use as a whole genome backbone
    do you mean reference strains? If yes, we have 20 of these. And they are the same as the individual ctReferences.

  • Same for ompa gene only
    We already have this sorted right? I mean all the ompA sequences that we use for BLAST

  • Create bed file of recombination regions to mask
    I think we should use clonalFrameML after running kSNP. To use ClonalFrameML, we do not need to create a bed file, the program filters the recombination site by itself. I favour this approach mainly because recombination in Ct is ever-evolving. That's actually how some new strains evolve.
    The alternative is to use Gubbins which requires prior alignment to a reference genome with SKA. I don't think this is a bad approach as all the 20 strains will be aligned to our choice reference genome, most likely strain D as it is the best annotated genome.

  • Use KSNP for generating reference free snps
    Here is the note for ksnp:

#Put all of your reference sequences in a folder (all have to be fasta)
#create the list of input files for k-SNP4

MakeKSNP4infile -indir (folder) -outfile myInfile

#find the ideal length of k-mer that will be used for the alignment:

Kchooser4 -in myInfile

#run ksnp
kSNP4 -in myInfile -outdir name_of_output_directory -k 13 -core -ML -vcf
#Core will give you the shared SNPs between all samples, in addition to all SNPs.
#Vcf will output VCFs for your SNPs: what is found where, and what the original base should be and what it is instead.
#ML will run a maximum likelihood tree. This is what we want, since maximum parsimony generates a tree based on minimum distances.
#The output will be multiple files, but we care about: SNPs_all_matrix (the alignment file), and the ML.tre (the tree file).

#After kSNP4, fix the tree using ClonalFrameML to mask recombinant regions:
#Why run ClonalFrameML? Masking recombinant regions is customary practice in generating trees, since they bias the way the tree is generated. Therefore, ClonalFrameML will use your tree and sequences to identify heavily-recombinant regions and branches, note the rho/theta ratio, and re-draw your tree.

#Use the output of k-SNP4 as the input to ClonalFrameML:

ClonalFrameML tree.SNPs_all.ML.tre SNPs_all_matrix.fasta final_clinical_clonalframe
#(first argument is the tree, second argument is the alignment file, the third argument is the prefix to your files)

#The output files are listed here: https://github.com/xavierdidelot/clonalframeml/wiki but what we care about is the tree (.newick). Look at the (em.txt) file if you want to know the rho/theta values, branch lengths (based on recombination distance) etc.

#Visualization:
#FigTree on windows to visualize. It is not necessarily the best, but it’s a very simple GUI

from ctgap.

ammaraziz avatar ammaraziz commented on July 20, 2024

I think we should avoid computational heavy like ClonalFrameML, how long does it take to run?

from ctgap.

gokeson avatar gokeson commented on July 20, 2024

I think we should avoid computational heavy like ClonalFrameML, how long does it take to run?

220 minutes for 125 samples to run clonalframeML after already running ksnp for 3 hours for same samples.

This is where gubins may be advantageous. it requires a ref genome but Ithink that is okay. Everyone uses strain D for gubbins so why not

from ctgap.

gokeson avatar gokeson commented on July 20, 2024

This is where gubins may be advantageous. it requires a ref genome but Ithink that is okay. Everyone uses strain D for gubbins so why not

And gubbins is really fast.
If we stick with our one sample one tree approach, gubbins makes sense. Anyone needing to do comparative analyses for multiple samples can use ksnp+clonalframeML

from ctgap.

gokeson avatar gokeson commented on July 20, 2024
  • Use KSNP for generating reference free snps

#How to run gubbins my way:
#more info at: #running gubbins: https://github.com/nickjcroucher/gubbins/blob/master/docs/gubbins_manual.md

mamba create --name myenvname gubbins

mamba activate gubbins_env

generate_ska_alignment.py --reference seq_X.fa --input input.list --out test.aln

#Where input.list is a tab-delimited file with one row per isolate. The first column should be the isolate name, and the subsequent entries on the same row should contain the corresponding sequence data

run_gubbins.py --prefix gubbins_out test.aln --tree-builder raxml

from ctgap.

ammaraziz avatar ammaraziz commented on July 20, 2024

On your 125 sample tree with clonalframeML, can you extract the snps which are flagged as recombinant?

from ctgap.

gokeson avatar gokeson commented on July 20, 2024

On your 125 sample tree with clonalframeML, can you extract the snps which are flagged as recombinant?

Nope. I tried but can't.
Do we need it though?

from ctgap.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.