OpenMS  3.0.0
QuantitativeExperimentalDesign.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-2022.
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: Timo Sachsenberg $
32 // $Authors: Immanuel Luhn$
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
39 #include <OpenMS/FORMAT/TextFile.h>
42 
43 //#include <vector>
44 
45 namespace OpenMS
46 {
56  class OPENMS_DLLAPI QuantitativeExperimentalDesign :
57  public DefaultParamHandler
58  {
59 public:
60 
63 
64  //Destructor
66 
72  void applyDesign2Resolver(ProteinResolver & resolver, TextFile & file, StringList & fileNames);
73 
74 private:
77 
80 
81  void mergeConsensusMaps_(ConsensusMap & map, const String & experiment, StringList & file_paths);
82 
83  void mergeIDFiles_(std::vector<ProteinIdentification> & proteins, std::vector<PeptideIdentification> & peptides, const String & experiment, StringList & file_paths);
84 
85  void findRelevantFilePaths_(std::map<String, StringList> & design2FileBaseName, std::map<String, StringList> & design2FilePath, StringList & filePaths);
86 
88  void analyzeHeader_(UInt & expCol, UInt & fileCol, StringList & header);
89 
91  void getSeparator_(String & separator);
92 
94  void mapFiles2Design_(std::map<String, StringList> & experiments, TextFile & file);
95 
96 
97  };
98 
99 } // namespace OpenMS
100 
DefaultParamHandler.h
ConsensusXMLFile.h
MzTabFile.h
OpenMS::TOPPBase
Base class for TOPP applications.
Definition: TOPPBase.h:147
OpenMS::Ms2SpectrumStats::compute
std::vector< PeptideIdentification > compute(const MSExperiment &exp, FeatureMap &features, const QCBase::SpectraMap &map_to_spectrum)
Calculate the ScanEventNumber, find all unidentified MS2-Spectra and add them to unassigned PeptideId...
OpenMS::QCBase::Requires::TRAFOALIGN
FileHandler.h
FileTypes.h
OpenMS::MzTabFile
File adapter for MzTab files.
Definition: MzTabFile.h:55
TextFile.h
Size
OpenMS::RTAlignment
Take the original retention time before map alignment and use the alignment's trafoXML for calculatio...
Definition: RTAlignment.h:53
OpenMS::ConsensusXMLFile::store
void store(const String &filename, const ConsensusMap &consensus_map)
Stores a consensus map to file.
RTAlignment.h
PSMExplainedIonCurrent.h
OpenMS::Contaminants::compute
void compute(FeatureMap &features, const std::vector< FASTAFile::FASTAEntry > &contaminants)
Checks if the peptides are in the contaminant database.
OpenMS::QCBase::names_of_toleranceUnit
static const std::string names_of_toleranceUnit[]
strings corresponding to enum ToleranceUnit
Definition: QCBase.h:83
OpenMS::FASTAFile
This class serves for reading in and writing FASTA files If the protein/gene sequence contains unusua...
Definition: FASTAFile.h:60
OpenMS::ProteinIdentification::Mapping::identifier_to_msrunpath
std::map< String, StringList > identifier_to_msrunpath
Definition: ProteinIdentification.h:80
OpenMS::FragmentMassError
Definition: FragmentMassError.h:48
OpenMS::MzMLFile
File adapter for MzML files.
Definition: MzMLFile.h:57
OpenMS::MzTab::exportConsensusMapToMzTab
static MzTab exportConsensusMapToMzTab(const ConsensusMap &consensus_map, const String &filename, const bool first_run_inference_only, const bool export_unidentified_features, const bool export_unassigned_ids, const bool export_subfeatures, const bool export_empty_pep_ids=false, const bool export_all_psms=false, const String &title="ConsensusMap export from OpenMS")
export linked peptide features aka consensus map
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::Exception::Precondition
Precondition failed exception.
Definition: Exception.h:157
MzMLFile.h
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:70
OpenMS::TextFile
This class provides some basic file handling methods for text files.
Definition: TextFile.h:46
OpenMS::Size
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
IdXMLFile.h
FeatureXMLFile.h
OpenMS::MzTab
Data model of MzTab files. Please see the official MzTab specification at https://code....
Definition: MzTab.h:477
OpenMS::IDConflictResolverAlgorithm::resolve
static void resolve(FeatureMap &features, bool keep_matching=false)
Resolves ambiguous annotations of features with peptide identifications. The the filtered identificat...
PeptideAndProteinQuant.h
FWHM.h
OpenMS::ProteinIdentification::Mapping::runpath_to_identifier
std::map< StringList, String > runpath_to_identifier
Definition: ProteinIdentification.h:81
OpenMS::QCBase::Requires
Requires
Enum to encode a file type as a bit.
Definition: QCBase.h:60
OpenMS::MzTab::setMetaData
void setMetaData(const MzTabMetaData &md)
OpenMS::PSMExplainedIonCurrent
Definition: PSMExplainedIonCurrent.h:48
OpenMS::ProteinIdentification::Mapping
two way mapping from ms-run-path to protID|pepID-identifier
Definition: ProteinIdentification.h:78
OpenMS::QCBase::SpectraMap
Map to find a spectrum via its NativeID.
Definition: QCBase.h:89
OpenMS::FragmentMassError::compute
void compute(FeatureMap &fmap, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, ToleranceUnit tolerance_unit=ToleranceUnit::AUTO, double tolerance=20)
computes FragmentMassError (FME) in ppm and Dalton (only of the first PeptideHit of each PepID)
OpenMS::DefaultParamHandler
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
OpenMS::PeptideIdentification::getHits
const std::vector< PeptideHit > & getHits() const
returns the peptide hits as const
OpenMS::Exception::InvalidParameter
Exception indicating that an invalid parameter was handed over to an algorithm.
Definition: Exception.h:339
OpenMS::ListUtils::concatenate
static String concatenate(const std::vector< T > &container, const String &glue="")
Concatenates all elements of the container and puts the glue string between elements.
Definition: ListUtils.h:209
OpenMS::MzTabMetaData
all meta data of a mzTab file. Please refer to specification for documentation.
Definition: MzTab.h:140
UInt64
OpenMS::RTAlignment::compute
void compute(FeatureMap &fm, const TransformationDescription &trafo) const
Calculates retention time after map alignment and sets meta values "rt_raw" and "rt_align" in all Pep...
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
OpenMS::UID
OPENMS_UINT64_TYPE UID
A unique object ID (as unsigned 64bit type).
Definition: Types.h:120
Exception.h
OpenMS::MissedCleavages::compute
void compute(FeatureMap &fmap)
Counts the number of MissedCleavages per PeptideIdentification.
Contaminants.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...
OpenMS::TIC
Definition: TIC.h:55
TransformationXMLFile.h
FASTAFile.h
OpenMS::Ms2IdentificationRate::addMetaDataMetricsToMzTab
void addMetaDataMetricsToMzTab(MzTabMetaData &meta) const
OpenMS::MzCalibration::compute
void compute(FeatureMap &features, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum)
Writes results as meta values to the PeptideIdentification of the given FeatureMap.
OpenMS::FeatureXMLFile::load
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
OpenMS::QuantitativeExperimentalDesign
Merge files according to experimental design.
Definition: QuantitativeExperimentalDesign.h:56
OpenMS::ConsensusFeature
A consensus feature spanning multiple LC-MS/MS experiments.
Definition: ConsensusFeature.h:69
OpenMS::MzTabFile::store
void store(const String &filename, const MzTab &mz_tab) const
OpenMS::QCBase::isRunnable
bool isRunnable(const Status &s) const
OpenMS::TIC::compute
Result compute(const MSExperiment &exp, float bin_size=0, UInt ms_level=1)
Compute Total Ion Count and applies the resampling algorithm, if a bin size in RT seconds greater tha...
OpenMS::ConsensusMap::getUnassignedPeptideIdentifications
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications() const
non-mutable access to the unassigned peptide identifications
OpenMS::QCBase::Requires::CONTAMINANTS
OpenMS::PSMExplainedIonCurrent::compute
void compute(FeatureMap &fmap, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, ToleranceUnit tolerance_unit=ToleranceUnit::AUTO, double tolerance=20)
computes PSMExplainedIonCurrent (only of the first PeptideHit of each PepID)
Ms2IdentificationRate.h
OpenMS::Exception::NotImplemented
Not implemented exception.
Definition: Exception.h:428
OpenMS::Ms2IdentificationRate::compute
void compute(const FeatureMap &feature_map, const MSExperiment &exp, bool assume_all_target=false)
computes Ms2 Identification Rate with FeatureMap
OpenMS::ConsensusMap
A container for consensus elements.
Definition: ConsensusMap.h:82
OpenMS::StringList
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
OpenMS::FeatureXMLFile::store
void store(const String &filename, const FeatureMap &feature_map)
stores the map feature_map in file with name filename.
MQEvidence
Builds a MaxQuant Evidence.txt.
Definition: MQEvidenceExporter.h:43
OpenMS::ConsensusXMLFile::load
void load(const String &filename, ConsensusMap &map)
Loads a consensus map from file and calls updateRanges.
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
MetaInfoInterfaceUtils.h
OpenMS::ConsensusMap::SplitMeta::COPY_ALL
copy all meta values to all feature maps
OpenMS::Contaminants
This class is a metric for the QualityControl TOPP tool.
Definition: Contaminants.h:53
OpenMS::FWHM
QC metric calculating (un)calibrated m/z error.
Definition: FWHM.h:54
OpenMS::QCBase::ToleranceUnit::SIZE_OF_TOLERANCEUNIT
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:71
MSExperiment.h
OpenMS::ProteinIdentification::Mapping::create
void create(const std::vector< ProteinIdentification > &prot_ids)
Definition: ProteinIdentification.h:89
OpenMS::MetaInfoInterface::addMetaValues
void addMetaValues(const MetaInfoInterface &from)
function to copy all meta values from one object to this one
OpenMS::TransformationXMLFile::load
void load(const String &filename, TransformationDescription &transformation, bool fit_model=true)
Loads the transformation from an TransformationXML file.
OPENMS_LOG_ERROR
#define OPENMS_LOG_ERROR
Macro to be used if non-fatal error are reported (processing continues)
Definition: LogStream.h:455
OpenMS::FeatureMap
A container for features.
Definition: FeatureMap.h:98
OpenMS::PeptideIdentification
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:63
OpenMS::TransformationXMLFile
Used to load and store TransformationXML files.
Definition: TransformationXMLFile.h:56
OpenMS::Feature
An LC-MS feature.
Definition: Feature.h:70
IDConflictResolverAlgorithm.h
OpenMS::FlagSet
Stores and handles combinations of enum values, e.g. a set of flags as bits flipped in an UInt64.
Definition: FlagSet.h:53
OpenMS::FASTAFile::load
void load(const String &filename, std::vector< FASTAEntry > &data) const
loads a FASTA file given by 'filename' and stores the information in 'data' This uses more RAM than r...
OpenMS::FeatureXMLFile
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:62
FragmentMassError.h
ProteinResolver.h
TIC.h
OpenMS::MzCalibration
QC metric calculating (un)calibrated m/z error.
Definition: MzCalibration.h:58
OPENMS_LOG_INFO
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
MissedCleavages.h
MQEvidenceExporter.h
OpenMS::MzTab::getMetaData
const MzTabMetaData & getMetaData() const
OpenMS::Ms2IdentificationRate
This class is a metric for the QualityControl-ToppTool.
Definition: Ms2IdentificationRate.h:56
OpenMS::PeptideIdentification::buildUIDsFromAllPepIDs
static std::multimap< String, std::pair< Size, Size > > buildUIDsFromAllPepIDs(const ConsensusMap &cmap)
Builds MultiMap over all PI's via their UID (as obtained from buildUIDFromPepID()),...
OpenMS::PeptideMass::compute
void compute(FeatureMap &features)
Sets the 'mass' metavalue to all PeptideHits by computing the theoretical mass.
OpenMS::QCBase::ToleranceUnit
ToleranceUnit
Definition: QCBase.h:75
PeptideIdentification.h
OpenMS::MissedCleavages
This class is a metric for the QualityControl TOPP Tool.
Definition: MissedCleavages.h:58
PeptideMass.h
OpenMS::TIC::addMetaDataMetricsToMzTab
void addMetaDataMetricsToMzTab(MzTabMetaData &meta, std::vector< Result > &tics)
append QC data for given metrics to mzTab's MTD section
OpenMS::ProteinResolver
Helper class for peptide and protein quantification based on feature data annotated with IDs.
Definition: ProteinResolver.h:54
OpenMS::TransformationDescription
Generic description of a coordinate transformation.
Definition: TransformationDescription.h:62
OpenMS::QCBase::Requires::POSTFDRFEAT
OpenMS::PeptideIdentification::buildUIDFromPepID
static String buildUIDFromPepID(const PeptideIdentification &pep_id, const std::map< String, StringList > &fidentifier_to_msrunpath)
Builds UID from PeptideIdentification The UID can be formed in two ways. Either it is composed of the...
MzCalibration.h
Ms2SpectrumStats.h
OpenMS::QCBase::isLabeledExperiment
static bool isLabeledExperiment(const ConsensusMap &cm)
check if the IsobaricAnalyzer TOPP tool was used to create this ConsensusMap
OpenMS::QCBase::SpectraMap::calculateMap
void calculateMap(const MSExperiment &exp)
calculate a new map, delete the old one
MzIdentMLFile.h
OpenMS::PeptideMass
QC metric calculating theoretical mass of a peptide sequence.
Definition: PeptideMass.h:49
TOPPBase.h
OpenMS::FWHM::compute
void compute(FeatureMap &features)
Moves FWHM metavalues from the feature to all its PeptideIdentifications (since that's were mzTab tak...
OpenMS::QCBase::Requires::RAWMZML
OpenMS::ConsensusXMLFile
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:58
OpenMS::Ms2SpectrumStats
QC metric to determine the number of MS2 scans per MS1 scan over RT.
Definition: Ms2SpectrumStats.h:67
OpenMS::PeptideIdentification::empty
bool empty() const
Returns if this PeptideIdentification result is empty.