Add metabolomics features to the canonical metabolite reference and mapping tables. Each input row is treated as a metabolite record that may contain multiple identifiers at once, and all non-empty identifier columns are written to the mapping table.
Usage
addMetabolomicsFeatureSet(
conn_handler = NULL,
feature_set,
feature_database = NULL,
verbose = TRUE
)Arguments
- conn_handler
Optional R object obtained from SigRepo::newConnhandler(). If NULL, the stored internal handle is used.
- feature_set
A data frame containing metabolite reference rows. Typical columns include
refmet_id,refmet_name,hmdb_id,smiles,inchikey(orinchi_key),is_current, andversion.- feature_database
Optional metabolomics identifier type used to interpret
feature_name, whenfeature_nameis supplied instead of a dedicated identifier column. One of refmet_id, refmet, hmdb, smiles, or inchikey. This argument does not limit which mappings are inserted; all non-empty identifier columns infeature_setare uploaded tometabolite_xref. If omitted, SigRepo infers a primary identifier type from the non-empty identifier columns infeature_set.- verbose
Logical; whether to print diagnostic messages. Defaults to 'TRUE'
Details
Use this function to load the metabolite reference and mapping tables
themselves. In the current API, feature_database acts only as an input
hint so the function knows how to interpret feature_name if that
generic column is used. It is most relevant when the uploaded table uses
feature_name rather than explicit columns such as hmdb_id or
smiles. When omitted, SigRepo infers the primary identifier type
from the uploaded columns, preferring refmet_id, then
refmet_name, followed by HMDB, SMILES, and InChIKey.
By contrast, feature_database is semantically important in
searchMetabolomicsFeatureSet() and addMetabolomicsSignatureSet(),
where the caller is explicitly choosing which identifier namespace to search
or map against.
Large uploads are inserted in batches to avoid oversized SQL statements.
