Tool Description
PSMBasedQuantificationTIMs is the PSMBasedQuantification variant for timsTOF runs. On these instruments a peptide ion is a peak in two dimensions, retention time and ion mobility, so the tool extracts the signal around every identification in both dimensions.
How does PSMBasedQuantificationTIMs work?
XIC Point Calculation and Ion Mobility Window
An XIC point is the sum of the intensity of all peaks inside the m/z window (
MzWindow_Da) and inside the ion mobility window (IonMobilityWindow), so both widths are part of the quantity. WithIonMobilityWindowset toWindow.Fixed v, the ion mobility window is ±v around the ion mobility centre of the ion. The centre is the intensity weighted ion mobility of the signal within v of the weighted ion mobility of the identifications, around their weighted scan time (seeCentrePSMs). Without such signal it is the weighted ion mobility of the identifications.Peak Detection and Quantification The points form a retention time ion chromatogram. As PSMBasedQuantification does, the tool detects the peaks on the trace and fits and integrates the peak that contains the weighted scan time of the identifications. The measured isotope pattern of a row (the
KLDivandIsotopicPatterncolumns) is read with the same windows, on the spectrum closest to the fitted scan time.Output
The output has the same layout as the output of PSMBasedQuantification, so the downstream tools do not care which of the two produced it.
InputsFiles and command-line flags
These inputs are needed to execute the tool:
| Flag | Meaning | Comes from |
|---|---|---|
-i |
one or more .mzlite files with ion mobility, or a directory |
MzMLToMzLiteIonMobility |
-ii |
one or more .qpsm files in the PSMStatistics layout, or a directory searched for *.qpsm |
PSMStatistics or MsFraggerToPSM |
-o |
the output directory, created when missing | - |
-d |
the SQLite peptide database | PeptideDB |
-p |
the parameter file in JSON | QuantificationTIMsParams.json |
-mf |
switch: pair files by base name instead of by position | - |
-dc |
switch: write diagnostic charts | - |
-z |
switch: pack the chart directory into a zip file and delete it | - |
-c |
number of runs quantified at the same time, default 1 | - |
- The tool refuses any instrument file whose name does not end in
.mzlite. It reads the qpsm files in the column layout of PSMStatistics, which MsFraggerToPSM writes too, and stops with the missing columns when a file has another layout. The qpsm carries no ion mobility, so the tool reads the ion mobility of every identification from its MS2 spectrum in the mzlite, the spectrum whose id is thePSMId. The tool warns about identifications whose spectrum is missing or has no ion mobility. These identifications do not locate the trace. An ion without any identification with ion mobility gets no row, and the tool stops when no identification of the file has an ion mobility. - With one file per flag the pair is used as given. With lists, the n-th mzlite file is paired with the n-th qpsm file unless you pass
-mf, which pairs files by their base name and skips mzlite files without a partner. - For every run the tool writes
run.quant, tab separated with a header. - With
-dcthe tool writes charts intorun_plots, and-zpacks that directory intorun_plots.zipand deletes it. - Delete an existing
run.quantin the output directory before a rerun, the tool appends to it. Logs go toPSMBasedQuantification_log.txtandrun_log.txtin the output directory.
Parameter fileDefault values and tool settings
The parameter record is shared with PSMBasedQuantification. The following default values are specific to timsTOF runs.
General settings
| Parameter | Default | Description |
|---|---|---|
PerformLabeledQuantification |
Labeling.Unlabeled |
Label free quantification of the identified ion. The three labeled cases work as in PSMBasedQuantification and quantify the partner ion too. |
XicExtraction.ScanTimeWindow |
2.0 |
Half width of the retention time range around the identification that is extracted, in the scan time unit of the run. |
XicExtraction.MzWindow_Da |
Window.Fixed 0.008 |
Half width of the m/z window, in Da. Every peak inside it counts in an XIC point. The m/z correction and Window.Estimate work as in PSMBasedQuantification. |
XicExtraction.XicProcessing |
XicProcessing.Wavelet waveletParams |
Peak detection on the retention time trace, summed over the ion mobility window. The wavelet parameters are listed below. SecondDerivative is the other supported case. Gabor3D is in development and does not work currently. |
XicExtraction.TopKPSMs |
None |
Some k keeps only the k identifications with the highest ModelScore per peptide ion when placing the peak. |
XicExtraction.IonMobilityWindow |
Window.Fixed 0.025 |
Half width v of the ion mobility window around the ion mobility centre of the ion, in 1/K0. Window.Estimate is not available here and stops the tool with an error that asks for Fixed. |
BaseLineCorrection |
Some { MaxIterations = 10; Lambda = 6; P = 0.05 } |
Asymmetric least squares baseline subtraction before peak detection. None skips it. |
QualityFilterLog2Limit |
2.0 |
The quality filter keeps rows with -limit < log2 ((area / median area) / (apex / median apex)) < limit. Rows with a non-finite or non-positive area, apex or ratio are dropped. |
CentrePSMs |
3 |
Number of identifications per peptide ion with an ion mobility, ranked by the summed intensity of their matched fragment ions, whose intensity weighted scan time and ion mobility locate the trace. It is applied after TopKPSMs, which ranks by ModelScore. At least 1. |
RequirePeakAtScanTime |
true |
true quantifies only a peak that contains the weighted scan time of the identifications, so an ion without such a peak gets no row. false takes the peak with the closest apex when no peak contains it. |
The wavelet parameters:
| Parameter | Default | Description |
|---|---|---|
Borderpadding |
None |
Number of points padded at both ends of the trace. None derives it from the data. |
BorderPadMethod |
Padding.BorderPaddingMethod.Random |
How the border points are filled (Random or Zero). |
InternalPaddingMethod |
Padding.InternalPaddingMethod.LinearInterpolation |
How small gaps inside the trace are filled. |
HugeGapPaddingMethod |
Padding.HugeGapPaddingMethod.Zero |
How gaps longer than HugeGapPaddingDistance are filled. |
HugeGapPaddingDistance |
100. |
Gap length from which a gap counts as huge. |
MinPeakDistance |
Some 0.1 |
Peaks closer than this (in minutes) are merged. The distance is at least 1.5 times the median point spacing of the trace, which is also what None uses. |
MinPeakLength |
Some 0.1 |
Smallest peak width the wavelet scales start at. |
MaxPeakLength |
1.5 |
Largest peak width the wavelet scales go up to. |
NoiseQuantile |
0.01 |
Quantile of the wavelet correlation used as noise level. |
MinSNR |
0.01 |
A peak needs a correlation above MinSNR times the noise level. |
Default parameter file: Default JSON File
For a given dataset, use the same fixed m/z and ion mobility windows in AlignmentBasedQuantification. The appropriate windows depend on the instrument and acquisition method.
OutputsGenerated data and log files
QuantBasedAlignment, AlignmentBasedQuantification, AlignmentBasedQuantStatistics and JoinQuantPepIonsWithProteins read these .quant files.
The output table contains 47 columns. The columns are grouped by category below.
Identification and PSM confidence
| Column | Description |
|---|---|
StringSequence |
Amino Acid sequence (one-letter code) from PeptideDB which matches the psm candidate |
GlobalMod |
Indicator, if a peptide ion species is labeled or unlabeled |
Charge |
Precursor ion charge state |
PepSequenceID |
Unique identifier of the unmodified peptide sequence, which points to PeptideDB |
ModSequenceID |
Unique identifier of the modified peptide sequence (including PTMs, e.g., methylation), which points to PeptideDB |
PrecursorMZ |
Theoretical m/z of the ion plus the m/z correction, the m/z the XIC is centred on |
MeasuredMass |
Mass that corresponds to PrecursorMZ, in Dalton |
TheoMass |
Theoretical peptide mass in the spectrum (based on amino acid composition) in Dalton |
AbsDeltaMass |
Absolute difference between MeasuredMass and TheoMass |
MeanPercolatorScore |
Mean ModelScore of the identifications of the peptide ion |
QValue |
Lowest q-value among the identifications of the ion in the .qpsm |
PEPValue |
PEP of that identification |
ProteinNames |
ProteinNames of that identification in the .qpsm |
Light quantification (8)
| Column | Description |
|---|---|
QuantMz_Light |
Mass-to-charge ratio from the extracted XIC of the unlabeled peptide ion |
Quant_Light |
Peak area from the extracted XIC of the unlabeled peptide ion |
MeasuredApex_Light |
Measured Apex of unlabeled peak |
Seo_Light |
Standard Error of Prediction for quantification |
Params_Light |
Describes the shape of the fitted peak for the unlabeled version of a peptide. Contains information about peak height, estimated peak time, and peak width. |
Difference_SearchRT_FittedRT_Light |
Difference between the retention time originally determined using PSMs and the retention time calculated from the measured peak |
KLDiv_Observed_Theoretical_Light |
Describes how well the measured unlabeled isotope pattern matches the theoretically expected pattern. |
KLDiv_CorrectedObserved_Theoretical_Light |
Corrected Kullback–Leibler divergence of isotopic pattern of unlabeled peptide ion versus the measured pattern |
Heavy quantification (8)
| Column | Description |
|---|---|
QuantMz_Heavy |
Mass-to-charge ratio from the extracted XIC of the labeled peptide ion |
Quant_Heavy |
Peak area from the extracted XIC of the labeled peptide ion |
MeasuredApex_Heavy |
Measured Apex of labeled peak |
Seo_Heavy |
Standard Error of Prediction of quantification |
Params_Heavy |
Describes the shape of the fitted peak for the labeled version of a peptide. Contains information about peak height, estimated peak time, and peak width. |
Difference_SearchRT_FittedRT_Heavy |
Difference between the retention time originally determined using PSMs and the retention time calculated from the measured peak |
KLDiv_Observed_Theoretical_Heavy |
Describes how well the measured labeled isotope pattern matches the theoretically expected pattern. |
KLDiv_CorrectedObserved_Theoretical_Heavy |
Corrected Kullback–Leibler divergence of isotopic pattern of labeled peptide ion versus the measured pattern |
Light isotope patterns and traces (6)
| Column | Description |
|---|---|
IsotopicPatternMz_Light |
M/z-distribution of isotope cluster in spectra for unlabeled peaks |
IsotopicPatternIntensity_Observed_Light |
Observed intensity distribution of unlabeled isotopic clusters |
IsotopicPatternIntensity_Corrected_Light |
Corrected intensity distribution of unlabeled isotopic clusters |
RtTrace_Light |
Retention Time Profile of unlabeled peptide ion |
IntensityTrace_Observed_Light |
Intensities at the monoisotopic m/z over the scan times in RtTrace_Light, drop-outs removed, before baseline subtraction |
IntensityTrace_Corrected_Light |
The intensities of IntensityTrace_Observed_Light after ALS baseline subtraction, negative values set to 0 |
Heavy isotope patterns and traces (6)
| Column | Description |
|---|---|
IsotopicPatternMz_Heavy |
M/z-distribution of isotope cluster in spectra for labeled peaks |
IsotopicPatternIntensity_Observed_Heavy |
Observed intensity distribution of labeled isotopic clusters |
IsotopicPatternIntensity_Corrected_Heavy |
Corrected intensity distribution of labeled isotopic clusters |
RtTrace_Heavy |
Retention Time Profile of labeled peptide ion |
IntensityTrace_Observed_Heavy |
Intensities at the monoisotopic m/z of the labeled partner over the scan times in RtTrace_Heavy, drop-outs removed, before baseline subtraction |
IntensityTrace_Corrected_Heavy |
The intensities of IntensityTrace_Observed_Heavy after ALS baseline subtraction, negative values set to 0 |
Light / Heavy comparison and quantification source (2)
| Column | Description |
|---|---|
Correlation_Light_Heavy |
Correlation calculated based on Pearson between unlabeled and labeled peaks |
QuantificationSource |
If spectra are found over Alignments or Peptide Spectrum Matching |
Alignment quality (2)
Alignment scores and associated q-values
| Column | Description |
|---|---|
AlignmentScore |
NaN for PSM-based rows. For transferred rows, the probability from AlignmentBasedQuantStatistics that the quantified peak belongs to the ion. |
AlignmentQValue |
0 for PSM-based rows. For transferred rows, the q-value from AlignmentBasedQuantStatistics. |
Ion Mobility
| Column | Description |
|---|---|
| IonMobility | Ion mobility of the identifications, weighted by their matched fragment intensity, NaN without ion mobility |
| IonMobilityCentre | Ion mobility the XIC of the row is summed around, NaN without an ion mobility window |
Parameter generationJSON and parameter-generation examples
From the ProteomIQon repository root, build the library with dotnet build src/ProteomIQon/ProteomIQon.fsproj -c Release. Save the following as generate-params.fsx in that same directory and run dotnet fsi generate-params.fsx. The script writes the JSON file to the system temporary directory.
#r "nuget: FSharp.Stats, 0.6.0"
#r "nuget: Newtonsoft.Json, 13.0.4"
#r "./src/ProteomIQon/bin/Release/net10.0/ProteomIQon.dll"
open ProteomIQon
open ProteomIQon.Domain
open FSharp.Stats.Signal
let waveletParams : WaveletParameters =
{
Borderpadding = None
BorderPadMethod = Padding.BorderPaddingMethod.Random
InternalPaddingMethod = Padding.InternalPaddingMethod.LinearInterpolation
HugeGapPaddingMethod = Padding.HugeGapPaddingMethod.Zero
HugeGapPaddingDistance = 100.
MinPeakDistance = Some 0.1
MinPeakLength = Some 0.1
MaxPeakLength = 1.5
NoiseQuantile = 0.01
MinSNR = 0.01
}
let quantificationTIMsParams : Dto.QuantificationParams =
{
PerformLabeledQuantification = Labeling.Unlabeled
XicExtraction =
{
ScanTimeWindow = 2.
MzWindow_Da = Window.Fixed 0.008
XicProcessing = XicProcessing.Wavelet waveletParams
TopKPSMs = None
IonMobilityWindow = Window.Fixed 0.025
}
BaseLineCorrection = Some { MaxIterations = 10; Lambda = 6; P = 0.05 }
QualityFilterLog2Limit = 2.
CentrePSMs = 3
RequirePeakAtScanTime = true
}
// Replace the temp folder with your project folder.
let outputPath = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "QuantificationTIMsParams.json")
Json.serializeAndWrite outputPath quantificationTIMsParams
Installing and executing the tool
-
Installing
Install the tool globally with the .NET CLI.
dotnet tool install --global ProteomIQon.PSMBasedQuantificationTIMs -
Execute
proteomiqon-psmbasedquantificationtims -i path/to/run.mzlite -ii path/to/run.qpsm -d path/to/database.db -o path/to/output -p path/to/QuantificationTIMsParams.json -
Running the tool for multiple runs, for three at the same time
proteomiqon-psmbasedquantificationtims -i path/to/run1.mzlite path/to/run2.mzlite path/to/run3.mzlite -ii path/to/run1.qpsm path/to/run2.qpsm path/to/run3.qpsm -d path/to/database.db -o path/to/output -p path/to/QuantificationTIMsParams.json -c 3 -
Two directories, paired by file name
proteomiqon-psmbasedquantificationtims -i path/to/mzliteFolder -ii path/to/qpsmFolder -d path/to/database.db -o path/to/output -p path/to/QuantificationTIMsParams.json -c 3 -mf -
All Flags
proteomiqon-psmbasedquantificationtims --help