Package 'SpectraToQueries'

Title: Spectra to queries
Description: SpectraToQueries provides the infrastructure to translate spectra to queries
Authors: Adriano Rutz [aut, cre] , Sarah Szwarc [ctb]
Maintainer: Adriano Rutz <[email protected]>
License: GPL (>= 3)
Version: 0.0.9000
Built: 2024-11-22 11:21:50 UTC
Source: https://github.com/spectra-to-knowledge/SpectraToQueries

Help Index


Create directory

Description

This function creates a directory at the specified path if it does not already exist.

Usage

create_dir(export)

Arguments

export

Path to the directory to be created

Value

Message indicating the status of directory creation

Source

https://github.com/taxonomicallyinformedannotation/tima/blob/main/R/create_dir.R


Create matrix

Description

Create matrix

Usage

create_matrix(spectra, zero_val = 0, name)

Arguments

spectra

Spectra

zero_val

Zero value

name

Name

Examples

NULL

Filter matrix

Description

Filter matrix

Usage

filter_matrix(matrix, n)

Arguments

matrix

Matrix

n

N

Examples

NULL

Fix binned mzs

Description

Fix binned mzs

Usage

fix_binned_mzs(binned_m, original_mzs, dalton, ppm, decimals)

Arguments

binned_m

binned_matrix

original_mzs

original mzs

dalton

dalton

ppm

PPM

decimals

decimals

Examples

NULL

Generate combinations

Description

Generate combinations

Usage

generate_combinations(x, max_ions)

Arguments

x

x

max_ions

Max ions

Examples

NULL

Perform list of queries (progress)

Description

Perform list of queries (progress)

Usage

generate_combinations_progress(indices, ions_list, max_ions)

Arguments

indices

Indices

ions_list

Ions list

max_ions

Max ions

Examples

NULL

Harmonize mzs

Description

Harmonize mzs

Usage

harmonize_mzs(spectra, dalton, ppm)

Arguments

spectra

Spectra

dalton

Dalton

ppm

PPM

Examples

NULL

Normalize peaks

Description

Normalize peaks

Usage

normalize_peaks()

Examples

NULL

Perform list of queries

Description

Perform list of queries

Usage

perform_list_of_queries(index, ions_list, spectra, dalton = 0.01, ppm = 25)

Arguments

index

Index

ions_list

Ions list

spectra

Spectra

dalton

Dalton

ppm

PPM

Examples

NULL

Perform list of queries (progress)

Description

Perform list of queries (progress)

Usage

perform_list_of_queries_progress(
  indices,
  ions_list,
  spectra,
  dalton = 0.01,
  ppm = 25
)

Arguments

indices

Indices

ions_list

Ions list

spectra

Spectra

dalton

Dalton

ppm

PPM

Examples

NULL

Perform query

Description

Perform query

Usage

perform_query(spectra, frags, nls, dalton = 0.01, ppm = 25)

Arguments

spectra

Spectra

frags

Fragments

nls

Neutral losses

dalton

Dalton

ppm

PPM

Examples

NULL

Spectra to queries

Description

This function converts spectra to queries.

Usage

spectra_to_queries(
  spectra = NULL,
  export = "data/interim/queries.tsv",
  beta = 0.5,
  dalton = 0.01,
  decimals = 4L,
  intensity_min = 0L,
  ions_max = 10L,
  n_skel_min = 5L,
  n_spec_min = 3L,
  ppm = 20L,
  senspe_min = 0.1,
  sensitivity_min = 0L,
  specificity_min = 0L,
  zero_val = 0L
)

Arguments

spectra

Spectra path

export

Export path

beta

Beta parameter of the F-score calculation

dalton

Tolerance in Dalton. Default to 0.01

decimals

Number of decimals for rounding. Default to 4

intensity_min

Minimal intensity. Default to 0

ions_max

Maximal number of ions in the query. Default to 10

n_skel_min

Minimal number of individuals per skeleton. Default to 5

n_spec_min

Minimal number of individuals where a signal has to be found. Default to 3

ppm

Tolerance in parts per million Default to 25

senspe_min

Minimal product of inner and outer ratios. Default to 0.1

sensitivity_min

Minimal sensitivity. Default to 0.3

specificity_min

Minimal specificity. Default to 0

zero_val

Zero value for intensity. Default to 0

Value

A file with diagnostic query ions

Examples

NULL