daveuu / baga

Bacterial and Archaeal Genome Analyser
GNU General Public License v3.0
9 stars 2 forks source link

rooted tree needed for infer recombination #15

Open ptric opened 6 years ago

ptric commented 6 years ago

Hi When I run the ComparativeAnalysis --infer_recombination step using the command below I get an error that rooted tree I need for input does not exist:

baga_cli.py ComparativeAnalysis --infer_recombination --path_to_MSA $GENOME_NAME"__"$READS_NAME"_SNPs.phy" --path_to_tree $GENOME_NAME"__"$READS_NAME"_SNPs_rooted.phy_phyml_tree"

The issue seems to be that ClonalFrame requires a rooted tree but the previous infer recombination step outputs unrooted tree by default, with name $GENOME_NAME"__"$READS_NAME"_SNPs.phy_phyml_tree"

I tried manually rooting the phyml tree on my reference using iTOL then exporting the resulting newick file to the baga directory with the appropriate _rooted.phy_phyml_tree extension, but that resulted in an error that OROOT was not expected in the newick file. Any fix would be appreciated as the rest of the pipeline is working great

daveuu commented 6 years ago

Hi Sorry - I don't have time to maintain this for now.

What branch are you using? If you are on "master" I suggest trying "dev1" (git checkout branch dev1) or dev2

In the meantime I suggest trying to root your tree with something other than iTOL because having "OROOT" in a newick file does not sound like iTOL is abiding by the newick schema definition. The ape library in R can root trees or maybe desktop graphical applications like seaview or archaeopteryx or figtree?

As to why the BAGA output is not rooted . . . I would guess a naming issue with the outgroup (although if a list of outgroup labels didn't match anythin, I think it should have halted with an error). Spaces in taxon labels can be tricky.

ptric commented 6 years ago

I'm using master branch but will try out a dev branch too. You were right about the naming issue, the master script that I use to launch the pipeline was feeding an outgroup label to the infer_recombination step which was missing one digit, that's fixed the issue, thank you. Figtree is a good suggestion for viewing rooted trees when iTOL doesn't work, I haven't used it much recently but can try that.