import_spectra: Import spectra

View source: R/import_spectra.R

import_spectraR Documentation

Import spectra

Description

This function imports spectra from a file (.mgf or .sqlite)

Usage

import_spectra(
  file,
  cutoff = 0,
  dalton = 0.01,
  polarity = NA,
  ppm = 10,
  sanitize = TRUE
)

Arguments

file

File path of the spectrum file to be imported

cutoff

Absolute minimal intensity

dalton

Dalton tolerance

polarity

Polarity

ppm

PPM tolerance

sanitize

Flag indicating whether to sanitize. Default TRUE

Value

Spectra object containing the imported spectra

Examples

get_file(
  url = get_default_paths()$urls$examples$spectra_mini,
  export = get_default_paths()$data$source$spectra
)
import_spectra(file = get_default_paths()$data$source$spectra)
import_spectra(
  file = get_default_paths()$data$source$spectra,
  sanitize = FALSE
)

taxonomicallyinformedannotation/tima-r documentation built on Nov. 20, 2024, 4:34 a.m.