This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Classsify Species Into Groups

I have list of species like this:

Drosophila melanogaster  
Homo sapiens  
Mus musculus  
Aedes aegypti  
Spodoptera frugiperda  
Rattus norvegicus  
Bos taurus  
Caenorhabditis elegans  
Feline foamy

I want to classify them as in the second column. Is there easier way to do that without manually searching Wikipedia?

Drosophila melanogaster      Insects
Homo sapiens      Other eukaryote
Mus musculus      Other eukaryote
Aedes aegypti      Insects
Spodoptera frugiperda      Insects
Rattus norvegicus      Other eukaryote
Bos taurus      Other eukaryote
Caenorhabditis elegans      Other eukaryote
Feline foamy     Virus
database search classification

3 answers

Your classifications are kind of uneven: according to the NCBI taxonomy "insects" is a superclass, "viruses" is a superkingdom. Why do you have the "other eukaryote" class?

If you have found a specific level (e.g. class or superclass) you could parse the NCBI Taxonomy download files (FTP): first, match your species, second, go up in the tree until you hit your level.

Nonetheless, it's hard to pick a level that feels right. E.g. the superclass of humans would be gnathostomata (class: mammals). Drosophila seems to have no class...

I know this classification is uneven, but I want to know is how many insect species are there compared to other eukaryote.

@Kiriya if all you want is to know whether it's an insect or another eukaryote, just go up in the tree until you hit either Hexapoda (insects) or Eukaryota, and classify accordingly.

right, but there are non-insect hexapods so go until you hit Insecta (NCBI Taxonomy is a little odd in that gives "insect" as the common name for hexapods)

You can use NCBI's taxonomy common tree to get the tax tree,

and you can write a script to reformat it.

You can use the EBI's Ontology Lookup service to query the NEWT Taxonomy Ontology (which is the same NCBI taxonomy but "ontologized" by people at UniProt):

http://www.ebi.ac.uk/ontology-lookup/

The lookup service provides webservices with methods like:

public Map getTermParents(String termId, String ontologyName);
public Map getTermChildren(String termId, String ontologyName, int distance, int[] relationTypes);

which you can use with whatever taxonomy category and specie you want to check whether a particular specie is a child (is included) of that taxonomy category (regardless if that is a class, kingdom, superclass, etc, you would just need to iterate/change distances). Probably you want to go from the specie tax id and up until the root (using getTermParents) and see if you pass by the category for which you want to count.

Good luck!

Log in to answer this question.