compCytof {CATALYST} | R Documentation |
Compensates a mass spectrometry based experiment using a provided spillover matrix & assuming a linear spillover in the experiment.
compCytof(x, y, ...) ## S4 method for signature 'flowFrame,matrix' compCytof(x, y, out_path = NULL, method = "flow", isotope_list = CATALYST::isotope_list) ## S4 method for signature 'flowSet,ANY' compCytof(x, y, out_path = NULL, method = "flow") ## S4 method for signature 'character,matrix' compCytof(x, y, out_path = NULL, method = "flow") ## S4 method for signature 'ANY,data.frame' compCytof(x, y, out_path = NULL, method = "flow")
x |
a |
y |
a spillover matrix. |
... |
optional arguments. |
out_path |
a character string. If specified, compensated FCS files will be generated
in this location. If |
method |
|
isotope_list |
named list. Used to validate the input spillover matrix.
Names should be metals; list elements numeric vectors of their isotopes.
See |
If the spillover matrix (SM) does not contain the same set of columns as the input experiment, it will be adapted according to the following rules:
columns present in the SM but not in the input data will be removed from it
non-metal columns present in the input but not in the SM will be added such that they do neither receive nor cause spill
metal columns that have the same mass as a channel present in the SM will receive (but not emit) spillover according to that channel
if an added channel could potentially receive spillover (as it has +/-1M or +16M of, or is of the same metal type as another channel measured), a warning will be issued as there could be spillover interactions that have been missed and may lead to faulty compensation
Compensates the input flowFrame
or,
if x
is a character string, all FCS files in the specified location.
If out_path=NULL
(the default), returns a flowFrame
containing the compensated data. Otherwise, compensated data will be written
to the specified location as FCS 3.0 standard files.
Helena Lucia Crowell crowellh@student.ethz.ch and Vito Zanotelli vito.zanotelli@uzh.ch
# get single-stained control samples data(ss_exp) # specify mass channels stained for bc_ms <- c(139, 141:156, 158:176) # debarcode re <- assignPrelim(x = ss_exp, y = bc_ms) re <- estCutoffs(x = re) re <- applyCutoffs(x = re) spillMat <- computeSpillmat(x = re) compCytof(x = ss_exp, y = spillMat)