Closed josephwb closed 6 years ago
(I use the taxonomy tree to check that the edits are correct).
Can you send along the commands you are doing for the editing the database so I can replicate that part?
Yup! Hope this helps.
# manipulate taxonomy based on vrt db (example)
# grab Neognathae ID (parent in which we will put new taxa)
python phlawd_db_editor.py -i Neognathae -b ../PHLAWD_DBs/vrt_11July18.db
# id,name,parent_id,rank
# 8825,Neognathae,8782,superorder
# create new taxon Neoaves (Superorder) *** NOTE: create command does not currently take in a rank arg ***
python phlawd_db_editor.py -c Neoaves 8825 -b ../PHLAWD_DBs/vrt_11July18.db
# creating Neoaves(66600001) to be a child of 8825
# create taxon (Order) Accipitriformes
python phlawd_db_editor.py -c Accipitriformes 66600001 -b ../PHLAWD_DBs/vrt_11July18.db
# creating Accipitriformes(66600002) to be a child of 66600001
# move existing Families Cathartidae, Accipitridae, and Sagittariidae to Accipitriformes
python phlawd_db_editor.py -i Cathartidae -b ../PHLAWD_DBs/vrt_11July18.db
# id,name,parent_id,rank
# 8922,Cathartidae,8920,family
python phlawd_db_editor.py -m 8922 66600002 -b ../PHLAWD_DBs/vrt_11July18.db
# moving 8922 to be a child of 66600002
python phlawd_db_editor.py -i Accipitridae -b ../PHLAWD_DBs/vrt_11July18.db
# id,name,parent_id,rank
# 56259,Accipitridae,8948,family
python phlawd_db_editor.py -m 56259 66600002 -b ../PHLAWD_DBs/vrt_11July18.db
# moving 56259 to be a child of 66600002
python phlawd_db_editor.py -i Sagittariidae -b ../PHLAWD_DBs/vrt_11July18.db
# id,name,parent_id,rank
# 56256,Sagittariidae,8948,family
# id,name,parent_id,rank
# 459299,Sagittariidae,88560,family <- not a bird
python phlawd_db_editor.py -m 56256 66600002 -b ../PHLAWD_DBs/vrt_11July18.db
# moving 56256 to be a child of 66600002
# check (all seem good):
python phlawd_db_editor.py -i Cathartidae -b ../PHLAWD_DBs/vrt_11July18.db
# id,name,parent_id,rank
# 8922,Cathartidae,66600002,family
python phlawd_db_editor.py -i Accipitridae -b ../PHLAWD_DBs/vrt_11July18.db
# id,name,parent_id,rank
# 56259,Accipitridae,66600002,family
python phlawd_db_editor.py -i Sagittariidae -b ../PHLAWD_DBs/vrt_11July18.db
# id,name,parent_id,rank
# 56256,Sagittariidae,66600002,family <- bird
# id,name,parent_id,rank
# 459299,Sagittariidae,88560,family
# separate test: get rid of a bad taxon ("environmental samples")
python phlawd_db_editor.py -d 1126251 -b ../PHLAWD_DBs/vrt_11July18.db
# deleting 1126251
# dummy test: move (existing) Strigiformes to inside (existing) Galloanserae
python phlawd_db_editor.py -i Strigiformes -b ../PHLAWD_DBs/vrt_11July18.db
# id,name,parent_id,rank
# 30458,Strigiformes,8825,order
python phlawd_db_editor.py -i Galloanserae -b ../PHLAWD_DBs/vrt_11July18.db
# id,name,parent_id,rank
# 1549675,Galloanserae,8825,no rank
python phlawd_db_editor.py -m 30458 1549675 -b ../PHLAWD_DBs/vrt_11July18.db
# moving 30458 to be a child of 1549675
# rebuild
time python phlawd_db_editor.py --rebuild -b ../PHLAWD_DBs/vrt_11July18.db
# finally, get edited taxonomy tree. new taxa (and anything inside) missing.
# moved taxon (Strigiformes) in existing parent (Galloanserae) shows up
# deleted taxa are absent
python ../PyPHLAWD/src/get_ncbi_tax_tree.py -t Aves -d vrt_11July18.db -o Aves_ncbi_tax_EDIT.tre
# trying to `setup` any clade within a new taxon does not work (see issue #2)
Got it in this one 5208bea
I created some taxa and moved existing taxa into them. When I try to extract the taxonomy newick:
the tree lacks both the new and moved taxa. I tried moving an existing taxon to be the descendant of another existing taxon, and it seems to work. So there is something about the new taxa that are problematic.