| medianCVperCell {scp} | R Documentation |
The function computes for each cell the median CV and stores them
accordingly in the colData of the QFeatures object. The CVs in
each cell are computed from a group of features. The grouping is
defined by a variable in the rowData. The function can be
applied to one or more assays, as long as the samples (column
names) are not duplicated. Also, the user can supply a minimal
number of observations required to compute a CV to avoid that CVs
computed on too few observations influence the distribution within
a cell. The quantification matrix can be optionally normalized
before computing the CVs. Multiple normalizations are possible.
medianCVperCell( object, i, groupBy, nobs = 5, na.rm = TRUE, colDataName = "MedianCV", norm = "none", ... )
object |
A |
i |
A |
groupBy |
A |
nobs |
An |
na.rm |
A |
colDataName |
A |
norm |
A |
... |
Additional arguments that are passed to the normalization method. |
A new column is added to the colData of the object. The samples
(columns) that are not present in the selection i will get
assigned an NA.
A QFeatures object.
Specht, Harrison, Edward Emmott, Aleksandra A. Petelski, R. Gray Huffman, David H. Perlman, Marco Serra, Peter Kharchenko, Antonius Koller, and Nikolai Slavov. 2021. “Single-Cell Proteomic and Transcriptomic Analysis of Macrophage Heterogeneity Using SCoPE2.” Genome Biology 22 (1): 50.
data("scp1")
scp1 <- filterFeatures(scp1, ~ !is.na(Proteins))
scp1 <- medianCVperCell(scp1,
i = 1:3,
groupBy = "Proteins",
nobs = 5,
na.rm = TRUE,
colDataName = "MedianCV",
norm = "div.median")
## Check results
hist(scp1$MedianCV)