| OpenMS 2.5.0

Public Member Functions | Protected Member Functions | List of all members
UTILProteomicsLFQ Class Reference
Inheritance diagram for UTILProteomicsLFQ:

## Public Member Functions

| UTILProteomicsLFQ ()
Public Member Functions inherited from TOPPBase
| TOPPBase (const String &name, const String &description, bool official=true, const std::vector< Citation > &citations={})
| Constructor. More...
virtual | ~TOPPBase ()
| Destructor. More...
ExitCodes | main (int argc, const char **argv)
| Main routine of all TOPP applications. More...

## Protected Member Functions

void | registerOptionsAndFlags_ () override
| Sets the valid command line options (with argument) and flags (without argument). More...
map< String, String > | mapMzML2Ids_ (StringList &in, StringList &in_ids)
map< String, String > | mapId2MzMLs_ (const map< String, String > &m2i)
ExitCodes | centroidAndCorrectPrecursors_ (const String &mz_file, MSExperiment &ms_centroided)
void | recalibrateMasses_ (MSExperiment &ms_centroided, vector< PeptideIdentification > &peptide_ids, const String &id_file_abs_path)
double | estimateMedianChromatographicFWHM_ (MSExperiment &ms_centroided)
void | calculateSeeds_ (const MSExperiment &ms_centroided, FeatureMap &seeds, double median_fwhm)
double | align_ (vector< FeatureMap > &feature_maps, vector< TransformationDescription > &transformations)
void | transform_ (vector< FeatureMap > &feature_maps, vector< TransformationDescription > &transformations)
void | link_ (vector< FeatureMap > &feature_maps, double median_fwhm, double max_alignment_diff, ConsensusMap &consensus_fraction)
double | alignAndLink_ (vector< FeatureMap > &feature_maps, ConsensusMap &consensus_fraction, vector< TransformationDescription > &transformations, const double median_fwhm)
map< pair< String, UInt >, vector< int > > | getPeptideOccurrence_ (const ConsensusMap &cons)
multimap< Size, PeptideIdentification > | transferIDsBetweenSameFraction_ (const ConsensusMap &consensus_fraction, Size min_occurrence=3)
ExitCodes | quantifyFraction_ (const pair< unsigned int, std::vector< String > > &ms_files, const map< String, String > &mzfile2idfile, double median_fwhm, const multimap< Size, PeptideIdentification > &transfered_ids, ConsensusMap &consensus_fraction, vector< TransformationDescription > &transformations, double &max_alignment_diff, set< String > &fixed_modifications, set< String > &variable_modifications)
ExitCodes | main_ (int, const char **) override
| The actual "main" method. main_() is invoked by main(). More...
Protected Member Functions inherited from TOPPBase
const String & | getIniLocation_ () const
| Returns the location of the ini file where parameters are taken from. E.g. if the command line was `TOPPTool -instance 17`, then this will be `"TOPPTool:17:"`. Note the ':' at the end. More...
const String & | toolName_ () const
| Returns the tool name. More...
void | printUsage_ ()
| Prints the tool-specific command line options and appends the common options. More...
bool | parseRange_ (const String &text, double &low, double &high) const
| Parses a range string ([a]:[b]) into two variables (doubles) More...
bool | parseRange_ (const String &text, Int &low, Int &high) const
| Parses a range string ([a]:[b]) into two variables (integers) More...
bool | writeCTD_ ()
| Write common tool description (CTD) file. More...
String | getParamArgument_ (const Param::ParamEntry &entry) const
| Utility function that determines a suitable argument value for the given Param::ParamEntry. More...
std::vector< ParameterInformation > | paramToParameterInformation_ (const Param &param) const
| Translates the given parameter object into a vector of ParameterInformation, that can be utilized for cl parsing. More...
ParameterInformation | paramEntryToParameterInformation_ (const Param::ParamEntry &entry, const String &argument="", const String &full_name="") const
| Transforms a ParamEntry object to command line parameter (ParameterInformation). More...
void | registerParamSubsectionsAsTOPPSubsections_ (const Param &param)
void | registerFullParam_ (const Param &param)
| Register command line parameters for all entries in a Param object. More...
void | registerStringOption_ (const String &name, const String &argument, const String &default_value, const String &description, bool required=true, bool advanced=false)
| Registers a string option. More...
void | setValidStrings_ (const String &name, const std::vector< String > &strings)
| Sets the valid strings for a string option or a whole string list. More...
void | setValidStrings_ (const String &name, const std::string vstrings[], int count)
| Sets the valid strings for a string option or a whole string list. More...
void | registerInputFile_ (const String &name, const String &argument, const String &default_value, const String &description, bool required=true, bool advanced=false, const StringList &tags=StringList())
| Registers an input file option. More...
void | registerOutputFile_ (const String &name, const String &argument, const String &default_value, const String &description, bool required=true, bool advanced=false)
| Registers an output file option. More...
void | setValidFormats_ (const String &name, const std::vector< String > &formats, const bool force_OpenMS_format=true)
| Sets the formats for a input/output file option or for all members of an input/output file lists. More...
void | registerDoubleOption_ (const String &name, const String &argument, double default_value, const String &description, bool required=true, bool advanced=false)
| Registers a double option. More...
void | setMinInt_ (const String &name, Int min)
| Sets the minimum value for the integer parameter(can be a list of integers,too) `name`. More...
void | setMaxInt_ (const String &name, Int max)
| Sets the maximum value for the integer parameter(can be a list of integers,too) `name`. More...
void | setMinFloat_ (const String &name, double min)
| Sets the minimum value for the floating point parameter(can be a list of floating points,too) `name`. More...
void | setMaxFloat_ (const String &name, double max)
| Sets the maximum value for the floating point parameter(can be a list of floating points,too) `name`. More...
void | registerIntOption_ (const String &name, const String &argument, Int default_value, const String &description, bool required=true, bool advanced=false)
| Registers an integer option. More...
void | registerIntList_ (const String &name, const String &argument, IntList default_value, const String &description, bool required=true, bool advanced=false)
| Registers a list of integers option. More...
void | registerDoubleList_ (const String &name, const String &argument, DoubleList default_value, const String &description, bool required=true, bool advanced=false)
| Registers a list of doubles option. More...
void | registerStringList_ (const String &name, const String &argument, StringList default_value, const String &description, bool required=true, bool advanced=false)
| Registers a list of strings option. More...
void | registerInputFileList_ (const String &name, const String &argument, StringList default_value, const String &description, bool required=true, bool advanced=false, const StringList &tags=StringList())
| Registers a list of input files option. More...
void | registerOutputFileList_ (const String &name, const String &argument, StringList default_value, const String &description, bool required=true, bool advanced=false)
| Registers a list of output files option. More...
void | registerFlag_ (const String &name, const String &description, bool advanced=false)
| Registers a flag. More...
void | registerSubsection_ (const String &name, const String &description)
| Registers an allowed subsection in the INI file (usually from OpenMS algorithms). More...
void | registerTOPPSubsection_ (const String &name, const String &description)
| Registers an allowed subsection in the INI file originating from the TOPP tool itself. More...
void | addEmptyLine_ ()
| Adds an empty line between registered variables in the documentation. More...
String | getStringOption_ (const String &name) const
| Returns the value of a previously registered string option. More...
double | getDoubleOption_ (const String &name) const
| Returns the value of a previously registered double option. More...
Int | getIntOption_ (const String &name) const
| Returns the value of a previously registered integer option. More...
StringList | getStringList_ (const String &name) const
| Returns the value of a previously registered StringList. More...
IntList | getIntList_ (const String &name) const
| Returns the value of a previously registered IntList. More...
DoubleList | getDoubleList_ (const String &name) const
| Returns the value of a previously registered DoubleList. More...
bool | getFlag_ (const String &name) const
| Returns the value of a previously registered flag. More...
const ParameterInformation & | findEntry_ (const String &name) const
| Finds the entry in the parameters_ array that has the name `name`. More...
Param const & | getParam_ () const
| Return all parameters relevant to this TOPP tool. More...
void | checkParam_ (const Param &param, const String &filename, const String &location) const
| Checks top-level entries of `param` according to the information during registration. More...
void | fileParamValidityCheck_ (String &filename, const String &param_name, const ParameterInformation &p) const
| checks if an input file exists (respecting the flags) More...
void | checkIfIniParametersAreApplicable_ (const Param &ini_params)
| Checks if the parameters of the provided ini file are applicable to this tool. More...
void | writeLog_ (const String &text) const
| Writes a string to the log file and to std::cout. More...
void | writeDebug_ (const String &text, UInt min_level) const
| Writes a `text` to the log file and to std::cout if the debug level is at least `min_level`. More...
void | writeDebug_ (const String &text, const Param &param, UInt min_level) const
| Writes a String followed by a Param to the log file and to std::cout if the debug level is at least `min_level`. More...
String | makeTempDirectory_ () const
| Creates a unique temporary directory and returns its name (you have to clean it up yourself) More...
String | makeAutoRemoveTempDirectory_ (Int keep_debug=2)
| Creates a unique temporary directory and returns its name (will be cleaned up automatically if debug level is high enough) More...
void | removeTempDirectory_ (const String &dirname, Int keep_debug=2) const
| Removes a (temporary) directory. More...
ExitCodes | runExternalProcess_ (const QString &executable, const QStringList &arguments, const QString &workdir="") const
| Runs an external process via QProcess and reports its status in the logs. More...
void | inputFileReadable_ (const String &filename, const String &param_name) const
| Checks if an input file exists, is readable and is not empty. More...
void | outputFileWritable_ (const String &filename, const String &param_name) const
| Checks if an output file is writable. More...
void | addDataProcessing_ (ConsensusMap &map, const DataProcessing &dp) const
| Data processing setter for consensus maps. More...
void | addDataProcessing_ (FeatureMap &map, const DataProcessing &dp) const
| Data processing setter for feature maps. More...
void | addDataProcessing_ (PeakMap &map, const DataProcessing &dp) const
| Data processing setter for peak maps. More...
DataProcessing | getProcessingInfo_ (DataProcessing::ProcessingAction action) const
| Returns the data processing information. More...
DataProcessing | getProcessingInfo_ (const std::set< DataProcessing::ProcessingAction > &actions) const
| Returns the data processing information. More...

