Consensus structural classifications
tar_construction.Rd
Targets for consensus structural classification
Usage
tar_construction(
name,
x = NULL,
library_path = "data/structural_classifications",
db = "kegg",
organism = character(),
threshold = 50,
classyfireR_cache = "data/structural_classifications/classyfireR_cache.db",
summary = TRUE,
export_path = "exports/structural_classifications"
)
Arguments
- name
Symbol. The name for the collection of targets. This serves as a prefix for target names.
- x
An S4 object of class
Assignment
. IfNULL
, target input will be expected from an existing target. See details.- library_path
the target file path for the classification library in which to store consensus classification data
- db
the databases to search. This can either be
kegg
and/orpubchem
.- organism
the KEGG organism ID. This is Ignored if argument
db
is set topubchem
- threshold
the percentage majority threshold for consensus classification
- classyfireR_cache
the file path for a
classyfireR
cache. See the documentation ofclassyfireR::get_classification
for more details.- summary
Boolean. Include additional summary targets.
- export_path
Destination path of export files. Set to
NULL
to skip exports.
Details
Specifying argument x
as NULL
enables the use of input from the tar_mf_assignment()
target factory, See the second example below.
Examples
if (FALSE) {
## Perform consensus structural classification by specifying assignments directly
targets::tar_dir({
targets::tar_script({
library(hrmtargets)
mf_assignments <- assignments::assignMFs(
assignments::feature_data,
parameters = assignments::assignmentParameters('FIE-HRMS')
)
list(
tar_construction(assignments::feature_data)
)
})
targets::tar_make()
targets::tar_read(example_summary_construction)
})
## Perform consensus structural classification by using inputs from other target factories.
targets::tar_dir({
targets::tar_script({
library(hrmtargets)
name <- rlang::expr(example)
list(
tar_input_piggyback(!!name,
'FIE-HRMS_BdistachyonTechnical',
repo = 'jasenfinch/metaboData'),
tar_spectral_binning(!!name),
tar_pre_treatment(!!name),
tar_mf_assignment(!!name),
tar_construction(!!name)
)
})
targets::tar_make()
targets::tar_read(example_summary_construction)
})
}