Spectral processing for profiling data
tar_profiling.Rd
Targets for spectral processing of profiling data.
Usage
tar_profiling(
name,
technique,
mzML = NULL,
sample_info = NULL,
cls = "class",
parameters = NULL,
plots = c("chromatogram", "TIC"),
summary = TRUE,
export_path = "exports/spectral_processing"
)
Arguments
- name
Symbol. The name for the collection of targets. This serves as a prefix for target names.
- technique
The profiling technique to use. Should be one of the values returned by
profilePro::availableTechniques()
.- mzML
A character vector of mzML data file paths. If
NULL
, target input will be expected from an existing target. See details.- sample_info
A tibble containing the sample information. See details for the specifications. If
NULL
, target input will be expected from an existing target. See details.- cls
Sample information column to use for plotting.
- parameters
S4 object of class
ProfileParameters
. IfNULL
, default parameters for argumenttechnique
will be used.- plots
A character vector of plot types. Set to
NULL
to skip all plots.- summary
Boolean. Include additional summary targets.
- export_path
Destination path of export files. Set to
NULL
to skip exports.
Details
Specifying arguments mzML
and sample_info
as NULL
enables the use of one of the data file and sample information from one of the input target factories, tar_input_file_path()
, tar_input_grover()
or tar_input_piggyback()
. See the example using tar_input_piggyback()
below.
Examples
if (FALSE) {
## Perform profiling processing by specifying the file paths and sample information directly
targets::tar_dir({
targets::tar_script({
library(hrmtargets)
file_paths <- metaboData::filePaths('RP-UHPLC-HRMS','BdistachyonEcotypes',
ask = FALSE)
sample_info <- metaboData::runinfo('RP-UHPLC-HRMS','BdistachyonEcotypes',
ask = FALSE)
list(
tar_profiling(example,
technique = 'LCMS-RP',
mzML = file_paths,
sample_info = sample_info)
)
})
targets::tar_make()
targets::tar_read(example_results_spectral_processing)
targets::tar_read(example_plot_chromatogram)
})
## Perform spectral binning by using tar_input_piggyback()
targets::tar_dir({
targets::tar_script({
name <- rlang::expr(example)
library(hrmtargets)
file_paths <- metaboData::filePaths('RP-UHPLC-HRMS','BdistachyonEcotypes',
ask = FALSE)
sample_info <- metaboData::runinfo('RP-UHPLC-HRMS','BdistachyonEcotypes',
ask = FALSE)
list(
tar_input_file_path(!!name,
file_paths,
sample_info),
tar_profiling(!!name,
'LCMS-RP')
)
})
targets::tar_make()
targets::tar_read(example_results_spectral_processing)
targets::tar_read(example_plot_chromatogram)
})
}