OpenMS  2.5.0
OpenPepXLAlgorithm.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Eugen Netz $
32 // $Authors: Timo Sachsenberg, Eugen Netz $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
43 
44 namespace OpenMS
45 {
46 
47 //-------------------------------------------------------------
48 //Doxygen docu
49 //-------------------------------------------------------------
50 
115  class OPENMS_DLLAPI OpenPepXLAlgorithm :
116  public DefaultParamHandler, public ProgressLogger
117  {
118 public:
119 
122  {
126  INCOMPATIBLE_INPUT_DATA
127  };
128 
131 
133  ~OpenPepXLAlgorithm() override;
134 
147  ExitCodes run(PeakMap& unprocessed_spectra, ConsensusMap& cfeatures, std::vector<FASTAFile::FASTAEntry>& fasta_db, std::vector<ProteinIdentification>& protein_ids, std::vector<PeptideIdentification>& peptide_ids, OPXLDataStructs::PreprocessedPairSpectra& preprocessed_pair_spectra, std::vector< std::pair<Size, Size> >& spectrum_pairs, std::vector< std::vector< OPXLDataStructs::CrossLinkSpectrumMatch > >& all_top_csms, PeakMap& spectra);
148 
149 private:
150  void updateMembers_() override;
151 
152  static OPXLDataStructs::PreprocessedPairSpectra preprocessPairs_(const PeakMap& spectra, const std::vector< std::pair<Size, Size> >& spectrum_pairs, const double cross_link_mass_iso_shift, double fragment_mass_tolerance, double fragment_mass_tolerance_xlinks, bool fragment_mass_tolerance_unit_ppm, bool deisotope);
153 
156 
162 
166 
173 
180 
183 
191  };
192 }
OpenMS::OpenPepXLAlgorithm::EXECUTION_OK
Definition: OpenPepXLAlgorithm.h:123
DefaultParamHandler.h
OpenMS::OpenPepXLAlgorithm::fragment_mass_tolerance_
double fragment_mass_tolerance_
Definition: OpenPepXLAlgorithm.h:163
OpenMS::Internal::OpenMSOSInfo
Definition: OpenMSInfo.cpp:68
ConsensusXMLFile.h
main
int main(int argc, const char **argv)
Definition: OpenPepXL.cpp:297
OpenMS::OpenPepXLAlgorithm::run
ExitCodes run(PeakMap &unprocessed_spectra, ConsensusMap &cfeatures, std::vector< FASTAFile::FASTAEntry > &fasta_db, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids, OPXLDataStructs::PreprocessedPairSpectra &preprocessed_pair_spectra, std::vector< std::pair< Size, Size > > &spectrum_pairs, std::vector< std::vector< OPXLDataStructs::CrossLinkSpectrumMatch > > &all_top_csms, PeakMap &spectra)
Performs the main function of this class, the search for cross-linked peptides.
OpenMS::TOPPBase
Base class for TOPP applications.
Definition: TOPPBase.h:144
OpenMS::MzIdentMLFile::store
void store(const String &filename, const std::vector< ProteinIdentification > &poid, const std::vector< PeptideIdentification > &peid) const
Stores the identifications in a MzIdentML file.
OpenMS::Param::copy
Param copy(const String &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
TOPPOpenPepXL::registerOptionsAndFlags_
void registerOptionsAndFlags_() override
Sets the valid command line options (with argument) and flags (without argument).
Definition: OpenPepXL.cpp:141
OpenMS::Internal::OpenMSOSInfo::getOSAsString
String getOSAsString() const
Definition: OpenMSInfo.cpp:80
OpenMS::OpenPepXLAlgorithm::enzyme_name_
String enzyme_name_
Definition: OpenPepXLAlgorithm.h:179
XQuestResultXMLFile.h
VersionInfo.h
OpenMS::OpenPepXLAlgorithm::cross_link_mass_iso_shift_
double cross_link_mass_iso_shift_
Definition: OpenPepXLAlgorithm.h:170
OpenMS::IdXMLFile::store
void store(const String &filename, const std::vector< ProteinIdentification > &protein_ids, const std::vector< PeptideIdentification > &peptide_ids, const String &document_id="")
Stores the data in an idXML file.
OpenMS::OpenPepXLAlgorithm::add_y_ions_
String add_y_ions_
Definition: OpenPepXLAlgorithm.h:184
OpenMS::OpenPepXLAlgorithm::add_b_ions_
String add_b_ions_
Definition: OpenPepXLAlgorithm.h:185
OpenMS::OpenPepXLAlgorithm::varModNames_
StringList varModNames_
Definition: OpenPepXLAlgorithm.h:175
OpenMS::FASTAFile
This class serves for reading in and writing FASTA files.
Definition: FASTAFile.h:64
OpenMS::VersionInfo::getTime
static String getTime()
Return the build time of OpenMS.
OpenMS::OpenPepXLAlgorithm::deisotope_mode_
String deisotope_mode_
Definition: OpenPepXLAlgorithm.h:182
OpenMS::MzMLFile
File adapter for MzML files.
Definition: MzMLFile.h:55
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::OpenPepXLAlgorithm::cross_link_residue2_
StringList cross_link_residue2_
Definition: OpenPepXLAlgorithm.h:168
MzMLFile.h
OpenMS::DoubleList
std::vector< double > DoubleList
Vector of double precision real types.
Definition: ListUtils.h:62
ConsensusMap.h
OpenMS::Internal::OS_WINDOWS
Definition: OpenMSInfo.cpp:58
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
OpenMS::OpenPepXLAlgorithm::UNEXPECTED_RESULT
Definition: OpenPepXLAlgorithm.h:125
OpenMS::PeakFileOptions::addMSLevel
void addMSLevel(int level)
adds a desired MS level for peaks to load
OpenMS::Size
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
IdXMLFile.h
OpenMS::OpenPepXLAlgorithm::precursor_mass_tolerance_unit_ppm_
bool precursor_mass_tolerance_unit_ppm_
Definition: OpenPepXLAlgorithm.h:160
OpenMS::OpenPepXLAlgorithm::add_losses_
String add_losses_
Definition: OpenPepXLAlgorithm.h:190
OpenMS::OpenPepXLAlgorithm::fragment_mass_tolerance_xlinks_
double fragment_mass_tolerance_xlinks_
Definition: OpenPepXLAlgorithm.h:164
OpenMS::OpenPepXLAlgorithm::ILLEGAL_PARAMETERS
Definition: OpenPepXLAlgorithm.h:124
OpenMS::ProgressLogger::startProgress
void startProgress(SignedSize begin, SignedSize end, const String &label) const
Initializes the progress display.
OpenMS::OpenPepXLAlgorithm::peptide_min_size_
Size peptide_min_size_
Definition: OpenPepXLAlgorithm.h:177
OpenMS::Internal::ARCH_32BIT
Definition: OpenMSInfo.cpp:60
OpenMS::IntList
std::vector< Int > IntList
Vector of signed integers.
Definition: ListUtils.h:55
OpenMS::Internal::OS_MACOS
Definition: OpenMSInfo.cpp:58
OpenMS::OpenPepXLAlgorithm::add_c_ions_
String add_c_ions_
Definition: OpenPepXLAlgorithm.h:188
OpenMS::Internal::OpenMS_OSNames
std::string OpenMS_OSNames[]
Definition: OpenMSInfo.cpp:59
OpenMS::OpenPepXLAlgorithm::fixedModNames_
StringList fixedModNames_
Definition: OpenPepXLAlgorithm.h:174
OpenMS::OpenPepXLAlgorithm::cross_link_residue1_
StringList cross_link_residue1_
Definition: OpenPepXLAlgorithm.h:167
OpenMS::ProgressLogger::endProgress
void endProgress() const
Ends the progress display.
OpenMS::Internal::getOSInfo
static OpenMSOSInfo getOSInfo()
Definition: OpenMSInfo.cpp:92
OpenMS::OpenPepXLAlgorithm::cross_link_mass_light_
double cross_link_mass_light_
Definition: OpenPepXLAlgorithm.h:169
OpenMS::OpenPepXLAlgorithm::decoy_prefix_
bool decoy_prefix_
Definition: OpenPepXLAlgorithm.h:155
OpenMS::DefaultParamHandler
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
TOPPOpenPepXL::TOPPOpenPepXL
TOPPOpenPepXL()
Definition: OpenPepXL.cpp:135
OpenMS::OpenPepXLAlgorithm::max_variable_mods_per_peptide_
Size max_variable_mods_per_peptide_
Definition: OpenPepXLAlgorithm.h:176
OpenMS::OPXLDataStructs::PreprocessedPairSpectra
The PreprocessedPairSpectra struct represents the result of comparing a light and a heavy labeled spe...
Definition: OPXLDataStructs.h:303
OPXLDataStructs.h
OpenMS::MzIdentMLFile
File adapter for MzIdentML files.
Definition: MzIdentMLFile.h:67
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::OpenPepXLAlgorithm::cross_link_mass_mono_link_
DoubleList cross_link_mass_mono_link_
Definition: OpenPepXLAlgorithm.h:171
OpenPepXLAlgorithm.h
OpenMS::XQuestResultXMLFile
Used to load and store xQuest result files.
Definition: XQuestResultXMLFile.h:55
OpenMS::ProgressLogger
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:54
OpenMS::MetaInfoInterface::setMetaValue
void setMetaValue(const String &name, const DataValue &value)
Sets the DataValue corresponding to a name.
OpenMS::DataValue
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition: DataValue.h:56
OpenMS::Internal::ARCH_64BIT
Definition: OpenMSInfo.cpp:60
ProgressLogger.h
OpenMS::MzMLFile::load
void load(const String &filename, PeakMap &map)
Loads a map from a MzML file. Spectra and chromatograms are sorted by default (this can be disabled u...
FASTAFile.h
int
OpenMS::ProteinIdentification::SearchParameters::db
String db
The used database.
Definition: ProteinIdentification.h:224
OpenMS::Internal::OS_LINUX
Definition: OpenMSInfo.cpp:58
OpenMS::Internal::ARCH_UNKNOWN
Definition: OpenMSInfo.cpp:60
OpenMS::OpenPepXLAlgorithm::cross_link_name_
String cross_link_name_
Definition: OpenPepXLAlgorithm.h:172
OpenMS::OpenPepXLAlgorithm::add_z_ions_
String add_z_ions_
Definition: OpenPepXLAlgorithm.h:189
OpenMS::DefaultParamHandler::setParameters
void setParameters(const Param &param)
Sets the parameters.
OpenMS::Internal::OS_UNKNOWN
Definition: OpenMSInfo.cpp:58
OpenMS::Internal::OpenMSOSInfo::arch
OpenMS_Architecture arch
Definition: OpenMSInfo.cpp:78
OpenMS::Internal::OpenMS_ArchNames
std::string OpenMS_ArchNames[]
Definition: OpenMSInfo.cpp:61
OpenMS::VersionInfo::getVersion
static String getVersion()
Return the version number of OpenMS.
OpenMS::DefaultParamHandler::getParameters
const Param & getParameters() const
Non-mutable access to the parameters.
OpenMS::ConsensusMap
A container for consensus elements.
Definition: ConsensusMap.h:79
OpenMS::StringList
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
OpenMS::ConsensusXMLFile::load
void load(const String &filename, ConsensusMap &map)
Loads a consensus map from file and calls updateRanges.
OpenMS::OpenPepXLAlgorithm::add_a_ions_
String add_a_ions_
Definition: OpenPepXLAlgorithm.h:187
OpenMS::VersionInfo::getRevision
static String getRevision()
Return the revision number from revision control system, e.g. git.
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
OpenMS::File::getUserDirectory
static String getUserDirectory()
OpenMS::OpenPepXLAlgorithm
Definition: OpenPepXLAlgorithm.h:115
OpenMS::Param::update
bool update(const Param &p_outdated, const bool add_unknown=false)
Rescue parameter values from p_outdated to current param.
TOPPOpenPepXL
Definition: OpenPepXL.cpp:131
OpenMS::OpenMS_Log_debug
Logger::LogStream OpenMS_Log_debug
Global static instance of a LogStream to capture messages classified as debug output....
OpenMS::FASTAFile::load
static void load(const String &filename, std::vector< FASTAEntry > &data)
loads a FASTA file given by 'filename' and stores the information in 'data'
OpenMS::OpenPepXLAlgorithm::min_precursor_charge_
Int min_precursor_charge_
Definition: OpenPepXLAlgorithm.h:157
OpenMS::File::getOpenMSDataPath
static String getOpenMSDataPath()
Returns the OpenMS data path (environment variable overwrites the default installation path)
OpenMS::Internal::OpenMSOSInfo::os_version
String os_version
Definition: OpenMSInfo.cpp:77
OpenMS::PeakFileOptions
Options for loading files containing peak data.
Definition: PeakFileOptions.h:47
OpenMS::TOPPBase::ExitCodes
ExitCodes
Exit codes.
Definition: TOPPBase.h:149
String.h
OpenMS::OpenPepXLAlgorithm::missed_cleavages_
Size missed_cleavages_
Definition: OpenPepXLAlgorithm.h:178
OpenMS::PeakFileOptions::clearMSLevels
void clearMSLevels()
clears the MS levels
OpenMS::Param
Management and storage of parameters / INI files.
Definition: Param.h:73
OpenMS::File::getTempDirectory
static String getTempDirectory()
The current OpenMS temporary data path (for temporary files)
OpenMS::OpenPepXLAlgorithm::ExitCodes
ExitCodes
Exit codes.
Definition: OpenPepXLAlgorithm.h:121
OpenMS::VersionInfo::getBranch
static String getBranch()
Return the branch name from revision control system, e.g. git.
OpenMS::OpenPepXLAlgorithm::add_x_ions_
String add_x_ions_
Definition: OpenPepXLAlgorithm.h:186
OpenMS::Internal::OpenMS_Architecture
OpenMS_Architecture
Definition: OpenMSInfo.cpp:60
OPENMS_LOG_INFO
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
OpenMS::Internal::OpenMS_OS
OpenMS_OS
Definition: OpenMSInfo.cpp:58
OpenMS::Internal::OpenMSOSInfo::OpenMSOSInfo
OpenMSOSInfo()
Definition: OpenMSInfo.cpp:70
OpenMS::XQuestResultXMLFile::store
void store(const String &filename, const std::vector< ProteinIdentification > &poid, const std::vector< PeptideIdentification > &peid) const
Stores the identifications in a xQuest XML file.
OpenMS::OpenPepXLAlgorithm::precursor_correction_steps_
IntList precursor_correction_steps_
Definition: OpenPepXLAlgorithm.h:161
TOPPOpenPepXL::main_
ExitCodes main_(int, const char **) override
The actual "main" method. main_() is invoked by main().
Definition: OpenPepXL.cpp:172
OpenMS::ProteinIdentification::SearchParameters
Search parameters of the DB search.
Definition: ProteinIdentification.h:221
OpenMS::Internal::OpenMSOSInfo::getArchAsString
String getArchAsString() const
Definition: OpenMSInfo.cpp:85
OpenMS::TOPPBase::main
ExitCodes main(int argc, const char **argv)
Main routine of all TOPP applications.
StandardTypes.h
File.h
MzIdentMLFile.h
OpenMS::MzMLFile::getOptions
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
OpenMS::ProgressLogger::setLogType
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
OpenMS::OpenPepXLAlgorithm::precursor_mass_tolerance_
double precursor_mass_tolerance_
Definition: OpenPepXLAlgorithm.h:159
OpenMS::Internal::OpenMSOSInfo::os
OpenMS_OS os
Definition: OpenMSInfo.cpp:76
TOPPBase.h
OpenMS::ConsensusXMLFile
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:61
OpenMS::IdXMLFile
Used to load and store idXML files.
Definition: IdXMLFile.h:63
OpenMS::Internal::getBinaryArchitecture
OpenMS_Architecture getBinaryArchitecture()
Definition: OpenMSInfo.cpp:191
OpenMS::OpenPepXLAlgorithm::max_precursor_charge_
Int max_precursor_charge_
Definition: OpenPepXLAlgorithm.h:158
OpenMS::OpenPepXLAlgorithm::decoy_string_
String decoy_string_
Definition: OpenPepXLAlgorithm.h:154
OpenMS::OpenPepXLAlgorithm::fragment_mass_tolerance_unit_ppm_
bool fragment_mass_tolerance_unit_ppm_
Definition: OpenPepXLAlgorithm.h:165
OpenMS::OpenPepXLAlgorithm::number_top_hits_
Int number_top_hits_
Definition: OpenPepXLAlgorithm.h:181