Skip to contents

MidarExperiment

Functions to create, access and query MidarExperiment objects, which are the central data object in the MiDAR workflow.

MidarExperiment()
Constructor for the MidarExperiment object.
MidarExperiment-class
S4 Class Representing the MIDAR Dataset
`$`(<MidarExperiment>)
Access Slots of a MidarExperiment Object via $ Syntax
set_analysis_order()
Set Analysis Order
get_batch_boundaries()
Get the start and end analysis numbers of specified batches
exclude_analyses()
Exclude analyses from the dataset
exclude_features()
Exclude features from the dataset
get_analyticaldata()
Get the annotated or the originally imported analytical data
set_intensity_var()
Set default variable to be used as feature raw signal value
get_analysis_count()
Get the number of analyses in the dataset
get_analyis_start()
Get the start time of the analysis sequence
get_analyis_end()
Get the end time of the analysis sequence
get_analysis_breaks()
Get the number of analysis breaks in the analysis
get_analysis_duration()
Get the total duration of the analysis
get_runtime_median()
Get the median run time
get_feature_count()
Get the number of features in the dataset
get_featurelist()
Get feature IDs

Analysis data import

Functions to import analytical data from different sources into MidarExperiment objects. Additionally, the file parser function used internally by these import functions are available for direct use, i.e. to import different analytical data into data frames.

import_data_mrmkit()
Import MRMkit peak integration results
import_data_masshunter()
Import Agilent MassHunter Quantitative Analysis CSV files
import_data_csv()
Import Analysis Results from Plain CSV Files
parse_mrmkit_result()
Parses MRMkit peak integration results into a tibble
parse_masshunter_csv()
Reads and parses one Agilent MassHunter Quant CSV result file
parse_plain_csv()
Reads a long CSV file with Feature Intensities

Metadata import

Functions to import metadata describing the analyses (samples), features (analytes), internal standards and other relevant information from the MiDAR Excel template or CSV files.

import_metadata_analyses()
Import analysis metadata
import_metadata_features()
Import feature metadata
import_metadata_istds()
Import Internal Standards (ISTD) metadata
import_metadata_responsecurves()
Import response curves metadata
import_metadata_qcconcentrations()
Import calibration curves metadata
import_metadata_msorganiser()
Import Metadata from a MIDAR Metadata Organizer file
import_metadata_from_data()
Retrieve Metadata from Imported Analysis Data
save_metadata_templates()
Saves a Excel (xlsx) file with metadata templates
save_metadata_msorganiser_template()
Saves a MiDAR Metadata Organizer template
add_metadata()
Add metadata an MidarExperiment object
assert_metadata()
Add metadata an MidarExperiment object

Isotope correction

Functions to perform type II isotopic correction

correct_interferences()
Apply interference correction
correct_interference_manual()
Manual isotopic interference correction

External Calibration

Function to plot and analyze external calibration curves

quantify_by_calibration()
Calculate concentrations based on external calibration
plot_calibrationcurves()
Plot Calibration Curves
calc_calibration_results()
Calculate external calibration curve results
get_calibration_metrics()
Get Calibration Metrics
get_qc_bias_variability()
Retrieve Calibration Regression Results

Normalization and Quantification

Functions to normalization by internal standards and sample amounts, to calculate analyte concentrations based on internal standards amounts or external calibration curves.

normalize_by_istd()
Normalize Feature Intensities Using Internal Standards
quantify_by_istd()
Calculate Analyte Concentrations Using Internal Standards
quantify_by_calibration()
Calculate concentrations based on external calibration

Drift/Batch Correction

Function for drift and batch correction correction

correct_drift_gaussiankernel()
Drift Correction by Gaussian Kernel Smoothing
correct_drift_cubicspline()
Drift Correction by Cubic Spline Smoothing
correct_drift_loess()
Drift Correction by LOESS Smoothing
correct_drift_gam()
Drift Correction by Generalized Additive Model (GAM) Smoothing
correct_batch_centering()
Batch Centering Correction

Quality Control and Filtering

Functions to calculate feature QC metrics and apply QC filtering, and vizualize the filtering results.

calc_qc_metrics()
Calculate Quality Control (QC) Metrics for Features
filter_features_qc()
Feature Filtering Based on QC Criteria
detect_outlier()
Get list of analyses classified as technical outliers
plot_qc_summary_byclass()
Plot QC Filtering Summary by Feature Class
plot_qc_summary_overall()
Plot Overall QC Filtering Summary

Quality Control Plots

Functions to plots diverse QC visualizatios.

plot_runsequence()
RunSequence Plot
plot_runscatter()
RunScatter Plot
plot_rla_boxplot()
Relative Log Abundance (RLA) Plot
plot_pca()
PCA Plot for Quality Control
plot_normalization_qc()
Compare %CV values before and after normalization
plot_qcmetrics_comparison()
Comparison of two feature QC metrics variables

Response Curves

Functions to calculate and visualize response curves

plot_responsecurves()
Plot Response Curves
get_response_curve_stats()
Linear Regression Statistics of Response Curves

Data Reporting and Sharing

Functions to export processed and raw datasets and the processing steps in different formats.

save_report_xlsx()
Write Data Processing Report (EXCEL)
save_dataset_csv()
Export Data to CSV file
save_feature_qc_metrics()
Save Feature QC Metrics to CSV

Lipidomics

Functions specific to lipidomics data processing and analysis.

get_lipid_class_names()
Get lipid class, species and transition names

Datasets

Example datasets for testing and demonstration.

lipidomics_dataset
Plasma Lipidomics Dataset with Metadata
quant_lcms_dataset
LC-MS Dataset with External Calibration Curve and Metadata
data_load_example()
Load an example MidarExperiment dataset

Helper functions

A collection of functions that may be useful in the context of mass spectrometry is also available.

cv()
Percent coefficient of variation (%CV)
cv_log()
Percent coefficient of variation (%CV) based on log-transformation
calc_average_molweight()
Calculate Average Molecular Weight from Chemical Formulas
save_dataset_csv()
Export Data to CSV file
fun_correct_drift()
Drift Correction by Custom Function
fun_gauss.kernel.smooth()
Gaussian Kernel smoothing helper function
fun_loess()
Loess smoothing helper function
fun_cspline()
Cubic spline smoothing helper function
fun_gam_smooth()
Generalized Additive Model (GAM) smoothing helper function
get_mad_tails()
Get MAD-based tails
order_chained_columns_tbl()
Reorder Data Frame based on a chain of linked values in two columns.