computeMedianCV {scp}R Documentation

Compute the median coefficient of variation (CV) per cell

Description

The function computes for each cell the median CV. The expression data is normalized twice. First, cell median expression is used as normalization factor, then, the mean for each batch and peptide. The CV is then computed for each protein in each cell. CV is the standard deviation divided by the mean expression. The CV is computed only if there are more than 5 observations per protein per cell.

Usage

computeMedianCV(object, i, peptideCol, proteinCol, batchCol)

Arguments

object

A QFeatures object

i

A numeric() or character() vector indicating from which assays the rowData should be taken.

peptideCol

A character(1) indicating the variable name in the rowData that contains the peptide grouping.

proteinCol

A character(1) indicating the variable name in the rowData that contains the protein grouping.

batchCol

A character(1) indicating the variable name in the colData of object that contains the batch names.

Details

A new columns, .medianCV, is added to the colData of the assay i and contains the computed median CVs.

Watch out that peptideCol and proteinCol are feature variables and hence taken from the rowData. batchCol is a sample variable and is taken from the colData of the QFeatures object.

Value

A QFeatures object.

Examples

data("scp1")
scp1 <- computeMedianCV(scp1, 
                        i = "peptides", 
                        proteinCol = "protein", 
                        peptideCol = "peptide", 
                        batchCol = "Set")
## Check results
hist(scp1[["peptides"]]$.MedianCV)


[Package scp version 1.0.0 Index]