FePhyFoFum / phlawd_db_editor

edit the databases used for pyphlawd
GNU General Public License v3.0
0 stars 0 forks source link

Can't setup clades for new taxa #2

Closed josephwb closed 6 years ago

josephwb commented 6 years ago

Undoubtedly related to #1. When I try to setup a clade (example: "Accipitriformes") created using phlawd_db_editor (or an existing clade that was moved to a new taxon) it barfs:

python ../PyPHLAWD/src/setup_clade.py Accipitriformes vrt_11July18.db TERP/ log.md.gz
STARTING PYPHLAWD (((\(@v@)/)))
MAKING TREE Accipitriformes ヽ(^□^。)ノ
Traceback (most recent call last):
  File "/home/josephwb/Work/MacroBird_v2.0/PHLAWD/PyPHLAWD/src/get_ncbi_tax_tree_no_species.py", line 98, in <module>
    print tree.get_newick_repr(False)+";"
AttributeError: 'NoneType' object has no attribute 'get_newick_repr'
Traceback (most recent call last):
  File "../PyPHLAWD/src/setup_clade.py", line 40, in <module>
    trn = tree_reader.read_tree_file_iter(tname).next().label
StopIteration
josephwb commented 6 years ago

Should have mentioned this: taxa seem to be created successfully:

python phlawd_db_editor.py -i Accipitriformes -b ../PHLAWD_DBs/vrt_11July18.db
opening logfile phlawd_db_editor.log
connecting to ../PHLAWD_DBs/vrt_11July18.db
id,name,parent_id,rank
66600002,Accipitriformes,66600001,None
closing ../PHLAWD_DBs/vrt_11July18.db

(In this case 66600001 is obviously also a new taxon).

So, no obvious error here. But setup_clade is having trouble making the tree (specifically, get_ncbi_tax_tree_no_species). Is there just an index missing?

blackrim commented 6 years ago

Yeah, I think that the other fix 5208bea should deal with this be reopen if not.

josephwb commented 6 years ago

Yup, seems to be working. Thanks!