filterExpression: Filter expression

Description Usage Arguments Value Examples

Description

To filter out non expressed genes this method uses the FPKM values to get a comparable value over genes. For each gene, if the pth- percentile is greater than the fpkmCutoff value, it passes the filter. To calcute the FPKM values the user needs to provide a GTF file or the basepair parameter as described in fpkm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
filterExpression(object, ...)

## S4 method for signature 'OutriderDataSet'
filterExpression(
  object,
  gtfFile,
  fpkmCutoff = 1,
  percentile = 0.95,
  filterGenes = TRUE,
  savefpkm = FALSE,
  minCounts = FALSE,
  addExpressedGenes = TRUE,
  ...
)

Arguments

object

An OutriderDataSet object

...

Additional arguments passed to computeGeneLength

gtfFile

A txDb object or a GTF/GFF file to be used as annotation

fpkmCutoff

The threshold for filtering based on the FPKM value

percentile

a numeric indicating the percentile FPKM value to compare against the fpkmCutoff

filterGenes

If TRUE, the default, the object is subseted.

savefpkm

If TRUE, the FPKM values are saved as assay

minCounts

If TRUE, only genes with 0 counts in all samples are filtered

addExpressedGenes

If TRUE (default), adds 5 columns to the colData with information regarding the number of expressed genes per sample

Value

An OutriderDataSet containing the passedFilter column, which indicates if the given gene passed the filtering threshold. If filterGenes is TRUE the object is already subsetted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ods <- makeExampleOutriderDataSet(dataset="GTExSkinSmall")
annotationFile <- system.file("extdata", 
    "gencode.v19.genes.small.gtf.gz", package="OUTRIDER")
ods <- filterExpression(ods, annotationFile, filterGenes=FALSE)

mcols(ods)['passedFilter']
fpkm(ods)[1:10,1:10]
dim(ods)

ods <- ods[mcols(ods)[['passedFilter']]]
dim(ods)

OUTRIDER documentation built on Nov. 8, 2020, 5:16 p.m.