Learn R Programming

specmine (version 4.0.0)

Metabolomics and Spectral Data Analysis and Mining

Description

Provides methods for metabolomics and spectral data analysis, including data import, preprocessing, visualization, univariate and multivariate analysis, machine learning, feature selection, and pathway analysis. The package supports analytical workflows for different data types used in metabolomics and spectroscopy. Some optional functionality uses the suggested packages 'cyjShiny' and 'specmine.datasets'. The package 'specmine.datasets' is maintained separately at .

Copy Link

Version

Install

install.packages('specmine')

Monthly Downloads

408

Version

4.0.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Pedro Fontão

Last Published

September 8th, 2026

Functions in specmine (4.0.0)

create_pathway_with_reactions

Creates the pathway, with reactions included in the nodes
dataset_from_peaks

Create a dataset from peak lists
create_dataset

Create dataset
impute_nas_value

Impute missing values with a constant
get_x_values_as_text

Get x values as text
get_metabPaths_org

Get vector with paths numbers that occur in the given organism, named with the full path name:
get_files_list_per_assay

Auto-exported function: get_files_list_per_assay
merge_data_metadata

Merge data and metadata
ica_analysis_dataset

ICA analysis
count_missing_values_per_sample

Count missing values per sample
pca_pairs_plot

PCA pairs plot
pca_pairs_kmeans_plot

PCA pairs plot with k-means clusters
pca_plot_3d

Auto-exported function: pca_plot_3d
pca_robust

Robust PCA analysis
convert_keggpathway_2_reactiongraph

Convert KEGGPathway object to graph object
get_metabolights_study_samples_files

Get sample-file mapping for one MetaboLights assay
get_metabolights_study_metadata_assay

Get metadata for one MetaboLights assay
convert_multiple_spcmnm_to_kegg

Get kegg codes from spcmnm codes:
ica_scoresplot3D

ICA 3D scores plot
ica_kmeans_plot3D

ICA 3D k-means plot
ica_kmeans_plot2D

ICA 2D k-means plot
raman_normalize

Normalize Raman or SERS spectra
raman_find_peaks

Find peaks in Raman or SERS spectra
metabolights_studies_list

List public MetaboLights studies
ica_loadingsplot

ICA loadings plot
get_cpd_names

Get compound names from KEGG codes
filter_feature_selection

Feature Selection Using Univariate Filters
get_OrganismsCodes

Get code, t number, full name and phylogeny of all organisms in KEGG:
peak_detection2d

Detect peaks in 2D NMR spectra
pca_importance

PCA component importance
pca_biplot3D

PCA 3D biplot
impute_nas_knn

Impute missing values with kNN
feature_selection

Auto-exported function: feature_selection
get_MetabolitePath

Returns an object of KEGGPathway of the pathway especified in pathcode
flat_pattern_filter

Flat pattern filter
get_paths_with_cpds_org

Get only the paths of the organism that contain given compounds:
pca_kmeans_plot2D

PCA 2D k-means plot
get_peak_values

Auto-exported function: get_peak_values
get_metabolights_study

Download a complete MetaboLights study
ica_pairs_kmeans_plot

ICA pairs k-means plot
pca_analysis_dataset

Classical PCA analysis
pca_biplot

PCA biplot
missingvalues_imputation

Missing values imputation
ica_scoresplot2D

ICA 2D scores plot
multiClassSummary

Multi-class summary metrics
ica_pairs_plot

ICA pairs plot
pathway_analysis

Creates the pathway wanted. If any of the given compounds is present in the pathway, it is coloured differently.
raman_crop_spectra

Crop Raman or SERS spectra to a wavenumber interval
read_metadata

Reads metadata from a CSV file
raman_despike

Remove spikes from Raman or SERS spectra
read_dataset_dx

Read a dataset from JDX files
read_dataset_csv

Reads a dataset from CSV files
read_spc_nosubhdr

