FOI-Bioinformatics / CanSNPer2

CanSNPer2: A toolkit for SNP-typing bacterial genomes.
GNU General Public License v3.0
6 stars 2 forks source link

root named "-root- -cellular organism" #34

Open CarolineOhrman opened 1 year ago

CarolineOhrman commented 1 year ago

I made a tree and got a root named "cellular organism"

ran CanSNPer2 --database bacillus_anthracis_new.db data/*.fasta --summary --save_tree --tmpdir temp/ --strictness 0.8 and got a warning about that cellular organism has no snp_annotation:

2023-06-30 13:13:29,429 NewickTree [WARNI] #Node has no snp_annotation root 2023-06-30 13:13:29,429 NewickTree [WARNI] #Node has no snp_annotation cellular organisms 2023-06-30 13:13:29,429 NewickTree [WARNI] #Node has no snp_annotation A.Br.011

and also a node in the tree pdf named "-root- -cellular organism":

Vollum_GCF_022221345.1_ASM2222134v1_tree.pdf

druvus commented 1 year ago

@davidsundell Do you have a suggestion how to fix it?

davve2 commented 1 year ago

Problem

FlexTaxD ReadTaxonomyCanSNPer module creates root and cellular_organism node by default.

Solution

Move the creation of these nodes from init to the "parse_taxonomy function" (in FlexTaxD), this function is overrides in CanSNPer2 and can skip this step.