## Additional Inherited Members

Public Types inherited from TOPPBase
enum | ExitCodes { EXECUTION_OK, INPUT_FILE_NOT_FOUND, INPUT_FILE_NOT_READABLE, INPUT_FILE_CORRUPT, INPUT_FILE_EMPTY, CANNOT_WRITE_OUTPUT_FILE, ILLEGAL_PARAMETERS, MISSING_PARAMETERS, UNKNOWN_ERROR, EXTERNAL_PROGRAM_ERROR, PARSE_ERROR, INCOMPATIBLE_INPUT_DATA, INTERNAL_ERROR, UNEXPECTED_RESULT
}
| Exit codes. More...
Static Public Member Functions inherited from TOPPBase
static void | setMaxNumberOfThreads (int num_threads)
| Sets the maximal number of usable threads. More...
Protected Attributes inherited from TOPPBase
String | version_
| Version string (if empty, the OpenMS/TOPP version is printed) More...
String | verboseVersion_
| Version string including additional revision/date time information. Note: This differs from version_ only if not provided by the user. More...
bool | official_
| Flag indicating if this an official TOPP tool. More...
std::vector< Citation > | citations_
| Papers, specific for this tool (will be shown in '–help') More...
ProgressLogger::LogType | log_type_
| Type of progress logging. More...
bool | test_mode_
| Test mode. More...
Int | debug_level_
| Debug level set by -debug. More...
Static Protected Attributes inherited from TOPPBase
static String | topp_ini_file_
| .TOPP.ini file for storing system default parameters More...
static const Citation | cite_openms_
| The OpenMS citation. More...