Import for Thermo Galactic's spc file format These functions allow to import .spc files. A detailed description of the .spc file format is available at
read_csvs_folder

Read all CSV peak files in a folder
raman_align_peaks

Align detected peaks across spectra into wavenumber bins
raman_normalize_peak_features

Normalize peak feature matrix
impute_nas_mean

Impute missing values with mean
get_metabolights_study_files_assay

Download files for one MetaboLights assay
impute_nas_median

Impute missing values with median
raman_transform_fourier

Extract Fourier power features from Raman or SERS spectra
remove_metadata_variables

Remove metadata variables
raman_sgolay_derivative

Compute Savitzky-Golay second derivative of Raman or SERS spectra
read_multiple_csvs

Read multiple CSV peak files
pca_scoresplot3D

PCA 3D scores plot
pca_scoresplot2D

PCA 2D scores plot
recursive_feature_elimination

Recursive Feature Elimination
subset_metadata

Subset metadata
subset_by_samples_and_xvalues

Subset by samples and x values
raman_transform_wavelet

Extract Haar wavelet features from Raman or SERS spectra
read_ms_spectra

Auto-exported function: read_ms_spectra
subset_random_samples

Subset random samples
train_and_predict

Train a classifier and predict new samples
train_classifier

Train a classifier
subset_samples

Subset samples
pca_screeplot

PCA scree plot
pca_kmeans_plot3D

PCA 3D k-means plot
subset_x_values_by_interval

Subset x values by interval
tsne_scoresplot2D

t-SNE 2D scores plot
tsne_scoresplot3D

t-SNE 3D scores plot
summary_var_importance

Summarise variable importance tables
read_data_csv

Reads a data matrix from a CSV file
pca_scoresplot3D_rgl

PCA 3D scores plot using rgl
read_data_dx

Read JDX spectra files from a folder
subset_samples_by_metadata_values

Subset samples by metadata values
remove_variables_by_nas

Remove variables by NAs
remove_x_values_by_interval

Remove x values by interval
specmine-package

specmine: Metabolomics data analysis tools
spectra_options

Spectra processing options
umap_kmeans_plot3D

UMAP 3D k-means plot
subset_x_values

Subset x values
tsne_pairs_plot

t-SNE pairs plot
tsne_pairs_kmeans_plot

t-SNE pairs k-means plot
remove_data

Remove data
umap_pairs_kmeans_plot

UMAP pairs k-means plot
remove_samples_by_na_metadata

Remove samples by NA metadata
remove_data_variables

Remove data variables
tsne_analysis_dataset

t-SNE analysis
train_models_performance

Train multiple models and compare their performance
umap_pairs_plot

UMAP pairs plot
remove_samples_by_nas

Remove samples by NAs
umap_scoresplot2D

UMAP 2D scores plot
tsne_kmeans_plot3D

t-SNE 3D k-means plot
remove_samples

Remove samples
tsne_kmeans_plot2D

t-SNE 2D k-means plot
umap_kmeans_plot2D

UMAP 2D k-means plot
umap_scoresplot3D

UMAP 3D scores plot
umap_analysis_dataset

UMAP analysis
aov_all_vars

Analysis of variance
convert_hmdb_to_kegg

Get kegg codes from hmdb codes:
airPLS_fast_dataset

Baseline correction of Raman and SERS spectra using airPLS
aov_one_var

Analysis of variance for one variable
count_missing_values_per_variable

Count missing values per variable
count_missing_values

Count missing values
apply_by_groups

Apply by groups
convert_chebi_to_kegg

Get kegg codes from chebi codes:
baseline_correction

Auto-exported function: baseline_correction
convert_from_chemospec

Auto-exported function: convert_from_chemospec
aggregate_samples

Aggregate samples
apply_by_group

Apply by group
get_samples_names_dx

Auto-exported function: get_samples_names_dx
get_x_label

Get x label