Instruments and measurements · What you can do here
Preprocess an untargeted LC-MS feature table
Convert an untargeted LC-MS feature table into an analysis-ready matrix using label-free diagnostics, blank and detection filtering, LOESS drift correction evaluated on held-out QCs, and matrix-specific normalisation.
What this involves
Raw feature tables from untargeted LC-MS experiments contain analytical artefacts: instrumental drift across run orders, background contaminants from solvents or collection plastics, redundant adducts and in-source fragments, and artificial low values introduced by gap filling. Preparing this data for statistical analysis requires systematic filtering and correction without biasing your downstream biological comparisons. The platform's research agent executes this standard in R on an isolated environment, handling the computation and returning normalised matrices and diagnostic reports directly to you.
Doing this properly requires strict adherence to three rules. First, study group labels are never used during filtering or drift correction; conditioning adjustments on experimental outcomes introduces circularity. Second, data quality and drift correction efficacy are assessed strictly on held-out quality control (QC) injections, because in-fit QC metrics artificially flatter the result. Third, all parameter thresholds, sample counts, and feature attrition numbers are recorded so every preprocessing stage can be reconstructed.
The workflow ingests feature tables and metadata from software such as Compound Discoverer, checks sample acquisition chronologies, removes contaminants via blank and gap-fill detection thresholds, applies QC-based robust LOESS signal correction (QC-RLSC), flags redundancy using RAMClustR, and normalises intensities according to sample matrix type (such as plasma, serum, urine, or stool).
How it goes
- 1Ingestion, validation, and run diagnosticsThe agent verifies metadata integrity, confirms abundance scales, and resolves chronological run order from acquisition timestamps rather than sample indices. Batches are defined by acquisition gaps exceeding 2 hours, and potential confounding between injection order and study groups is tested using a Kruskal-Wallis test.
- 2Blank and detection filteringOn linear area scales, features are removed if the mean QC area is less than 3 times the mean blank area. Features must also be detected as genuine peaks (distinguished from trace or simulated noise via gap-fill status) in at least 10% of biological samples, without considering group labels.
- 3Drift correction (QC-RLSC)Within each batch containing at least 10 QCs, LOESS curves (degree 2, spans 0.5 to 1.0) are fitted on log10 areas across run time. A feature is corrected only if leave-one-out prediction on held-out QCs outperforms a flat mean line, using boundary pinning to prevent extrapolation.
- 4QC-RSD filtering and redundancy groupingFeatures are retained based on held-out QC relative standard deviation thresholds (≤25% for plasma, serum, dried blood spots, and urine; ≤30% for stool or other matrices). Passed features are grouped per polarity using RAMClustR to annotate redundant adducts and fragments without merging them.
- 5Annotation scoring and matrix normalisationIdentifications are mapped to Metabolomics Standards Initiative (MSI) levels 1 to 5, using spectral entropy matching (similarity ≥ 0.75, fragment mass error within 5 ppm) for library matches. Intensities are normalised by matrix type (sample weight for stool, median or PQN for blood, creatinine or PQN for urine) before log-transformation.
Start it here
Ask in plain language. The agent works on a Linux machine of its own — it installs and runs what the job needs, keeps every file, and reads the results back with the numbers explained. Nothing to set up, and a long run continues after you close the page.
What to watch for
- Never determine run order from sample index numbers, as they frequently reflect sample preparation order rather than actual instrument injection sequence.
- Zero or negative values on the linear scale must not be transformed into log space, as zero-filled missing values become artificial extreme numbers.
- Do not assess drift correction using in-fit QC-RSD values, because the fitted LOESS curve artificially minimises variance across the points that trained it.
- Never use experimental group labels or class designations inside batch correction algorithms, as this can manufacture false differences or eliminate true biological effects.
- Do not merge or drop correlated features based on RAMClustR groupings or shared retention times, but retain cluster assignments as metadata only.
- Ensure that biological samples prior to the first QC or after the final QC are pinned to the nearest QC value rather than adjusted using curve extrapolation.
What it runs
Databases it can query
nf-core pipelines
Questions
Do I need to install anything to preprocess an untargeted lc-ms feature table?
No. The research agent does this work on a Linux machine of its own — it installs what the job needs, keeps the files, and reads the results back to you. Long runs continue if you close the page.
How are missing values handled across different biological matrices?
Handling depends on the underlying biology: blood matrices with values below detection limits can tolerate low-value limit-of-detection style imputation, whereas missingness in stool often reflects genuine biological absence of a producing microbe and is flagged without noise imputation.
What happens if blank injections or gap-fill flags are absent from my data?
If blank injections are missing, the blank filter is bypassed and potential laboratory contaminants remain unflagged. If gap-fill status is absent, the detection filter is skipped with a clear notice in the report that filled noise could not be distinguished from measured peaks.
How does spectral entropy matching verify Level 2 compound annotations?
Centroided MS/MS spectra are cleaned, weighted if entropy is below 3, and compared against reference spectra using spectral entropy calculations. Matches require an entropy similarity of at least 0.75 alongside precursor mass errors within 5 ppm, accompanied by mirror plots.
What files are provided upon completion of the preprocessing pipeline?
You receive a linear-scale filtered feature table, a normalised log-transformed table, a sample metadata table with run orders, an annotated feature table with MSI confidence levels and RAMClustR groups, and an executive Markdown report containing diagnostic plots.
Written from the method the research agent follows for this work and the documentation of the tools listed above. Statements citing a figure that does not appear there are removed before publication. Corollary is a non-commercial research demonstration; results are not for clinical use.