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 |
This function creates a directory at the specified path if it does not already exist.
create_dir(export)
create_dir(export)
export |
Path to the directory to be created |
Message indicating the status of directory creation
https://github.com/taxonomicallyinformedannotation/tima/blob/main/R/create_dir.R
Create matrix
create_matrix(spectra, zero_val = 0, name)
create_matrix(spectra, zero_val = 0, name)
spectra |
Spectra |
zero_val |
Zero value |
name |
Name |
NULL
NULL
Filter matrix
filter_matrix(matrix, n)
filter_matrix(matrix, n)
matrix |
Matrix |
n |
N |
NULL
NULL
Fix binned mzs
fix_binned_mzs(binned_m, original_mzs, dalton, ppm, decimals)
fix_binned_mzs(binned_m, original_mzs, dalton, ppm, decimals)
binned_m |
binned_matrix |
original_mzs |
original mzs |
dalton |
dalton |
ppm |
PPM |
decimals |
decimals |
NULL
NULL
Generate combinations
generate_combinations(x, max_ions)
generate_combinations(x, max_ions)
x |
x |
max_ions |
Max ions |
NULL
NULL
Perform list of queries (progress)
generate_combinations_progress(indices, ions_list, max_ions)
generate_combinations_progress(indices, ions_list, max_ions)
indices |
Indices |
ions_list |
Ions list |
max_ions |
Max ions |
NULL
NULL
Harmonize mzs
harmonize_mzs(spectra, dalton, ppm)
harmonize_mzs(spectra, dalton, ppm)
spectra |
Spectra |
dalton |
Dalton |
ppm |
PPM |
NULL
NULL
Normalize peaks
normalize_peaks()
normalize_peaks()
NULL
NULL
Perform list of queries
perform_list_of_queries(index, ions_list, spectra, dalton = 0.01, ppm = 25)
perform_list_of_queries(index, ions_list, spectra, dalton = 0.01, ppm = 25)
index |
Index |
ions_list |
Ions list |
spectra |
Spectra |
dalton |
Dalton |
ppm |
PPM |
NULL
NULL
Perform list of queries (progress)
perform_list_of_queries_progress( indices, ions_list, spectra, dalton = 0.01, ppm = 25 )
perform_list_of_queries_progress( indices, ions_list, spectra, dalton = 0.01, ppm = 25 )
indices |
Indices |
ions_list |
Ions list |
spectra |
Spectra |
dalton |
Dalton |
ppm |
PPM |
NULL
NULL
Perform query
perform_query(spectra, frags, nls, dalton = 0.01, ppm = 25)
perform_query(spectra, frags, nls, dalton = 0.01, ppm = 25)
spectra |
Spectra |
frags |
Fragments |
nls |
Neutral losses |
dalton |
Dalton |
ppm |
PPM |
NULL
NULL
This function converts spectra to queries.
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 )
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 )
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 |
A file with diagnostic query ions
NULL
NULL