Learn R Programming

rnaseqcomp (version 1.0.0)

matrixFilter: Quantification Table Filtering

Description

This is the function to do any pre-filtering or pre-processing analysis for downstream benchmark estimation and visualization. Pre-filtering includes row selection (e.g. protein coding genes) of quantification table ; pre-processing includes calculation on a set of rows as calibration reference (e.g. house keeping genes) across different quantification pipelines, estimation of confidence thresholds on all the pipelines based on given thresholds from selected pipelines.

Usage

matrixFilter(quantData, repInfo, evaluationFeature, calibrationFeature, unitReference, unitCutoff = 1)

Arguments

quantData
A matrix of quantifications with rows by features (genes, transcripts, junctions or exons) and columns by pipelines each with 2 replicates. Missing data is allowed as NA.
repInfo
A factor documenting quantification pipeline names corresponding to the columns of quantData.
evaluationFeature
A logical vector corresponding to the rows of quantData, providing which features should be considered for downstream evaluation, e.g. protein coding genes.
calibrationFeature
A logical vector corresponding to the rows of quantData, providing which features should be considered as calibration reference, e.g. house keeping genes.
unitReference
A logical vector corresponding to the columns of quantData, providing to which columns all units should be unified and given threshold unitCutoff should be applied. If multiple columns are chosen, it is important that these columns have the same units (e.g. FPKM).
unitCutoff
A numeric threshold for signal cutoff at given quantification table columns by unitReference (default: 1). Same effects cutoff are estimated for other columns accordingly.

Value

A rnaseqcomp S4 class object
quantData
A filtered table for downstream analysis.
repInfo
A factor documenting quantification pipeline names corresponding to the columns of quantData.
refMed
A numeric vector giving the log scale medians of calibration reference.
scaler
A number providing the scales for downstream detrended signal.

Details

In the functions plotMAD and plotNE, detrended signals with value 0 will be at the same level as value 1 for giving pipelines by unitReference.

Examples

Run this code
data(encodeCells)
evaluationFeature <- encodeCells$genemeta$type == "protein_coding"
calibrationFeature <- encodeCells$genemeta$housekeeping
unitReference <- grepl("Cufflinks",encodeCells$repInfo)
dat <- matrixFilter(encodeCells$gm12878,encodeCells$repInfo,
evaluationFeature,calibrationFeature,unitReference)

Run the code above in your browser using DataLab