Changeset 1344:0fce937e623e in orange-bioinformatics


Ignore:
Timestamp:
03/10/11 11:59:05 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
0a666dbfecdb17aa354861a6386da3d9051b7004
Message:

Changed get_atlas_info to get_atlas_summary, changed the search field from "" (all) to "Gene" (searches Gene name and ids).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • obiArrayExpress.py

    r1342 r1344  
    33------------- 
    44 
    5 A python module for accessing the ArrayExpress and Gene Atlas web services. 
     5A python module for accessing the ArrayExpress and GeneExpressionAtlas web services. 
    66 
    77Example:: 
     
    412412 
    413413 
    414 def get_atlas_info(genes, organism): 
    415     genes_condition = AtlasConditionGeneProperty("", "Is", genes) 
     414def get_atlas_summary(genes, organism): 
     415    """ Return 3 dictionaries containing a summary of atlas information 
     416    about three experimental factors: 
     417     
     418        - Organism Part (OP)  
     419        - Disease State (DS) 
     420        - Cell type (CT) 
     421     
     422    Each dictionary contains query genes as keys. Values are dictionaries 
     423    mapping factor values to a 2-tuple containig the count of up regulated 
     424    and down regulated experiments. 
     425     
     426    Example:: 
     427     
     428        >>> get_atlas_summary(["RUNX1"], "Homo sapiens") 
     429        ({u'RUNX1': ... 
     430         
     431    """ 
     432    genes_condition = AtlasConditionGeneProperty("Gene", "Is", genes) 
    416433    org_condition = AtlasConditionOrganism(organism) 
    417434    condition = AtlasConditionList([genes_condition, org_condition]) 
     
    448465     
    449466     
    450 if __name__ == "__main__":     
    451 #    print get_atlas_info(['Pou5f1', 'Dppa3'], 'Mus musculus') 
    452 #     
    453 #    print get_atlas_info(['PDLIM5', 'FGFR2' ], 'Homo sapiens') 
    454      
    455      
     467if __name__ == "__main__": 
     468    from pprint import pprint     
     469    pprint(get_atlas_summary(['Pou5f1', 'Dppa3'], 'Mus musculus')) 
     470        
     471    pprint(get_atlas_summary(['PDLIM5', 'FGFR2' ], 'Homo sapiens')) 
    456472     
    457473     
Note: See TracChangeset for help on using the changeset viewer.