Skip to main content
Metabolomics Data Tables have their own pre-processing parameters, in the PREPROC section of each analysis module. To learn more about Metabolomics Data Tables supported on Cosmos-Hub and see how they are structured, see Metabolomics Data. Metabolomics Data Tables have properties that most statistical methods do not expect, so they need to be pre-processed before any analysis. The main ones are:
  • Sparsity. Some metabolites are too low to be measured in part of the samples, so the table contains zeros, empty cells and codes such as <LOD. Many methods cannot use a table with gaps, and the way the gaps are filled changes the result.
  • Technical variation between samples. Samples differ for reasons that are not biological, for example when one stool extract is more concentrated than another, or when the instrument signal drifts during a long run. These differences can hide a biological effect or create one that does not exist.
  • Wide range of values. Metabolite values cover several orders of magnitude and are usually skewed, so a few very abundant metabolites can dominate a distance or a model.

Three types of Metabolomics Data Tables

The defaults of the pre-processing parameters depend on the type of Data Table selected in Analysis metric. The defaults for each Data Table are listed in Recommended Pre-processing parameters.

Targeted quantified

Calibrated concentrations of known metabolites, for example in ng/mL, usually with LOD, LOQ and ULOQ values. Imported as Targeted Counts.

Targeted peak areas

Signal intensities of known metabolites, not converted into concentrations.

Untargeted peak areas

Signal intensities of all detected features, each with an annotation level.

MBS Pre-processing Pipeline

Each pre-processing parameter controls one step of the pre-processing pipeline. The diagram below shows the order in which the steps run. Hover over a step to see what it does, and click it to open its section.

Analysis metric

Analysis metric selects the Data Table used for the analysis, by the metric in which it expresses metabolite abundance (concentrations, targeted peak areas or untargeted peak areas). The defaults of the other pre-processing parameters depend on this choice, as listed in Recommended Pre-processing parameters.

Level of Annotation

Level of Annotation keeps only the features with the selected annotation levels, among the levels present in your Data Table. In an untargeted MBS Data Table, each feature has an annotation level, which describes how confident the annotation of the molecule is, based on the type of evidence available. Level 1 is the highest confidence, where the identity of the molecule is fully confirmed with an authentic standard (a pure reference compound measured with the same method). Each higher level means lower confidence, down to features identified only by their accurate mass. Features without a level (NA) were detected but not annotated.

What each annotation level contains

Information available at each annotation level.
Level of Annotation is shown only for untargeted peak areas, when the Data Table has an annotation_level column. If none of the features has a selected level, the analysis stops with an error, so select at least one level present in your data.

Zero handling

Zero handling decides whether metabolites reported with zero abundance in the Data Table should be treated as missing values (NA) or as values below the limit of detection (LOD).With both options, a zero counts as “not detected” in the Prevalence threshold step.

Below LOD

Below LOD sets whether values below the limit of detection (LOD) of each metabolite are kept as measured, set to missing (NA), or imputed with a fraction of the LOD. The LOD is the lowest amount of a metabolite that the instrument can distinguish from the background noise. Below the LOD, the metabolite cannot be told apart from the noise, so it may be absent or present at a very low level. A value is below the LOD when the table reports <LOD (or ND, not detected) instead of a number, or when the number is lower than the LOD of that metabolite.LOD/2 and LOD/√2 are both common conventions. LOD/√2 is often used when the values of a metabolite are not strongly skewed, and LOD/2 when they are. With every option, values below the LOD count as “not detected” in the Prevalence threshold step.
The LOD, LOQ and ULOQ steps run only when the table has at least one of these columns. Without them, cells with <LOD become missing values and follow NA handling.

Between LOD and LOQ

Between LOD and LOQ sets whether values between the limit of detection (LOD) and the limit of quantification (LOQ) of each metabolite are kept as measured, set to missing (NA), or imputed with half the LOQ. The LOQ is the lowest amount of a metabolite that can be measured with acceptable precision. Between the LOD and the LOQ, the metabolite is present, but its amount has a larger measurement error. The table reports <LOQ, or a number equal to or above the LOD and below the LOQ.Keeping these values uses more of the data, including the signal of low abundance metabolites. Removing them leaves only precise values, but can remove a large part of the measurements for these metabolites.With every option, values between the LOD and the LOQ count as “detected” in the Prevalence threshold step.

Above ULOQ