## Constructor & Destructor Documentation

## ◆ UTILProteomicsLFQ()

UTILProteomicsLFQ | ( |  | ) |

inline

## Member Function Documentation

## ◆ align_()

double align_ | ( | vector< FeatureMap > & | feature_maps,
|  | vector< TransformationDescription > & | transformations
| ) |  |

inline protected

References MapAlignmentAlgorithmIdentification::align(), ListUtils::concatenate(), Param::copy(), Param::getValue(), OpenMS::OpenMS_Log_debug, OPENMS_LOG_INFO, ProgressLogger::setLogType(), and DefaultParamHandler::setParameters().

## ◆ alignAndLink_()

double alignAndLink_ | ( | vector< FeatureMap > & | feature_maps,
|  | ConsensusMap & | consensus_fraction,
|  | vector< TransformationDescription > & | transformations,
|  | const double | median_fwhm
| ) |  |

inline protected

References DataProcessing::ALIGNMENT, MapConversion::convert(), and DataProcessing::FEATURE_GROUPING.

## ◆ calculateSeeds_()

void calculateSeeds_ | ( | const MSExperiment & | ms_centroided,
|  | FeatureMap & | seeds,
|  | double | median_fwhm
| ) |  |

inline protected

References MSExperiment::addSpectrum(), ThresholdMower::filterPeakMap(), FeatureFinderMultiplexAlgorithm::getFeatureMap(), DefaultParamHandler::getParameters(), OPENMS_LOG_INFO, FeatureFinderMultiplexAlgorithm::run(), DefaultParamHandler::setParameters(), and Param::setValue().

