Irrelevant play

This commit is contained in:
2007-08-02 11:19:16 +00:00
parent 2d419a9862
commit 438e7cb918
3 changed files with 38 additions and 26 deletions

View File

@@ -152,7 +152,18 @@ def parents_dag(go_terms, ontology=['BP']):
edge_dict[nn] = [head]
return edge_dict
def gene_GO_hypergeo_test(genelist, universe, ontology = ['BP']):
def gene_GO_hypergeo_test(genelist,universe="entrezUniverse",ontology="BP",chip = "hgu133a",pval_cutoff=0.01,cond=False,test_direction="over"):
pvals = geneGoHyperGeoTest(entrezGeneIds, lib=None, ontology=ontology[0], universe=universe)
return pvals
#assert(scipy.alltrue([True for i in genelist if i in universe]))
universeGeneIds=universe
params = rpy.r.new("GOHyperGParams",
geneIds=genelist,
annotation="hgu133a",
ontology=ontology,
pvalueCutoff=pval_cutoff,
conditional=cond,
testDirection=test_direction
)
result = rpy.r.summary(rpy.r.hyperGTest(params))
return rpy.r.summary(result), params