Above ULOQ sets whether values above the upper limit of quantification (ULOQ) of each metabolite are kept as measured, set to missing (NA), or capped at the ULOQ. The ULOQ is the highest amount of a metabolite that can be measured reliably, which is the highest point of the calibration curve. Above the ULOQ, the detector can be saturated, so the reported amount is often lower than the true one. The table reports >ULOQ, or a number above the ULOQ.The choice matters when a metabolite is very abundant in some samples, for example a dietary compound after an intervention.With every option, values above the ULOQ count as “detected”. If many samples are above the ULOQ, measuring diluted samples again in the lab gives more reliable values than any of these options.

NA handling

NA handling sets whether the missing values (NA) left after the previous steps are kept, imputed, or removed by dropping the features or samples that contain them. Several methods, such as PCA, PLS-DA and the machine learning models, cannot use a table with gaps.
Remove features with missing values and Remove samples with missing values can remove a large part of the table when missing values are common. Check how many features and samples are left before you interpret the results.

Random seed (available when NA handling is set to Replace with a random value)

Random seed (called Imputation seed in PLS-DA) sets the seed of the random number generator used for random imputation. The same seed always returns the same imputed values, so the analysis is reproducible.Default · 42

NA constant value (available when NA handling is set to Replace with a constant value)

NA constant value sets the constant used to impute every missing value, from 0 to 1.Default · 0

Collapse features by

Collapse features by aggregates the features that share the same value in the selected feature column, for example the same name, by summing their abundances. One metabolite can appear as several features, for example as different ions of the same molecule in untargeted data. These duplicates count the same metabolite more than once in distances, models and statistical tests.
Features with no value in the selected column are merged together into one feature called unknown. In untargeted data, for example, collapsing by name merges all the features that have no name.

Prevalence threshold

Prevalence threshold filters out the features detected in fewer than the selected proportion of samples. Prevalence is the proportion of samples in which a feature is detected. A feature is detected in a sample when its value is not zero, not below the LOD and not missing. Values between the LOD and the LOQ and values above the ULOQ count as detected.Features detected in only a few samples carry little information. Most of their values are replaced or missing, and each of them adds a statistical test, which makes the correction for multiple testing stricter. Removing them makes the results more robust. A threshold that is too high can remove metabolites present in only one group, for example a drug metabolite found only in treated mice.After this step, the features and the samples left with no values are removed from the table.

Normalization

Normalization rescales each sample by a sample-specific factor, to correct for differences between samples that are not biological, such as sample amount or dilution. The total signal of a sample depends on technical factors, such as the amount of material extracted, the dilution of the extract and the sensitivity of the instrument on that day. Without a correction, a sample with more material shows higher values for all metabolites, and this can look like a biological effect.

External factor column (available when Normalization is set to External factor)

External factor column selects the sample metadata column used as the normalization factor, for example the mass of each stool sample.

Internal standard feature (available when Normalization is set to Internal standard feature)

Internal standard feature selects the feature used as the normalization factor in each sample. An internal standard is a known amount of a compound added to every sample before the measurement.

Transformation

Transformation applies a mathematical function, such as a logarithm, to every value, to reduce skewness and stabilise the variance. Metabolite values are usually skewed, with many low values and a few very high ones, and the variation of a metabolite often grows with its level. Many statistical tests and models work better with values that are more symmetric and have a similar variation across the range.A logarithm gives this, and it turns fold changes into differences, so a doubling has the same size at any level.A logarithm cannot take zero or missing values. Before the transformation, zeros, negative values and missing values are replaced with the LOD of the feature. When the table has no LOD column, they are replaced with half the lowest positive value of that feature.

Scaling

Scaling rescales each feature to a comparable range, which sets how much weight each feature has in the analysis. After the transformation, the features can still have very different variation. Methods based on variation, such as PCA and PLS-DA, are then driven by the features that vary the most, which are not always the most relevant ones in biology.
Select the type of Data Table to see the recommended value of each pre-processing parameter. These values are also the defaults that the modules set for each Data Table.
Some analysis modules change these defaults because their method needs it:
  • PCA Explorer removes the features with missing values, applies no normalization and no transformation, and uses Unit variance (autoscaling).
  • PLS-DA applies no normalization and no transformation, and uses Unit variance (autoscaling).
  • ML Classification uses Unit variance (autoscaling).
  • ML Regression uses Unit variance (autoscaling) and removes the samples with no value for the target variable.
  • Alpha diversity skips zero handling, keeps missing values and applies no normalization, transformation or scaling, because richness only counts which metabolites are detected. Its PREPROC section shows only Analysis metric, Level of Annotation, Collapse features by and Prevalence threshold.
Heatmap, Bar Charts and Univariate comparison use the defaults of the Data Table.