## ◆ centroidAndCorrectPrecursors_()

ExitCodes centroidAndCorrectPrecursors_ | ( | const String & | mz_file,
|  | MSExperiment & | ms_centroided
| ) |  |

inline protected

References MSExperiment::clear(), MSExperiment::clearMetaDataArrays(), Param::copy(), PrecursorCorrection::correctToHighestIntensityMS1Peak(), MSExperiment::empty(), OpenMS::Math::getPPM(), OpenMS::Math::getPPMAbs(), MzMLFile::load(), OpenMS::Math::MAD(), OpenMS::Math::median(), OPENMS_LOG_WARN, PeakPickerHiRes::pickExperiment(), ProgressLogger::setLogType(), DefaultParamHandler::setParameters(), and MSExperiment::size().

## ◆ estimateMedianChromatographicFWHM_()

double estimateMedianChromatographicFWHM_ | ( | MSExperiment & | ms_centroided | ) |

inline protected

References DefaultParamHandler::getParameters(), OpenMS::Math::median(), OPENMS_LOG_INFO, and MassTraceDetection::run().

## ◆ getPeptideOccurrence_()

map<pair<String, UInt>, vector<int> > getPeptideOccurrence_ | ( | const ConsensusMap & | cons | ) |

inline protected

References ConsensusMap::getColumnHeaders().

## ◆ link_()

void link_ | ( | vector< FeatureMap > & | feature_maps,
|  | double | median_fwhm,
|  | double | max_alignment_diff,
|  | ConsensusMap & | consensus_fraction
| ) |  |

inline protected

References Param::copy(), FeatureGroupingAlgorithmQT::group(), OPENMS_LOG_INFO, DefaultParamHandler::setParameters(), and Param::setValue().

## ◆ main_()

ExitCodes main_ | ( | int | argc,
|  | const char ** | argv
| ) |  |

inline override protected virtual

The actual "main" method. main_() is invoked by main().

Implements TOPPBase.

References File::absolutePath(), PeptideAndProteinQuant::annotateQuantificationsToProteins(), ConsensusMap::appendColumns(), FalseDiscoveryRate::applyBasic(), PeptideProteinResolution::buildGraph(), ConsensusMap::clear(), Param::copy(), PeptideIndexing::DATABASE_EMPTY, PeptideIndexing::EXECUTION_OK, File::exists(), MzTab::exportConsensusMapToMzTab(), IDFilter::filterHitsByScore(), ExperimentalDesign::MSFileSectionEntry::fraction, ExperimentalDesign::MSFileSectionEntry::fraction_group, ExperimentalDesign::getFractionToMSFilesMapping(), ExperimentalDesign::getNumberOfFractionGroups(), DefaultParamHandler::getParameters(), ConsensusMap::getProteinIdentifications(), PeptideAndProteinQuant::getProteinResults(), BayesianProteinInferenceAlgorithm::inferPosteriorProbabilities(), IDFilter::keepUniquePeptidesPerProtein(), ExperimentalDesign::MSFileSectionEntry::label, IdXMLFile::load(), ExperimentalDesignFile::load(), OPENMS_LOG_FATAL_ERROR, OPENMS_LOG_INFO, OPENMS_LOG_WARN, OPENMS_POSTCONDITION, ExperimentalDesign::MSFileSectionEntry::path, PeptideIndexing::PEPTIDE_IDS_EMPTY, PeptideAndProteinQuant::quantifyPeptides(), PeptideAndProteinQuant::quantifyProteins(), PeptideAndProteinQuant::readQuantData(), IDFilter::removeUnreferencedProteins(), UniqueIdIndexer< RandomAccessContainer >::resolveUniqueIdConflicts(), BasicProteinInferenceAlgorithm::run(), PeptideIndexing::run(), ExperimentalDesign::MSFileSectionEntry::sample, ExperimentalDesign::setMSFileSection(), DefaultParamHandler::setParameters(), Param::setValue(), ConsensusMap::sortByPosition(), ConsensusMap::sortPeptideIdentificationsByMapIndex(), MzTabFile::store(), ConsensusXMLFile::store(), IdXMLFile::store(), MSstatsFile::storeLFQ(), PeptideIndexing::UNEXPECTED_RESULT, IDFilter::updateProteinGroups(), and IDFilter::updateProteinReferences().

