From f4cf635eec30c7bcadb40d176a05c240266df81a Mon Sep 17 00:00:00 2001 From: Holger Brandl <brandl@mpi-cbg.de> Date: Tue, 22 Jul 2014 16:45:00 +0200 Subject: [PATCH] cont. cummerbund methods --- R/bio/cummerutils.R | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/R/bio/cummerutils.R b/R/bio/cummerutils.R index ed55dd2..6522de5 100644 --- a/R/bio/cummerutils.R +++ b/R/bio/cummerutils.R @@ -1,14 +1,18 @@ -require.auto(cummeRbund) +require(cummeRbund) - -getExpressedGenes <- function(cuff, minFPKM=1, logMode=F){ +getExpressedGenes <- function(cuff, ...){ fpkmMat<-repFpkmMatrix(genes(cuff)) + rownames(filterByExpression(fpkmMat, ...)) +} + + +filterByExpression <- function(fpkmMat, minFPKM=1, logMode=F){ if(logMode) fpkmMat<-log10(fpkmMat+1) ## add a pseudocount geneMax <- apply(fpkmMat, 1, max) - rownames(fpkmMat[geneMax>minFPKM,]) + fpkmMat[geneMax>minFPKM,] } -- GitLab