filterGeneExpr {psichomics} | R Documentation

## Filter genes based on their expression

### Description

Uses `filterByExpr` to determine genes with sufficiently large counts to retain for statistical analysis.

### Usage

    filterGeneExpr(
      geneExpr,
      minMean = 0,
      maxMean = Inf,
      minVar = 0,
      maxVar = Inf,
      minCounts = 10,
      minTotalCounts = 15
    )

### Arguments

`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 a worthwhile number of samples (check `filterByExpr` for more information)
`minTotalCounts` | Numeric: minimum total number of read counts per gene

### Value

Boolean vector indicating which genes have sufficiently large counts

### See Also

Other functions for gene expression pre-processing: `convertGeneIdentifiers()`, `normaliseGeneExpression()`, `plotGeneExprPerSample()`, `plotLibrarySize()`, `plotRowStats()`

### Examples

    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), ]

[Package psichomics version 1.18.6 Index]