## ◆ mapId2MzMLs_()

map<String, String> mapId2MzMLs_ | ( | const map< String, String > & | m2i | ) |

inline protected

## ◆ mapMzML2Ids_()

map<String, String> mapMzML2Ids_ | ( | StringList & | in,
|  | StringList & | in_ids
| ) |  |

inline protected

References File::absolutePath(), and File::exists().

## ◆ quantifyFraction_()

ExitCodes quantifyFraction_ | ( | const pair< unsigned int, std::vector< String > > & | ms_files,
|  | const map< String, String > & | mzfile2idfile,
|  | double | median_fwhm,
|  | const multimap< Size, PeptideIdentification > & | transfered_ids,
|  | ConsensusMap & | consensus_fraction,
|  | vector< TransformationDescription > & | transformations,
|  | double & | max_alignment_diff,
|  | set< String > & | fixed_modifications,
|  | set< String > & | variable_modifications
| ) |  |

inline protected

References File::absolutePath(), SpectrumMetaDataLookup::addMissingSpectrumReferences(), ConsensusMap::applyMemberFunction(), Param::copy(), ConsensusMap::getColumnHeaders(), FeatureFinderIdentificationAlgorithm::getMSData(), FeatureFinderIdentificationAlgorithm::getProgressLogger(), IdXMLFile::load(), ConsensusMapNormalizerAlgorithmMedian::NM_SCALE, ConsensusMapNormalizerAlgorithmMedian::normalizeMaps(), OPENMS_LOG_DEBUG, OPENMS_LOG_FATAL_ERROR, OPENMS_LOG_WARN, OPENMS_PRECONDITION, IDFilter::removeDecoyHits(), IDFilter::removeEmptyIdentifications(), IDFilter::removeUnreferencedProteins(), IDConflictResolverAlgorithm::resolve(), FeatureFinderIdentificationAlgorithm::run(), ProgressLogger::setLogType(), DefaultParamHandler::setParameters(), FeatureMap::setPrimaryMSRunPath(), UniqueIdInterface::setUniqueId(), Param::setValue(), ConsensusMap::sortPeptideIdentificationsByMapIndex(), ConsensusXMLFile::store(), FeatureXMLFile::store(), MSExperiment::swap(), and MapAlignmentTransformer::transformRetentionTimes().

## ◆ recalibrateMasses_()

void recalibrateMasses_ | ( | MSExperiment & | ms_centroided,
|  | vector< PeptideIdentification > & | peptide_ids,
|  | const String & | id_file_abs_path
| ) |  |

inline protected

References File::basename(), InternalCalibration::calibrate(), InternalCalibration::fillCalibrants(), InternalCalibration::getCalibrationPoints(), MZTrafoModel::LINEAR, OPENMS_LOG_WARN, MZTrafoModel::setCoefficientLimits(), ProgressLogger::setLogType(), MZTrafoModel::setRANSACParams(), and CalibrationData::size().

## ◆ registerOptionsAndFlags_()

void registerOptionsAndFlags_ | ( |  | ) |

inline override protected virtual

Sets the valid command line options (with argument) and flags (without argument).

The options '-ini' '-log' '-instance' '-debug' and the flag '–help' are automatically registered.

TODO: think about export of quality control files (qcML?)

Implements TOPPBase.

References DefaultParamHandler::getDefaults(), Param::insert(), and Param::setValue().

## ◆ transferIDsBetweenSameFraction_()

multimap<Size, PeptideIdentification> transferIDsBetweenSameFraction_ | ( | const ConsensusMap & | consensus_fraction,
|  | Size | min_occurrence = `3`
| ) |  |

inline protected

References OpenMS::Constants::c, and OPENMS_LOG_INFO.

## ◆ transform_()

void transform_ | ( | vector< FeatureMap > & | feature_maps,
|  | vector< TransformationDescription > & | transformations
| ) |  |

inline protected

References BaseException::getMessage(), OPENMS_LOG_WARN, TransformationXMLFile::store(), and MapAlignmentTransformer::transformRetentionTimes().