Changeset 1713:7113883f4437 in orange-bioinformatics


Ignore:
Timestamp:
08/21/12 19:14:55 (20 months ago)
Author:
markotoplak
Branch:
default
Message:

Fixes for obiGeneSets. Compatible files were generated and uploaded to SF.

Location:
_bioinformatics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiGeneSets.py

    r1712 r1713  
    7878    Return gene sets from miRNA targets 
    7979    """ 
    80     from . import obimiRNA, obiKEGG 
    81     org_code = obiKEGG.from_taxid(org) 
     80    from . import obimiRNA, obiKEGG2 
     81    org_code = obiKEGG2.from_taxid(org) 
    8282    link_fmt = "http://www.mirbase.org/cgi-bin/mirna_entry.pl?acc=%s" 
    8383    mirnas = [(id, obimiRNA.get_info(id)) for id in obimiRNA.ids(org_code)] 
     
    327327        try: 
    328328            result.update(collection) 
    329         except ValueError: 
     329        except (ValueError, TypeError): 
    330330            if issequencens(collection): #have a hierarchy, organism specification 
    331331                new = load(*collection) 
     
    353353    from . import obiKEGG2 as obiKEGG 
    354354 
    355     #genesetsfn = [ keggGeneSets, goGeneSets, miRNAGeneSets] 
    356     genesetsfn = [ goGeneSets, miRNAGeneSets] 
     355    genesetsfn = [ keggGeneSets, goGeneSets, miRNAGeneSets] 
    357356    organisms = obiTaxonomy.common_taxids() 
    358357    for fn in genesetsfn: 
     
    363362                for gs in genesets: 
    364363                    print "registering", gs.common_hierarchy() 
    365                     #register(gs, rsf) #server files 
    366                     register(gs) 
     364                    register(gs, rsf) #server files 
     365                    #register(gs) 
    367366                    print "successful", gs.common_hierarchy() 
    368367            except (obiKEGG.OrganismNotFoundError, GenesetRegException): 
    369368                print "organism not found", org 
    370  
    371369 
    372370if __name__ == "__main__": 
  • _bioinformatics/obiKEGG2/__init__.py

    r1712 r1713  
    236236    genome = KEGGGenome() 
    237237    res = genome.search(taxid) 
    238     print taxid, res 
    239238    for r in res: 
    240239        e = genome[r] 
  • _bioinformatics/obimiRNA.py

    r1636 r1713  
    188188                 
    189189        else: 
    190             raise miRNAException("ids() Error: Check the input value.") 
    191  
    192              
     190            from . import obiKEGG2 
     191            raise obiKEGG2.OrganismNotFoundError(taxid) 
    193192         
    194193class mat_miRNA: 
Note: See TracChangeset for help on using the changeset viewer.