| MassCsvFileConn-class {biodb} | R Documentation |
This is the connector class for a MASS CSV file database.
addPrecursorFormulae(formulae):
Adds new formulae to the list of formulae used to recognize precursors.
formulae: A character vector containing formulae.
Returned value: None.
getChromCol(ids = NULL):
Gets a list of chromatographic columns contained in this database.
ids: A character vector of entry identifiers (i.e.: accession numbers). Used to restrict the set of entries on which to run the algorithm.
Returned value : A data.frame with two columns, one for the ID 'id' and another one for the title 'title'.
getNbPeaks(mode = NULL, ids = NULL):
Gets the number of peaks contained in the database.
mode: The MS mode. Set it to either 'neg' or 'pos' to limit the counting to one mode.
ids: A character vector of entry identifiers (i.e.: accession numbers). Used to restrict the set of entries on which to run the algorithm.
Returned value: The number of peaks, as an integer.
getPrecursorFormulae():
Gets the list of formulae used to recognize precursors.
Returned value: A character vector containing chemical formulae.
isAPrecursorFormula(formula):
Tests if a formula is a precursor formula.
formula: A chemical formula, as a character value.
Returned value: TRUE if the submitted formula is considered a precursor.
setPrecursorFormulae(formulae):
Sets the list precursor formulae.
formulae: A character vector containing formulae.
Returned value: None.
Super class CsvFileConn and interfaces
BiodbMassdbConn, BiodbWritable and
BiodbEditable.
# Create an instance with default settings:
mybiodb <- biodb::newInst()
# Get path to LCMS database example file
lcmsdb <- system.file("extdata",
"massbank_extract_lcms_2.tsv", package="biodb")
# Create a connector
conn <- mybiodb$getFactory()$createConn('mass.csv.file', url=lcmsdb)
# Get an entry
e <- conn$getEntry('PR010001')
# Terminate instance.
mybiodb$terminate()