% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prepare_annotations_spectra.R
\name{prepare_annotations_spectra}
\alias{prepare_annotations_spectra}
\title{Prepare annotations MS2}
\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{
\item{input}{Input file}

\item{output}{Output file}

\item{str_stereo}{File containing structures stereo}

\item{str_met}{File containing structures metadata}

\item{str_nam}{File containing structures names}

\item{str_tax_cla}{File containing Classyfire taxonomy}

\item{str_tax_npc}{File containing NPClassifier taxonomy}
}
\value{
The path to the prepared spectral annotations
}
\description{
This function prepares the spectral matches
obtained previously to make them compatible
}
\examples{
\dontrun{
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)
}
}
