Changeset 1747:fee3c71716ef in orange-bioinformatics


Ignore:
Timestamp:
04/18/13 12:09:27 (12 months ago)
Author:
markotoplak
Branch:
default
Children:
1748:3a6c3d41aaee, 1752:9932018b0728
Message:

KEGG organism name finding fixes.

Location:
_bioinformatics/obiKEGG
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiKEGG/__init__.py

    r1745 r1747  
    315315        if name not in genome: 
    316316            ids = genome.search(name) 
    317             if not ids: 
    318                 from .. import obiTaxonomy 
    319                 ids = obiTaxonomy.search(name) 
    320                 ids = [id for id in ids if genome.search(id)] 
    321             name = ids.pop(0) if ids else name 
     317            if ids: 
     318                name = ids.pop(0) if ids else name 
     319            else: 
     320                raise OrganismNotFoundError(name) 
    322321 
    323322        try: 
  • _bioinformatics/obiKEGG/databases.py

    r1741 r1747  
    348348            string = self.TAXID_MAP[string] 
    349349 
    350         res = self.api.find(self.DB, string) 
     350        res = self.api.find(self.DB, string).strip() 
    351351        if not res: 
    352352            return [] 
Note: See TracChangeset for help on using the changeset viewer.