Class to execute an OpenSwath Workflow. More...
Classes | |
struct | ChromExtractParams |
ChromatogramExtractor parameters. More... | |
Public Member Functions | |
OpenSwathWorkflow (bool use_ms1_traces) | |
TransformationDescription | performRTNormalization (const OpenMS::TargetedExperiment &irt_transitions, const std::vector< OpenSwath::SwathMap > &swath_maps, double min_rsq, double min_coverage, const Param &feature_finder_param, const ChromExtractParams &cp_irt, const Param &irt_detection_param, Size debug_level) |
Compute the alignment against a set of RT-normalization peptides. More... | |
void | performExtraction (const std::vector< OpenSwath::SwathMap > &swath_maps, const TransformationDescription trafo, const ChromExtractParams &cp, const Param &feature_finder_param, const OpenSwath::LightTargetedExperiment &transition_exp, FeatureMap &out_featureFile, bool store_features, OpenSwathTSVWriter &tsv_writer, Interfaces::IMSDataConsumer<> *chromConsumer, int batchSize) |
Execute the OpenSWATH workflow on a set of SwathMaps and transitions. More... | |
![]() | |
ProgressLogger () | |
Constructor. More... | |
~ProgressLogger () | |
Destructor. More... | |
ProgressLogger (const ProgressLogger &other) | |
Copy constructor. More... | |
ProgressLogger & | operator= (const ProgressLogger &other) |
Assignment Operator. More... | |
void | setLogType (LogType type) const |
Sets the progress log that should be used. The default type is NONE! More... | |
LogType | getLogType () const |
Returns the type of progress log being used. More... | |
void | startProgress (SignedSize begin, SignedSize end, const String &label) const |
Initializes the progress display. More... | |
void | setProgress (SignedSize value) const |
Sets the current progress. More... | |
void | endProgress () const |
Ends the progress display. More... | |
Private Member Functions | |
void | selectPeptidesForBatch_ (const OpenSwath::LightTargetedExperiment &transition_exp_used_all, OpenSwath::LightTargetedExperiment &transition_exp_used, int batch_size, size_t j) |
Select which peptides to analyze in the next batch and copy the corresponding peptides and transitions to transition_exp_used. More... | |
void | copyBatchTransitions_ (const std::vector< OpenSwath::LightPeptide > &used_peptides, const std::vector< OpenSwath::LightTransition > &all_transitions, std::vector< OpenSwath::LightTransition > &output) |
Copy the required transitions from all_transitions to output (e.g. those that match a peptide in the used_peptides vector) More... | |
void | simpleExtractChromatograms (const std::vector< OpenSwath::SwathMap > &swath_maps, const OpenMS::TargetedExperiment &irt_transitions, std::vector< OpenMS::MSChromatogram<> > &chromatograms, const ChromExtractParams &cp) |
Simple method to extract chromatograms (for the RT-normalization peptides) More... | |
TransformationDescription | RTNormalization (TargetedExperiment transition_exp_, std::vector< OpenMS::MSChromatogram<> > chromatograms, double min_rsq, double min_coverage, Param feature_finder_param, const Param &irt_detection_param) |
Perform RT normalization using the MRMFeatureFinderScoring. More... | |
bool | computeBinnedCoverage (const std::pair< double, double > &rtRange, const std::vector< std::pair< double, double > > &pairs, int nrBins, int minPeptidesPerBin, int minBinsFilled) |
void | scoreAllChromatograms (const OpenSwath::SpectrumAccessPtr input, const OpenSwath::SpectrumAccessPtr swath_map, OpenSwath::LightTargetedExperiment &transition_exp, const Param &feature_finder_param, TransformationDescription trafo, const double rt_extraction_window, FeatureMap &output, OpenSwathTSVWriter &tsv_writer, std::map< std::string, OpenSwath::ChromatogramPtr > &ms1_chromatograms) |
void | prepare_coordinates_wrap (std::vector< OpenSwath::ChromatogramPtr > &chrom_list, std::vector< ChromatogramExtractorAlgorithm::ExtractionCoordinates > &coordinates, OpenSwath::LightTargetedExperiment &transition_exp_used, const bool ms1, const TransformationDescription trafo_inverse, const ChromExtractParams &cp) const |
Wrapper function for prepare_coordinates that also correctly handles transformations. More... | |
void | prepare_coordinates (std::vector< OpenSwath::ChromatogramPtr > &output_chromatograms, std::vector< ChromatogramExtractorAlgorithm::ExtractionCoordinates > &coordinates, OpenSwath::LightTargetedExperiment &transition_exp_used, const double rt_extraction_window, const bool ms1) const |
void | selectChrom_ (const MSChromatogram< ChromatogramPeak > &chromatogram_old, MSSpectrum< ChromatogramPeak > &chromatogram, double rt_extraction_window, double center_rt) |
Private Attributes | |
OpenSwath::SpectrumAccessPtr | ms1_map_ |
Spectrum Access to the MS1 map (note that this is *not* threadsafe!) More... | |
bool | use_ms1_traces_ |
Whether to use the MS1 traces. More... | |
Additional Inherited Members | |
![]() | |
enum | LogType { CMD, GUI, NONE } |
Possible log types. More... | |
![]() | |
static String | logTypeToFactoryName_ (LogType type) |
Return the name of the factory product used for this log type. More... | |
![]() | |
LogType | type_ |
time_t | last_invoke_ |
ProgressLoggerImpl * | current_logger_ |
![]() | |
static int | recursion_depth_ |
Class to execute an OpenSwath Workflow.
performExtraction will perform the OpenSWATH analysis. Optionally, an RT transformation (mapping peptides to normalized space) can be obtained beforehand using performRTNormalization.
|
inlineexplicit |
|
inlineprivate |
Function to compute the coverage of the iRT peptides across the gradient Cmp with RTNormalizer
References LOG_DEBUG.
|
inlineprivate |
Copy the required transitions from all_transitions to output (e.g. those that match a peptide in the used_peptides vector)
|
inline |
Execute the OpenSWATH workflow on a set of SwathMaps and transitions.
Executes the following operations on the given input:
1. OpenSwathHelper::selectSwathTransitions 2. ChromatogramExtractor prepare, extract 3. scoreAllChromatograms 4. Write out chromatograms and found features
swath_maps | The raw data (swath maps) |
trafo | Transformation description (translating this runs' RT to normalized RT space) |
cp | Parameter set for the chromatogram extraction |
feature_finder_param | Parameter set for the feature finding in chromatographic dimension |
transition_exp | The set of assays to be extracted and scored |
out_featureFile | Output feature map to store identified features |
store_features | Whether features should be appended to the output feature map |
tsv_writer | TSV Writer object to store identified features in csv format |
chromConsumer | Chromatogram consumer object to store the extracted chromatograms |
batchSize | Size of the batches which should be extracted and scored |
References IMSDataConsumer< MapType >::consumeChromatogram(), ChromatogramExtractor::extractChromatograms(), OpenSwathWorkflow::ChromExtractParams::extraction_function, LightTargetedExperiment::getPeptides(), FeatureMap::getProteinIdentifications(), LightTargetedExperiment::getTransitions(), TransformationDescription::invert(), OpenSwathWorkflow::ChromExtractParams::min_upper_edge_dist, OpenSwathWorkflow::ChromExtractParams::mz_extraction_window, OpenSwathWorkflow::ChromExtractParams::ppm, ChromatogramExtractor::return_chromatogram(), OpenSwathWorkflow::ChromExtractParams::rt_extraction_window, OpenSwathHelper::selectSwathTransitions(), LightTargetedExperiment::transitions, OpenSwathTSVWriter::use_ms1_traces_, and OpenSwathTSVWriter::writeHeader().
|
inline |
Compute the alignment against a set of RT-normalization peptides.
This function extracts the RT normalization chromatograms (simpleExtractChromatograms) and then uses the chromatograms to find features (in RTNormalization).
irt_transitions | A set of transitions used for the RT normalization peptides |
swath_maps | The raw data (swath maps) |
min_rsq | Minimal R^2 value that is expected for the RT regression |
min_coverage | Minimal coverage of the chromatographic space that needs to be achieved |
feature_finder_param | Parameter set for the feature finding in chromatographic dimension |
cp_irt | Parameter set for the chromatogram extraction |
debug_level | Debug level (writes out the RT normalization chromatograms if larger than 1) |
mz_correction_function | If correction in m/z is desired, which function should be used |
irt_detection_param | Parameter set for the detection of the iRTs (outlier detection, peptides per bin etc) |
References LOG_DEBUG, MSExperiment< PeakT, ChromatogramPeakT >::setChromatograms(), and MzMLFile::store().
|
inlineprivate |
References LightTransition::getNativeID(), LightTransition::getPeptideRef(), LightTargetedExperiment::getPeptides(), LightTransition::getPrecursorMZ(), LightTransition::getProductMZ(), LightTargetedExperiment::getTransitions(), ChromatogramExtractorAlgorithm::ExtractionCoordinates::id, LightPeptide::id, ChromatogramExtractorAlgorithm::ExtractionCoordinates::mz, LightPeptide::rt, ChromatogramExtractorAlgorithm::ExtractionCoordinates::rt_end, ChromatogramExtractorAlgorithm::ExtractionCoordinates::rt_start, and ChromatogramExtractorAlgorithm::ExtractionCoordinates::SortExtractionCoordinatesByMZ().
|
inlineprivate |
Wrapper function for prepare_coordinates that also correctly handles transformations.
References TransformationDescription::apply(), OpenSwathWorkflow::ChromExtractParams::extra_rt_extract, and OpenSwathWorkflow::ChromExtractParams::rt_extraction_window.
|
inlineprivate |
Perform RT normalization using the MRMFeatureFinderScoring.
transition_exp_ | The transitions for the normalization peptides |
chromatograms | The extracted chromatograms |
min_rsq | Minimal R^2 value that is expected for the RT regression |
min_coverage | Minimal coverage of the chromatographic space that needs to be achieved |
feature_finder_param | Parameter set for the feature finding in chromatographic dimension |
irt_detection_param | Parameter set for the detection of the iRTs (outlier detection, peptides per bin etc) |
References OpenSwathDataAccessHelper::convertTargetedExp(), OpenSwathHelper::estimateRTRange(), TransformationDescription::fitModel(), LightTargetedExperiment::getPeptides(), SimpleOpenMSSpectraFactory::getSpectrumAccessOpenMSPtr(), Param::getValue(), LOG_DEBUG, MRMFeatureFinderScoring::pickExperiment(), MRMRTNormalizer::removeOutliersIterative(), MRMRTNormalizer::removeOutliersRANSAC(), TransformationDescription::setDataPoints(), DefaultParamHandler::setParameters(), MRMFeatureFinderScoring::setStrictFlag(), Param::setValue(), and OpenSwathHelper::simpleFindBestFeature().
|
inlineprivate |
Helper function to score a set of chromatograms Will iterate over all assays contained in transition_exp and for each assay fetch the corresponding chromatograms and find peakgroups.
References TransformationDescription::apply(), FeatureMap::clear(), OpenSwathDataAccessHelper::convertToOpenMSChromatogram(), Param::copy(), LightTargetedExperiment::getPeptides(), LightTargetedExperiment::getTransitions(), TransformationDescription::invert(), OpenSwathTSVWriter::isActive(), MRMTransitionGroupPicker::pickTransitionGroup(), OpenSwathTSVWriter::prepareLine(), MRMFeatureFinderScoring::prepareProteinPeptideMaps_(), MRMFeatureFinderScoring::scorePeakgroups(), MRMFeatureFinderScoring::setMS1Map(), DefaultParamHandler::setParameters(), OpenSwathTSVWriter::use_ms1_traces_, and OpenSwathTSVWriter::writeLines().
|
inlineprivate |
References ChromatogramPeak::setIntensity(), and ChromatogramPeak::setMZ().
|
inlineprivate |
Select which peptides to analyze in the next batch and copy the corresponding peptides and transitions to transition_exp_used.
transition_exp_used | input (all transitions for this swath) |
transition_exp_used | output (contains only transitions for the next batch) |
batch_size | how many peptides per batch |
j | batch number (peptides from j*batch_size to j*batch_size+batch_size will be copied) |
References LightTargetedExperiment::peptides, LightTargetedExperiment::proteins, and LightTargetedExperiment::transitions.
|
inlineprivate |
Simple method to extract chromatograms (for the RT-normalization peptides)
References ChromatogramExtractor::extractChromatograms(), OpenSwathWorkflow::ChromExtractParams::extraction_function, TargetedExperiment::getTransitions(), LOG_DEBUG, OpenSwathWorkflow::ChromExtractParams::min_upper_edge_dist, OpenSwathWorkflow::ChromExtractParams::mz_extraction_window, OpenSwathWorkflow::ChromExtractParams::ppm, ChromatogramExtractor::prepare_coordinates(), ChromatogramExtractor::return_chromatogram(), OpenSwathWorkflow::ChromExtractParams::rt_extraction_window, and OpenSwathHelper::selectSwathTransitions().
|
private |
Spectrum Access to the MS1 map (note that this is *not* threadsafe!)
|
private |
Whether to use the MS1 traces.
OpenMS / TOPP release 2.0.0 | Documentation generated on Wed Mar 30 2016 12:49:29 using doxygen 1.8.11 |