def _read_ExpressionSet_RData(RData): """Read ExpressionSet RData to Rpy2 robjects. RData: Path to the input RData file. ExpressionSet must be the only object in the RData. Return Rpy2's eSet object, assayData, featureData, phenotypeData. """ importr('Biobase') rdata = r.load(RData) eSet = r.get(rdata) # rpy2 ExpressionSet object (assumed) assayData = r.assayData(eSet) # rpy2 environment object fData = r.fData(eSet) # rpy2 DataFrame object pData = r.pData(eSet) # rpy2 DataFrame object return eSet, assayData, fData, pData
def estimateExpression(infiles, outfile): '''estimate expression levels.''' R.library("affy") E.info("reading data") raw_data = R.ReadAffy(infiles) E.info("RMA normalization") eset = R.rma(raw_data) R.boxplot(raw_data) R.boxplot(eset) print R.as_list(R.assayData(eset))
def estimateExpression(infiles, outfile): """estimate expression levels.""" R.library("affy") E.info("reading data") raw_data = R.ReadAffy(infiles) E.info("RMA normalization") eset = R.rma(raw_data) R.boxplot(raw_data) R.boxplot(eset) print R.as_list(R.assayData(eset))