| filterGeneExpr {psichomics} | R Documentation |
Filter genes based on their expression
filterGeneExpr(geneExpr, minMean = 0, maxMean = Inf, minVar = 0, maxVar = Inf, minCounts = 10, minTotalCounts = 15)
geneExpr |
Data frame or matrix: gene expression |
minMean |
Numeric: minimum of read count mean per gene |
maxMean |
Numeric: maximum of read count mean per gene |
minVar |
Numeric: minimum of read count variance per gene |
maxVar |
Numeric: maximum of read count variance per gene |
minCounts |
Numeric: minimum number of read counts per gene for at least some samples |
minTotalCounts |
Numeric: minimum total number of read counts per gene |
Boolean vector indicating which genes have sufficiently large counts
geneExpr <- readFile("ex_gene_expression.RDS")
# Add some genes with low expression
geneExpr <- rbind(geneExpr,
lowReadGene1=c(rep(4:5, 10)),
lowReadGene2=c(rep(5:1, 10)),
lowReadGene3=c(rep(10:1, 10)),
lowReadGene4=c(rep(7:8, 10)))
# Filter out genes with low reads across samples
geneExpr[filterGeneExpr(geneExpr), ]