As explained in the Chromatograms
class documentation, the Chromatograms
object is a container for chromatogram data that includes chromatographic
peaks data (retention time and related intensity values, also referred to
as peaks data variables in the context of Chromatograms
) and metadata of
individual chromatograms (so called chromatograms variables).
The peaks data variables information can be accessed using the
peaksData()
function. It is also possible to access specific
peaks variables using $
.
peaks
can be accessed, replaced but also filtered/subsetted. Refer to
the sections below for more details.
# S4 method for class 'Chromatograms'
peaksData(
object,
columns = peaksVariables(object),
f = processingChunkFactor(object),
BPPARAM = bpparam(),
drop = FALSE,
...
)
# S4 method for class 'Chromatograms'
peaksData(object) <- value
# S4 method for class 'Chromatograms'
peaksVariables(object, ...)
# S4 method for class 'Chromatograms'
rtime(object, ...)
# S4 method for class 'Chromatograms'
rtime(object) <- value
# S4 method for class 'Chromatograms'
intensity(object, ...)
# S4 method for class 'Chromatograms'
intensity(object) <- value
# S4 method for class 'Chromatograms'
filterPeaksData(
object,
variables = character(),
ranges = numeric(),
match = c("any", "all"),
keep = TRUE
)
# S4 method for class 'Chromatograms'
applyProcessing(
object,
f = processingChunkFactor(object),
BPPARAM = bpparam(),
...
)
# S4 method for class 'Chromatograms'
addProcessing(object, FUN, ...)
A Chromatograms object.
For peaksData()
accessor: optional character
with column
names (peaks variables) that should be included in the
returned list
of data.frame
. By default, all columns are returned.
factor
defining the grouping to split the Chromatograms
object.
Parallel setup configuration. See BiocParallel::bpparam()
for more information.
logical(1)
default to FALSE
. If TRUE
, and one column is
called by the user, the method returns a list of vector of the
single column requested.
Additional arguments passed to the method.
For rtime()
and intensity()
: numeric
vector with the
values to replace the current values.
For filterPeaksData()
: character
vector with the names
of the chromatogram variables to filter for. The list of available
chromatogram variables can be obtained with peaksVariables()
.
For filterPeaksData()
: a numeric
vector of paired values (upper and lower boundary) that define the
ranges to filter the object
. These paired values need to be in the
same order as the variables
parameter (see below).
For filterPeaksData()
: character(1)
defining whether the condition has to match for all provided
ranges
(match = "all"
; the default), or for any of them
(match = "any"
).
For filterPeaksData()
: logical(1)
defining whether to keep (keep = TRUE
) or remove (keep = FALSE
)
the chromatogram data that match the condition.
For addProcessing()
A function to be added to the
Chromatograms
object's processing queue.
Functions that filter Chromatograms
based on peaks variables
(i.e., peaksData
). These functions remove peaks data that do not meet the
specified conditions. If a chromatogram is filtered, only the corresponding
peaks variable pairs (i.e., rows) in the peaksData
are removed, while the
chromatogram itself remains in the object.
Since peaks data can be quite large, a processing queue is used to ensure
efficiency. The backend data remains unchanged until the processing queue is
applied (e.g., by running applyProcessing()
). When calling peaksData()
,
the processing queue is applied to the output, but the backend data is not
replaced.
The available functions to filter chromatogram data include:
filterPeaksData()
: Filters numerical peaks data variables based on the
specified numerical ranges
. This method returns the same input
Chromatograms
object, but the filtering step is added to the processing
queue. The filtered data will be reflected when the user accesses
peaksData
. This function does not reduce the number of chromatograms
in the object, but it removes the specified peaks data (e.g., "rtime" and
"intensity" pairs) from the peaksData
.
Chromatograms for a general description of the Chromatograms
object, and chromData for accessing,substituting and filtering
chromatographic variables.