Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

Fixed queries

This commit is contained in:
Arnar Flatberg 2007-08-22 13:40:33 +00:00
parent 6ba8c6eb67
commit ffe1ce6319
1 changed files with 5 additions and 5 deletions

View File

@ -159,7 +159,7 @@ class SAM(workflow.Function):
rpy.r.library("siggenes")
rpy.r.library("multtest")
cl = scipy.dot(y.asarray(), scipy.diag([1,2,3]) ).sum(1)
cl = scipy.dot(y.asarray(), scipy.diag(scipy.arange(y.shape[1]))).sum(1)
data = x.asarray().T
sam = rpy.r.sam(data, cl=cl, B=n_iter, var_equal=False,med=False,s0=scipy.nan,rand=scipy.nan)
qvals = scipy.asarray(rpy.r.slot(sam, "p.value"))
@ -297,11 +297,12 @@ class ModKernelFunction(workflow.Function):
class NCBIQuery(workflow.Function):
def __init__(self, gene_id_name='gene_id'):
def __init__(self, gene_id_name='gene_ids'):
self._gene_id_name = gene_id_name
workflow.Function.__init__(self, 'query', 'NCBI')
def run(self, selection):
def run(self):
selection = main.project.get_selection()
if not selection.has_key(self._gene_id_name):
logger.log("notice", "Expected gene ids: %s, but got: %s" %(self._gene_id_name, selection.keys()))
return None
@ -309,7 +310,6 @@ class NCBIQuery(workflow.Function):
logger.log("notice", "No selected genes to query")
return None
logger.log("notice", "No selected genes to query")
base = 'http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?'
options = {r'&db=' : 'gene',
r'&cmd=' : 'retrieve',
@ -322,7 +322,7 @@ class NCBIQuery(workflow.Function):
class KEGGQuery(workflow.Function):
def __init__(self, org='hsa', gene_id_name='gene_id'):
def __init__(self, org='hsa', gene_id_name='gene_ids'):
self._org=org
self._gene_id_name = gene_id_name
workflow.Function.__init__(self, 'query', 'KEGG')