Changeset 1632:9cf919d0f343 in orange-bioinformatics for Orange/bioinformatics/obiGeneSets.py


Ignore:
Timestamp:
04/16/12 19:53:28 (2 years ago)
Author:
mitar
Branch:
default
Message:

Fixing imports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/bioinformatics/obiGeneSets.py

    r1625 r1632  
    44Maintainer: Marko Toplak 
    55""" 
    6 from __future__ import with_statement 
    7  
    8 import obiKEGG, orange 
    9 import os 
    10 import obiGO 
    11 import cPickle as pickle 
    12 #import pickle 
    13 import orngServerFiles 
    14 import obiTaxonomy 
    15 import tempfile 
    16 import obiGeneSets 
    17 import sys 
     6 
     7from __future__ import absolute_import, with_statement 
     8 
     9import cPickle as pickle, os, tempfile, sys 
    1810from collections import defaultdict 
     11 
     12import orange 
     13from Orange.orng import orngServerFiles 
     14 
     15from . import obiGeneSets, obiGO, obiKEGG, obiTaxonomy 
    1916 
    2017sfdomain = "gene_sets" 
     
    185182    Returns gene sets from KEGG pathways. 
    186183    """ 
    187     import obiKEGG2 as obiKEGG 
     184    from . import obiKEGG2 as obiKEGG 
    188185     
    189186    kegg = obiKEGG.KEGGOrganism(org) 
     
    207204    Return gene sets from OMIM (Online Mendelian Inheritance in Man) diseses 
    208205    """ 
    209     import obiOMIM 
     206    from . import obiOMIM 
    210207    genesets = [GeneSet(id=disease.id, name=disease.name, genes=obiOMIM.disease_genes(disease), hierarchy=("OMIM",), organism="9606", 
    211208                    link=("http://www.ncbi.nlm.nih.gov/entrez/dispomim.cgi?id=" % disease.id if disease.id else None)) \ 
     
    217214    Return gene sets from miRNA targets 
    218215    """ 
    219     import obimiRNA, obiKEGG 
     216    from . import obimiRNA, obiKEGG 
    220217    org_code = obiKEGG.from_taxid(org) 
    221218    link_fmt = "http://www.mirbase.org/cgi-bin/mirna_entry.pl?acc=%s" 
     
    226223 
    227224def go_miRNASets(org, ontology=None, enrichment=True, pval=0.05, treshold=0.04): 
    228     import obimiRNA, obiGO 
     225    from . import obimiRNA, obiGO 
    229226    mirnas = obimiRNA.ids(int(org)) 
    230227    if ontology is None: 
     
    238235    go_sets = obimiRNA.filter_GO(go_sets, annotations, treshold=treshold) 
    239236     
    240     import obiGeneSets as gs 
     237    from . import obiGeneSets as gs 
    241238    link_fmt = "http://amigo.geneontology.org/cgi-bin/amigo/term-details.cgi?term=%s" 
    242239    gsets = [gs.GeneSet(id=key, name=ontology[key].name, genes=value, hierarchy=("miRNA", "go_sets",), 
     
    285282    """ Returns local path for gene sets. Creates it if it does not exists 
    286283    yet. """ 
    287     import orngEnviron 
     284    from Orange.orng import orngEnviron 
    288285    pth = os.path.join(orngEnviron.directoryNames["bufferDir"], "gene_sets_local") 
    289286    omakedirs(pth) 
Note: See TracChangeset for help on using the changeset viewer.