Changeset 1957:a1ac47c53c43 in orange-bioinformatics


Ignore:
Timestamp:
02/18/14 14:48:36 (8 weeks ago)
Author:
markotoplak
Branch:
default
Message:

Renamed obiGene and obiGEO.

Files:
11 edited
2 moved

Legend:

Unmodified
Added
Removed
  • docs/rst/reference/code/genematch1.py

    r1932 r1957  
    1 from Orange.bio import obiGene 
     1import Orange 
    22 
    33#matching targets are NCBI gene IDs 
    4 targets = obiGene.NCBIGeneInfo("Homo sapiens").keys() 
     4targets = Orange.bio.gene.NCBIGeneInfo("Homo sapiens").keys() 
    55 
    6 gm = obiGene.GMNCBI("9606") 
     6gm = Orange.bio.gene.GMNCBI("9606") 
    77gm.set_targets(targets) 
    88 
  • docs/rst/reference/code/genematch2.py

    r1932 r1957  
    1 from Orange.bio import obiGene, obiKEGG 
     1import Orange 
    22 
    3 targets = obiKEGG.KEGGOrganism("9606").get_genes() #KEGG gene IDs 
     3targets = Orange.bio.obiKEGG.KEGGOrganism("9606").get_genes() #KEGG gene IDs 
    44 
    5 gmkegg = obiGene.GMKEGG("9606") 
    6 gmgo = obiGene.GMGO("9606") 
    7 gmkegggo = obiGene.matcher([[gmkegg, gmgo]], direct=False) #joined matchers 
     5gmkegg = Orange.bio.gene.GMKEGG("9606") 
     6gmgo = Orange.bio.gene.GMGO("9606") 
     7gmkegggo = Orange.bio.gene.matcher([[gmkegg, gmgo]], direct=False) #joined matchers 
    88 
    99gmkegg.set_targets(targets) 
  • docs/rst/reference/code/genematch_path.py

    r1932 r1957  
    1 from Orange.bio import obiKEGG, obiGene 
     1import Orange 
    22 
    3 keggorg = obiKEGG.KEGGOrganism("mmu") 
     3keggorg = Orange.bio.obiKEGG.KEGGOrganism("mmu") 
    44kegg_genes = keggorg.get_genes()  
    55 
    66query = [ "Fndc4", "Itgb8", "Cdc34", "Olfr1403" ]  
    77 
    8 gm = obiGene.GMKEGG("mmu") #use KEGG aliases for gene matching 
     8gm = Orange.bio.gene.GMKEGG("mmu") #use KEGG aliases for gene matching 
    99gm.set_targets(kegg_genes) #set KEGG gene aliases as targets 
    1010 
     
    1414        pwys = keggorg.get_pathways_by_genes([match]) 
    1515        print name, "is in" 
    16         pathways = [ obiKEGG.KEGGPathway(p).title for p in pwys ] 
     16        pathways = [ Orange.bio.obiKEGG.KEGGPathway(p).title for p in pwys ] 
    1717        if pathways: 
    1818            for a in pathways: 
  • docs/rst/reference/code/geo_gds1.py

    r1938 r1957  
    44""" 
    55 
    6 from Orange.bio import obiGEO 
     6import Orange 
    77import textwrap 
    88 
    9 gdsinfo = obiGEO.GDSInfo() 
     9gdsinfo = Orange.bio.geo.GDSInfo() 
    1010gds = gdsinfo["GDS10"] 
    1111 
  • docs/rst/reference/code/geo_gds2.py

    r1938 r1957  
    1 from Orange.bio import obiGEO 
     1import Orange 
    22 
    3 gds = obiGEO.GDS("GDS1210") 
     3gds = Orange.bio.geo.GDS("GDS1210") 
    44 
    55data = gds.getdata(report_genes=True, transpose=False) 
    66print "report_genes=True, transpose=False" 
    77print "Report=Genes, Rows=Genes/Spots" 
    8 print "rows=%d cols=%d has_class=%s" % (len(data), len(data.domain.attributes), data.domain.classVar<>None) 
     8print "rows=%d cols=%d has_class=%s" % (len(data), len(data.domain.attributes), data.domain.class_var<>None) 
    99print 
    1010 
     
    1212print "report_genes=False, transpose=False" 
    1313print "Report=Spots, Rows=Genes/Spots" 
    14 print "rows=%d cols=%d has_class=%s" % (len(data), len(data.domain.attributes), data.domain.classVar<>None) 
     14print "rows=%d cols=%d has_class=%s" % (len(data), len(data.domain.attributes), data.domain.class_var<>None) 
    1515print 
    1616 
     
    1818print "report_genes=True, transpose=True" 
    1919print "Report=Genes, Rows=Samples" 
    20 print "rows=%d cols=%d has_class=%s" % (len(data), len(data.domain.attributes), data.domain.classVar<>None) 
    21 print "Class values:", " ".join([str(cv) for cv in data.domain.classVar.values])  
     20print "rows=%d cols=%d has_class=%s" % (len(data), len(data.domain.attributes), data.domain.class_var<>None) 
     21print "Class values:", " ".join([str(cv) for cv in data.domain.class_var.values])  
    2222print 
    23  
    2423 
    2524data = gds.getdata(report_genes=True, transpose=True, sample_type="tissue") 
    2625print 'report_genes=True, transpose=True sample_type="tissue"' 
    2726print "Report=Genes, Rows=Samples" 
    28 print "rows=%d cols=%d has_class=%s" % (len(data), len(data.domain.attributes), data.domain.classVar<>None) 
    29 print "Class values:", " ".join([str(cv) for cv in data.domain.classVar.values])  
     27print "rows=%d cols=%d has_class=%s" % (len(data), len(data.domain.attributes), data.domain.class_var<>None) 
     28print "Class values:", " ".join([str(cv) for cv in data.domain.class_var.values])  
    3029print 
  • docs/rst/reference/code/geo_gds3.py

    r1938 r1957  
    1 from Orange.bio import obiGEO 
     1import Orange 
    22 
    3 gds = obiGEO.GDS("GDS1676") 
     3gds = Orange.bio.geo.GDS("GDS1676") 
    44data = gds.getdata(sample_type="infection") 
    55print "Genes: %d, Samples: %d" % (len(data), len(data.domain.attributes)) 
  • docs/rst/reference/code/geo_gds5.py

    r1938 r1957  
    66""" 
    77 
    8 from Orange.bio import obiGEO 
     8import Orange 
    99 
    1010def valid(info, n=40): 
     
    2727                             for sinfo in gds["subsets"] if sinfo["type"]==st]) 
    2828 
    29 gdsinfo = obiGEO.GDSInfo() 
     29gdsinfo = Orange.bio.geo.GDSInfo() 
    3030valid_subset_types = [(id, valid(info)) for id, info in gdsinfo.items() if valid(info)] 
    3131report(valid_subset_types, gdsinfo) 
  • docs/rst/reference/code/geo_gds6.py

    r1938 r1957  
    11import Orange 
    2 from Orange.bio import obiGEO 
    32 
    4 gds = obiGEO.GDS("GDS2960") 
     3gds = Orange.bio.geo.GDS("GDS2960") 
    54data = gds.getdata(sample_type="disease state", transpose=True) 
    65print "Samples: %d, Genes: %d" % (len(data), len(data.domain.attributes)) 
  • docs/rst/reference/gene.rst

    r1932 r1957  
    1 .. py:currentmodule:: Orange.bio.obiGene 
     1.. py:currentmodule:: Orange.bio.gene 
    22 
    33.. index:: gene matching 
     
    88 
    99******************************************************** 
    10 Gene name matching (:mod:`obiGene`) 
     10Gene name matching (:mod:`gene`) 
    1111******************************************************** 
    1212 
  • docs/rst/reference/geo.rst

    r1938 r1957  
    1 .. py:currentmodule:: Orange.bio.obiGEO 
     1.. py:currentmodule:: Orange.bio.geo 
    22 
    33.. index:: NCBI 
     
    77 
    88************************************************************** 
    9 NCBI's Gene Expression Omnibus interface (:mod:`obiGEO`) 
     9NCBI's Gene Expression Omnibus interface (:mod:`geo`) 
    1010************************************************************** 
    1111 
     
    2323:: 
    2424 
    25     >>> from Orange.bio import obiGEO 
    26     >>> gds = obiGEO.GDS("GDS1676") 
     25    >>> import Orange 
     26    >>> gds = Orange.bio.geo.GDS("GDS1676") 
    2727    >>> data = gds.getdata() 
    2828    >>> len(data) 
     
    4343An example that uses obj:`GDSInfo`:: 
    4444 
    45     >>> from Orage import obiGEO 
    46     >>> info = obiGEO.GDSInfo() 
     45    >>> import Orange 
     46    >>> info = Orange.bio.geo.GDSInfo() 
    4747    >>> info.keys()[:5] 
    4848    >>> ['GDS2526', 'GDS2524', 'GDS2525', 'GDS2522', 'GDS1618'] 
  • orangecontrib/bio/__init__.py

    r1876 r1957  
    11# namespace stub 
    22__import__("pkg_resources").declare_namespace(__name__) 
     3 
     4import warnings 
     5 
     6alreadyWarned = False 
     7disabledMsg = "Some features will be disabled due to failing modules\n" 
     8def _import(name): 
     9    global alreadyWarned 
     10    try: 
     11        __import__(name, globals(), locals(), [], -1) 
     12    except ImportError, err: 
     13        warnings.warn("%sImporting '%s' failed: %s" % 
     14            (disabledMsg if not alreadyWarned else "", name, err), 
     15            UserWarning, 2) 
     16        alreadyWarned = True 
     17 
     18_import("gene") 
     19_import("geo") 
     20 
     21del _import 
     22del alreadyWarned 
     23del disabledMsg 
Note: See TracChangeset for help on using the changeset viewer.