-
Notifications
You must be signed in to change notification settings - Fork 2
Chromatogram Extraction
For a typical workflow in which transitions are only expected to be found in one SWATH, mapping is performed with selectSwathTransitions().
In PRM and PASEF, transitions may be found in more than one SWATH so alternative selection of SWATHs is performed directly in the performExtraction function
-
PASEF
-pasef
: Expect SWATHs that may overlap across m/z and IM. If a transition is found in more than one SWATH, select the SWATH in which the transition is most centered across IM. -
PRM
matching_window_only
: Expect SWATHs that may overlap across m/z. If transition found in multiple SWATHs select the SWATH in which the transition is most centered across m/z
Compounds/peptides in the library are split up into batches using selectCompoundsForBatch()). The maximum number of compounds in a batch is specified by batchSize
. Each batch is a LightTargetedExperiment containing only compounds/peptides in the batch.
Extraction is performed batchwise using the MS1Extraction_() method for MS1 and directly in the performExtraction() method for MS2 however both call the same helper functions and will thus be discussed simultaneoulsy. Helper functions for preparing coordinates are found in the ChromatogramExtractor class and functions for extraction are found in the ChromatogramExtractorAlgorithm class.
- For each transition/precursor, compute the coordinates of extraction (prepareExtractionCoordinates_(), prepare_coordinates() - signature with LightTargetedExperiment)
- Coordinates consist of:
- rt_start = precursor_rt - (
rt_extraction_window
) / 2 - rt_end = precursor_rt + (
rt_extraction_window
) / 2 - Id
- m/z
- Ion Mobility (optional)
- rt_start = precursor_rt - (
- Coordinates consist of:
- Extract Chromatograms (extractChromatograms())
- Ensure that the coordinates are sorted by m/z
- For each spectrum:
- Fetch the m/z and intensity arrays and IM array (if present)
- For each transition coordinate:
- If the spectrum RT is in range of the transition coordinate RT, perfom extraction (no IM - extract_value_tophat(), with IM - extract_value_tophat())
- Compute the m/z range (bounds set in OpenSwath parameters using ppm/Th cutoff)
- Add all of the intensities within m/z range (and IM range if set)
- If the spectrum RT is in range of the transition coordinate RT, perfom extraction (no IM - extract_value_tophat(), with IM - extract_value_tophat())
- Convert Chromatogram Ptr to MSChromatogram and add metainformation (return_chromatogram())
- Write out chromatogram