Skip to content
Snippets Groups Projects
cummerutils.R 355 B
Newer Older
Holger Brandl's avatar
Holger Brandl committed
require(cummeRbund)
Holger Brandl's avatar
Holger Brandl committed
getExpressedGenes <- function(cuff, ...){
Holger Brandl's avatar
Holger Brandl committed
    fpkmMat<-repFpkmMatrix(genes(cuff))
Holger Brandl's avatar
Holger Brandl committed
    rownames(filterByExpression(fpkmMat, ...))
}


filterByExpression <- function(fpkmMat, minFPKM=1, logMode=F){
    if(logMode) fpkmMat<-log10(fpkmMat+1) ## add a pseudocount

    geneMax <- apply(fpkmMat, 1, max)

Holger Brandl's avatar
Holger Brandl committed
    fpkmMat[geneMax>minFPKM,]