Esempio n. 1
0
import Orange
from orangecontrib.bio import dicty, geneset, gsea, gene, geo

gds = geo.GDS("GDS10")
data = gds.getdata(transpose=True)

matcher = gene.matcher([gene.GMKEGG("H**o sapiens")])
genesets = geneset.collections((("KEGG", ), "H**o sapiens"))

#the number of permutations (n) should be much higher
res = gsea.run(data,
               gene_sets=genesets,
               matcher=matcher,
               min_part=0.05,
               permutation="phenotype",
               n=10,
               phen_desc=data.domain["tissue"],
               gene_desc=True)

print
print "GSEA results (descriptor: tissue)"
print "%-40s %6s %6s %6s %7s" % ("LABEL", "NES", "FDR", "SIZE", "MATCHED")
for gs, resu in sorted(res.items(), key=lambda x: x[1]["fdr"])[:10]:
    print "%-40s %6.3f %6.3f %6d %7d" % (gs.name[:30], resu["nes"],
                                         resu["fdr"], resu["size"],
                                         resu["matched_size"])
Esempio n. 2
0
import Orange
from orangecontrib.bio import dicty, geneset, gsea, gene

dbc = dicty.DictyExpress()
data = dbc.get_data(sample='pkaC-', time="8")

#select the first chip (the first attribute)
data = data.translate([data.domain.attributes[0]], True)

matcher = gene.matcher([[gene.GMKEGG("dicty"), gene.GMDicty()]])
genesets =  geneset.collections((("KEGG",), "dicty"))

res = gsea.direct(data, matcher=matcher, min_part=0.05, 
    gene_sets=genesets)

print "%-40s %6s %6s %6s %7s" % ("LABEL", "NES", "P-VAL", "SIZE", "MATCHED")
for name,resu in sorted(res.items()[:10], key=lambda x: x[1]["p"]): 
    print "%-40s %6.3f %6.3f %6d %7d" % (name.name[:35], resu["nes"],
        resu["p"], resu["size"], resu["matched_size"]) 

Esempio n. 3
0
import Orange
from orangecontrib.bio import dicty, geneset, gsea, gene, geo

gds = geo.GDS("GDS10")
data = gds.getdata() 

matcher = gene.matcher([gene.GMKEGG("H**o sapiens")])
genesets = geneset.collections((("KEGG",), "H**o sapiens"))

#the number of permutations (n) should be much higher
res = gsea.run(data, gene_sets=genesets, matcher=matcher, 
    min_part=0.05, permutation="phenotype", n=10, 
    phen_desc="tissue", gene_desc="gene") 

print
print "GSEA results (descriptor: tissue)"
print "%-40s %6s %6s %6s %7s" % ("LABEL", "NES", "FDR", "SIZE", "MATCHED") 
for gs, resu in sorted(res.items(), key=lambda x: x[1]["fdr"])[:10]: 
    print "%-40s %6.3f %6.3f %6d %7d" % (gs.name[:30],
        resu["nes"], resu["fdr"], resu["size"], resu["matched_size"])