Changeset 1747:fee3c71716ef in orange-bioinformatics for _bioinformatics/obiKEGG/__init__.py


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.

File:
1 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: 
Note: See TracChangeset for help on using the changeset viewer.