# Generating taxonomic hierarchy by species/genus name

I am attempting to create a reference library of DNA plant barcodes in the ITS2 barcode region for plants from a specific region (Panama). I downloaded all the sequences for plants that resulted in a search for “ITS2” “Panama” and “Viridiplantae” on NCBI GeneBank. For the purpose of assigning sequences of unknown plants (obtained from environmental DNA studies) based on similarity to the known sequences I want to clean up my data and present each sequence with its corresponding taxonomic ranks - Kingdom ; Phylum ; Class ; Order ; Family ; Genus; Species.

My problem is that the taxonomic information for each sequence upload in NCBI is all over the place –e.g. some sequences have additional taxonomic ranks listed in their information and there is no clear definition of what corresponds to which taxonomic rank. Since there are a few hundred species I want to refrain from filling in the information manually and I hoped to solve this problem by mining the taxonomic ranks I need from a different database according to the species or genus name in the sequence information. However, I have yet to find a dataset that is comprehensive enough to include all the plants and is simple to access. Do you have any suggestions on how to achieve my goal? Thanks.

• Welcome to taxonomy! It is not an uncommon situation. I don't know plants but ITS2 alone will struggle to identify distant relationships, certainly in the eukaryote I'm most familiar with, that being insects.
– M__
Jun 11 '20 at 13:02
• Actually according to a recent study, a mini DNA barcode region located on the ITS2 showed quite promising results for plant discrimination. see; Moorhouse-Gann et al.(2018) New universal ITS2 primers for high-resolution herbivory analyses using DNA metabarcoding in both tropical and temperate zone. nature.com/articles/s41598-018-26648-2 Jun 11 '20 at 19:01
• Okay this is a long discussion. I understand here they are coming from it will give good resolution at a species and sub-species level, but its not good for phylogeny. Your question relates to 'distant relationships' ... in deep learning you could argue deep relationships can be obtained, but not for trees
– M__
Jun 11 '20 at 19:09
• Anyway if you have a list I would code to loop through your names and use efetch to obtain the information you are seeking.
– M__
Jun 11 '20 at 20:27
• Apparently, 'myTAI' package in R can mine taxaonmy from GenBank. cran.r-project.org/web/packages/myTAI/vignettes/Taxonomy.html Jun 13 '20 at 19:01