Function reference
Annotation sources
An annotation source
is the dataset object used by all MetMashR objects. Different types of source have been defined, depending on the intended use of the data.
-
CompoundDb_source()
- Import CompDB source
-
MetFrag_source()
- LCMS table
-
annotation_source()
- An annotation database
-
cd_source()
- LCMS table
-
import_source()
- Import_source
-
ls_source()
- LCMS table
-
mspurity_source()
- msPurity source
-
read_source()
- Import annotation source
Annotation tables
Annotation tables represent the data imported from a source that includes experimentally measured data. Annotation tables are extended to support the specifics of an analytical platform used to collect the data.
-
annotation_table()
- An annotation table
-
lcms_table()
- An annotation table
Annotation databases
Annotation databases are (often remote) sources of annotation related meta data, such as molecular identifiers, pathways etc.
-
BiocFileCache_database()
- Cached database
-
MTox700plus_database()
- MTox700plus_database
-
PathBank_metabolite_database()
- PathBank_metabolite_database
-
annotation_database()
- An annotation database
-
mwb_refmet_database()
- mwb_refmet_database
-
rds_database()
- rds database
-
read_database()
- Read a database
-
sqlite_database()
- SQLite database
-
write_database()
- Write to a database
-
is_writable()
- Is database writable
REST API interfaces
MetMashR includes a REST API object that has been extended to accomodate various services.
-
rest_api()
- rest_api
-
classyfire_lookup()
- Query ClassyFire database
-
database_lookup()
- ID lookup by database
-
hmdb_lookup()
- Compound ID lookup via pubchem
-
kegg_lookup()
- Convert to or from kegg identifiers
-
lipidmaps_lookup()
- LipidMaps api lookup
-
mwb_compound_lookup()
- Convert to/from kegg identifiers
-
opsin_lookup()
- Compound ID lookup via OPSIN
-
pubchem_compound_lookup()
- Compound ID lookup via PubChem
-
pubchem_property_lookup()
- Compound property lookup via pubchem
Annotation table mashing
These models provide steps for cleaning, filtering, prioritising and combining annotation tables from different sources.
-
add_columns()
- Add columns
-
add_labels()
- Add column of labels
-
calc_ppm_diff()
- Calculate ppm difference
-
calc_rt_diff()
- Calculate RT difference
-
combine_columns()
- Combine several columns into a single column.
-
combine_sources()
- Combine annotation sources (tables)
-
vertical_join()
- Join sources vertically
-
combine_records()
- Combine annotation records (rows)
-
filter_labels()
- Filter by factor labels
-
filter_range()
- Filter by range
-
filter_na()
- Filter by range
-
filter_venn()
- Filter by factor levels
-
id_counts()
- id counts
-
mz_match()
- mz matching
-
rt_match()
- rt matching
-
mzrt_match()
- mz matching
-
normalise_lipids()
- Normalise Lipids nomenclature
-
normalise_strings()
- Normalise string
-
trim_whitespace()
- Trim whitespace
-
concatenate_columns()
- Concatenate columns
Combining records
Combining records is an important step in the annotation mashing workflow. These functions can be used with the combine_records function to merge the information for multiple records in different ways.
-
.mode()
.mean()
.median()
.collapse()
.select_max()
.select_min()
.select_match()
.select_exact()
.unique()
.prioritise()
.nothing()
.count()
.select_grade()
- Combine records helper functions
Charts
Chart objects are wrappers around ggplot objects plots useful for exploring and visualising the information present in a table of annotations.
-
mwb_structure()
- MWB molecular structure
-
openbabel_structure()
- OpenBabel molecular structure
-
pubchem_structure()
- PubChem molecular structure
-
annotation_bar_chart()
- Annotation pie chart
-
annotation_pie_chart()
- Annotation pie chart
-
annotation_venn_chart()
- Annotation venn chart
-
annotation_histogram()
- Annotation histogram
-
annotation_histogram2d()
- Annotation 2D histogram
-
pubchem_widget()
- PubChem widget
BiocFileCache_database helper functions
These functions can be used with BiocFileCache_database objects to modify a dowloaded resource before caching, or to parse the downloaded resource when retrieved from the cache.
-
.cache_as_is()
- Cache file with no changes using BiocFileCache
-
.unzip()
- Unzip file before caching with BiocFileCache_database
Dictionaries for normalising strings
These lists define patterns and replacements to match when using the normalise_strings object.
-
.greek_dictionary
- Greek dictionary
-
.racemic_dictionary
- Racemic dictionary
-
.tripeptide_dictionary
- Tripeptide dictionary
-
struct_venn_set()
- Annotation venn chart
-
check_for_columns()
- Check for columns in an
annotation_source