source: orange-bioinformatics/doc/modules/obiArrayExpress-test.py @ 1345:738b2b2377a2

Revision 1345:738b2b2377a2, 1.0 KB checked in by ales_erjavec <ales.erjavec@…>, 3 years ago (diff)

Added a obiArrayExpress-test.py testing script, added format parameter to query_experiments/files.

Line 
1import obiArrayExpress
2
3# test the gene_atlas_summary
4from pprint import pprint
5summary = obiArrayExpress.get_atlas_summary(["Kalrn", "Ptprd", "Mbp", "Cyfip2"], "Mus musculus")
6pprint(summary)
7
8# test Atlas Conditions
9
10gene_cond1 = obiArrayExpress.AtlasConditionGeneProperty("Goterm", "Is", "translation")
11gene_cond2 = obiArrayExpress.AtlasConditionGeneProperty("Disease", "Is", "cancer")
12org_cond = obiArrayExpress.AtlasConditionOrganism("Homo sapiens")
13
14conditions = obiArrayExpress.AtlasConditionList([gene_cond1, gene_cond2, org_cond])
15results = obiArrayExpress.query_atlas(conditions, format="json")
16import json
17results = json.load(results)
18pprint(results)
19
20# test ArrayExpress experiments, files query
21
22#from xml.dom.minidom import parse
23from json import load as parse
24results = parse(obiArrayExpress.query_experiments(accession="E-MEXP-31", format="json"))
25pprint(results)
26
27results = parse(obiArrayExpress.query_experiments(species="Homo sapines", expdesign="dose+response", ef="CellType", format="json"))
28pprint(results)
29
30
31
Note: See TracBrowser for help on using the repository browser.