Changeset 1953:e1d43f404196 in orange-bioinformatics


Ignore:
Timestamp:
01/29/14 14:44:46 (3 months ago)
Author:
markotoplak
Branch:
default
Message:

Allow organism names (mapped through obiTaxonomy) as species id.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orangecontrib/bio/obiGeneSets.py

    r1933 r1953  
    389389    """ First try to load from the local registered folder. If the file 
    390390    is not available, load it from the server files. """ 
     391    if organism != None: 
     392        try: 
     393            int(organism) #already a taxid 
     394        except: 
     395            organismc = obiTaxonomy.to_taxid(organism) 
     396            if len(organismc) == 1: 
     397                organism = organismc.pop() 
     398            else: 
     399                exstr = "Could not interpret organism " + str(organism) + \ 
     400                      ". Possibilities: " + str(organismc)  
     401                raise NoGenesetsException(exstr) 
     402 
    391403    try: 
    392404        return load_local(hierarchy, organism) 
Note: See TracChangeset for help on using the changeset viewer.