matsen / pplacer

Phylogenetic placement and downstream analysis
http://matsen.fredhutch.org/pplacer/
GNU General Public License v3.0
74 stars 18 forks source link

rppr reroot failure #381

Closed lpipes closed 8 months ago

lpipes commented 8 months ago

This seems to be failing on rppr reroot. I'm not sure what the issue is because I've used this exact same command on other files for some compositions of Bacteria I can't get this command to work.

taxit create --clobber --rppr /space/s1/lenore/software/pplacer/bin/bin/rppr -P 0.refpkg -l COI --taxonomy 0_taxonomyfromtaxids2.csv --aln-fasta 0_MSA.fasta --tree-stats RAxML_info.0 --tree-file RAxML_bestTree.0.reroot --seq-info updated4.csv 
rppr: loadlocale.c:129: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
Traceback (most recent call last):
  File "/space/s1/lenore/software/taxtastic_2/taxtastic/taxit.py", line 22, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/space/s1/lenore/software/taxtastic_2/taxtastic/taxtastic/scripts/taxit.py", line 51, in main
    return action(arguments)
  File "/space/s1/lenore/software/taxtastic_2/taxtastic/taxtastic/subcommands/create.py", line 168, in action
    r.reroot(rppr=args.rppr)
  File "/home/lenore/.local/lib/python3.10/site-packages/decorator-5.1.1-py3.10.egg/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/space/s1/lenore/software/taxtastic_2/taxtastic/taxtastic/refpkg.py", line 132, in transaction
    return f(self, *args, **kwargs)
  File "/space/s1/lenore/software/taxtastic_2/taxtastic/taxtastic/refpkg.py", line 497, in reroot
    subprocess.check_call([rppr or 'rppr', 'reroot',
  File "/home/lenore/Python-3.10.3/Lib/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/space/s1/lenore/software/pplacer/bin/bin/rppr', 'reroot', '-c', '/space/s1/lenore/trout_copy/s2_copy/from_tilden/bacteria_radom_set/0/0.refpkg', '-o', '/tmp/tree82gsjmw0.tre']' died with <Signals.SIGABRT: 6>.

updated4.csv 0_taxonomyfromtaxids2.csv RAxML_bestTree.0.reroot.txt RAxML_info.0.txt 0_MSA.fasta.txt

matsen commented 8 months ago

Lenore-- I'm sorry to say that this is a problem between the compiler and your machine and doesn't have to do with our code.

To double check, you're saying that this is only triggered for some input files, running on exactly the same machine?

lpipes commented 8 months ago

Hi Erick, Thanks for your quick response! Sorry I meant that I used this command but with different input files. For some reason, rppr doesn't like these particular input files. I suspect that it has something to do with the 0_taxonomyfromtaxids2.csv file which was made with taxtastic but really I'm not sure. I am getting this error when working with taxonomy files from Bacteria but not with Eukaryota. Any recommendations would be helpful. Many thanks!

lpipes commented 8 months ago

Hi Erick, I removed all entries that had a clade taxonomic rank associated with it and the command seems to have worked (I also had to prune the tree)

taxit create --clobber --rppr /space/s1/lenore/software/pplacer/bin/bin/rppr -P 0.refpkg -l COI --taxonomy 0_taxonomyfromtaxids_edit.csv --aln-fasta 0_MSA.fasta --tree-stats RAxML_info.0 --tree-file prunedtree.nw --seq-info 0_edit.csv 
rerooting at phylum
root found at node 3519

It seems that this is because clade is an unordered rank but over half of my entries have a clade taxonomic rank. See https://github.com/fhcrc/taxtastic/issues/155

lpipes commented 8 months ago

The fix in taxtastic seems to have fixed this issue. Thanks for your help!