fhcrc / taxtastic

Create and maintain phylogenetic "reference packages" of biological sequences.
GNU General Public License v3.0
21 stars 10 forks source link

Error is pplacer using taxtastic #155

Closed lpipes closed 7 months ago

lpipes commented 1 year ago

Hi,

I am getting this error when I try to run pplacer. I think it has something to do with the tax table that taxtastic generated but I'm not sure.

pplacer -c 0.refpkg/ combo.sto 
Running pplacer v1.1.alpha19-0-g807f6f3 analysis on combo.sto...
Found reference sequences in given alignment file. Using those for reference alignment.
Pre-masking sequences... sequence length cut from 319 to 315.
Warning: pplacer results make the most sense when the given tree is multifurcating at the root. See manual for details.
Determining figs... figs disabled.
Allocating memory for internal nodes... done.
Caching likelihood information on reference tree... done.
Pulling exponents... done.
Preparing the edges for baseball... done.
Uncaught exception: Failure("Tax table broken: tax_id 1 had established parent 117570 but 117571 is claiming to be the parent.")
Fatal error: exception Failure("Tax table broken: tax_id 1 had established parent 117570 but 117571 is claiming to be the parent.")

pplacer_error.zip

nhoffman commented 1 year ago

@lpipes - I'm not accustomed to seeing any rank above root, and "clade" is a strange rank that doesn't have a fixed position in the taxonomy - see

https://github.com/fhcrc/taxtastic/blob/master/taxtastic/ncbi.py#L46

% xsv search 117570 0_taxonomyfromtaxids.csv | xsv table | less -S
tax_id  parent_id  rank   tax_name      clade   root  root_   superkingdom  kingdom  phylum  subphylum  superclass  class  infraclass  order  family  genus  genus_  species>
117570  7776       clade  Teleostomi    117570  1     131567  2759          33208    7711    89593                                                                          >
117571  117570     clade  Euteleostomi  117571  1     131567  2759          33208    7711    89593

Maybe try removing the "clade" column just to see if that resolves the error?

lpipes commented 8 months ago

This does not resolve the error because some rows have a clade as the parent_id

crosenth commented 8 months ago

Hi lpipes, What version of pplacer are you using? pplacer --version

crosenth commented 8 months ago

nvm I see above

crosenth commented 8 months ago

I rebuilt your 0_taxonomyfromtaxids.csv file using the latest version of taxtastic:

0_taxonomyfromtaxids.csv

% pip install -U taxtastic
% taxit new_database
% taxit taxtable --seq-info 0_taxonomyfromtaxids.csv --out 0_taxonomyfromtaxids.csv-new
% mv 0_taxonomyfromtaxids.csv-new 0_taxonomyfromtaxids.csv

Let me know if that fixes this Issue

lpipes commented 7 months ago

ok I used the latest version and this seems to have fixed this issue. Thank you!