prepare_annotations_spectra: Prepare annotations MS2

View source: R/prepare_annotations_spectra.R

prepare_annotations_spectraR Documentation

Prepare annotations MS2

Description

This function prepares the spectral matches obtained previously to make them compatible

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

Input file

output

Output file

str_stereo

File containing structures stereo

str_met

File containing structures metadata

str_nam

File containing structures names

str_tax_cla

File containing Classyfire taxonomy

str_tax_npc

File containing NPClassifier taxonomy

Value

The path to the prepared spectral annotations

Examples

## Not run: 
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)

## End(Not run)

taxonomicallyinformedannotation/tima-r documentation built on Dec. 20, 2024, 9:32 a.m.