Changeset 1347:dd168923331f in orange-bioinformatics for doc/modules/obiArrayExpress-test.py


Ignore:
Timestamp:
03/14/11 15:45:08 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
8df185dbcf4d636279537ae981bb168c526610ce
Message:

Added some docstrings, added results parsing in the module level functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/modules/obiArrayExpress-test.py

    r1345 r1347  
    11import obiArrayExpress 
     2from pprint import pprint 
    23 
    34# test the gene_atlas_summary 
    4 from pprint import pprint 
    55summary = obiArrayExpress.get_atlas_summary(["Kalrn", "Ptprd", "Mbp", "Cyfip2"], "Mus musculus") 
    66pprint(summary) 
    77 
     8# test query_atlas_simple 
     9results = obiArrayExpress.query_atlas_simple(genes=["Kalrn", "Ptprd", "Mbp", "Cyfip2"], organism="Mus musculus", regulation="up", condition="brain") 
     10pprint(results) 
     11 
    812# test Atlas Conditions 
    9  
    1013gene_cond1 = obiArrayExpress.AtlasConditionGeneProperty("Goterm", "Is", "translation") 
    1114gene_cond2 = obiArrayExpress.AtlasConditionGeneProperty("Disease", "Is", "cancer") 
     
    1316 
    1417conditions = obiArrayExpress.AtlasConditionList([gene_cond1, gene_cond2, org_cond]) 
    15 results = obiArrayExpress.query_atlas(conditions, format="json") 
    16 import json 
    17 results = json.load(results) 
     18results = obiArrayExpress.query_atlas(conditions) 
    1819pprint(results) 
    1920 
    2021# test ArrayExpress experiments, files query 
    2122 
    22 #from xml.dom.minidom import parse 
    23 from json import load as parse 
    24 results = parse(obiArrayExpress.query_experiments(accession="E-MEXP-31", format="json")) 
     23results = obiArrayExpress.query_experiments(accession="E-MEXP-31") 
    2524pprint(results) 
    2625 
    27 results = parse(obiArrayExpress.query_experiments(species="Homo sapines", expdesign="dose+response", ef="CellType", format="json")) 
     26results = obiArrayExpress.query_experiments(species="Homo sapines", expdesign="dose+response", ef="CellType") 
    2827pprint(results) 
    2928 
     29results = obiArrayExpress.query_experiments(species="Homo sapiens", gxa=True, assaycount=(1, 5), miamescore=(3, 5)) 
     30pprint(results) 
    3031 
    31  
     32results = obiArrayExpress.query_files(species="Mus musculus", gxa=True, keywords=["lung", "cancer"], miamescore=(3, 5), format="xml") 
     33print results 
Note: See TracChangeset for help on using the changeset viewer.