computeSCR {scp}R Documentation

Compute the sample over carrier ratio (SCR)

Description

The function computes the ratio of the intensities of sample channels over the intentisty of the carrier channel for each feature. The ratios are averaged within the assay.

Usage

computeSCR(obj, i, colDataCol, samplePattern, carrierPattern)

Arguments

obj

A QFeatures object.

i

A character() or integer() indicating for which assay(s) the SCR needs to be computed.

colDataCol

A character(1) indicating the variable to take from colData(obj) that gives the sample annotation.

samplePattern

A character(1) pattern that matches the sample encoding in colDataCol.

carrierPattern

A character(1) pattern that matches the carrier encoding in colDataCol. Only one match per assay is allowed, otherwise only the first match is taken

Value

A QFeatures object for which the rowData of the given assay(s) is augmented with the mean SCR (.meanSCR variable).

Examples

data("scp1")
scp1 <- computeSCR(scp1, 
                   i = 1,
                   colDataCol = "SampleType",
                   carrierPattern = "Carrier",
                   samplePattern = "Blank|Macrophage|Monocyte")
## Check results
rowDataToDF(scp1, 1, ".meanSCR")


[Package scp version 1.0.0 Index]