library("tima")
copy_backbone()
go_to_cache()
github <- "https://raw.githubusercontent.com/"
repo <- "taxonomicallyinformedannotation/tima-example-files/main/"
data_interim <- "data/interim/"
dir <- paste0(github, repo)
input <- get_params(step = "prepare_annotations_spectra")$files$annotations$raw$spectral$spectral |>
gsub(pattern = ".tsv.gz", replacement = "_pos.tsv", fixed = TRUE)
get_file(url = paste0(dir, input), export = input)
dir <- paste0(dir, data_interim)
prepare_annotations_spectra(
input = input,
str_stereo = paste0(dir, "libraries/sop/merged/structures/stereo.tsv"),
str_met = paste0(dir, "libraries/sop/merged/structures/metadata.tsv"),
str_nam = paste0(dir, "libraries/sop/merged/structures/names.tsv"),
str_tax_cla = paste0(dir, "libraries/sop/merged/structures/taxonomies/classyfire.tsv"),
str_tax_npc = paste0(dir, "libraries/sop/merged/structures/taxonomies/npc.tsv")
)
unlink("data", recursive = TRUE)Prepare annotations MS2
Description
This function prepares MS2 spectral library matching results by standardizing column names, integrating structure metadata, and formatting for downstream TIMA annotation workflows. Handles various spectral matching result formats.
Usage
prepare_annotations_spectra(
input = get_params(step =
"prepare_annotations_spectra")\$files\$annotations\$raw\$spectral\$spectral,
output = get_params(step =
"prepare_annotations_spectra")\$files\$annotations\$prepared\$structural\$spectral,
str_stereo = get_params(step =
"prepare_annotations_spectra")\$files\$libraries\$sop\$merged\$structures\$stereo,
str_met = get_params(step =
"prepare_annotations_spectra")\$files\$libraries\$sop\$merged\$structures\$metadata,
str_nam = get_params(step =
"prepare_annotations_spectra")\$files\$libraries\$sop\$merged\$structures\$names,
str_tax_cla = get_params(step =
"prepare_annotations_spectra")\$files\$libraries\$sop\$merged\$structures\$taxonomies\$cla,
str_tax_npc = get_params(step =
"prepare_annotations_spectra")\$files\$libraries\$sop\$merged\$structures\$taxonomies\$npc
)
Arguments
input
|
Character string path to spectral matching results file |
output
|
Character string path for prepared spectral annotations output |
str_stereo
|
Character string path to structures stereochemistry file |
str_met
|
Character string path to structures metadata file |
str_nam
|
Character string path to structures names file |
str_tax_cla
|
Character string path to ClassyFire taxonomy file |
str_tax_npc
|
Character string path to NPClassifier taxonomy file |
Value
Character string path to prepared spectral annotations