OpenMS  2.5.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-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: 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:144
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:58
TextFile.h
OpenMS::UInt64
OPENMS_UINT64_TYPE UInt64
Unsigned integer type (64bit)
Definition: Types.h:77
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.
OpenMS::QCBase::requires
virtual Status requires() const =0
Returns the input data requirements of the compute(...) function.
OpenMS::QCBase::Status
Storing a status of available/needed inputs (i.e. a set of Requires) as UInt64.
Definition: QCBase.h:118
OpenMS::MzTabParameter::setName
void setName(const String &name)
RTAlignment.h
OpenMS::FragmentMassError::ToleranceUnit
ToleranceUnit
Definition: FragmentMassError.h:48
OpenMS::Exception::InvalidValue
Invalid value exception.
Definition: Exception.h:335
OpenMS::Contaminants::compute
void compute(FeatureMap &features, const std::vector< FASTAFile::FASTAEntry > &contaminants)
Checks if the peptides are in the contaminant database.
OpenMS::FASTAFile
This class serves for reading in and writing FASTA files.
Definition: FASTAFile.h:64
OpenMS::FragmentMassError
Definition: FragmentMassError.h:45
OpenMS::MzMLFile
File adapter for MzML files.
Definition: MzMLFile.h:55
OpenMS::String
A more convenient string class.
Definition: String.h:58
MzMLFile.h
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
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:855
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
OpenMS::Ms2IdentificationRate::compute
void compute(const FeatureMap &feature_map, const MSExperiment &exp, bool force_fdr=false)
computes Ms2 Identification Rate
OPENMS_LOG_WARN
#define OPENMS_LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged.
Definition: LogStream.h:460
OpenMS::QCBase::Requires
Requires
Enum to encode a file type as a bit.
Definition: QCBase.h:58
OpenMS::ProteinIdentification
Representation of a protein identification run.
Definition: ProteinIdentification.h:71
OpenMS::MzTab::setMetaData
void setMetaData(const MzTabMetaData &md)
OpenMS::QCBase::SpectraMap
Map to find a spectrum via its NativeID.
Definition: QCBase.h:75
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 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:91
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:347
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:193
OpenMS::MzTabMetaData
all meta data of a mzTab file. Please refer to specification for documentation.
Definition: MzTab.h:524
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 String &title="ConsensusMap export from OpenMS")
export linked peptide features aka consensus map
OpenMS::FragmentMassError::ToleranceUnit::SIZE_OF_TOLERANCEUNIT
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:46
OpenMS::UID
OPENMS_UINT64_TYPE UID
A unique object ID (as unsigned 64bit type).
Definition: Types.h:120
OpenMS::MzTabMetaData::custom
std::map< Size, MzTabParameter > custom
Definition: MzTab.h:570
Exception.h
OpenMS::MissedCleavages::compute
void compute(FeatureMap &fmap)
Counts the number of MissedCleavages per PeptideIdentification.
OpenMS::MzTabParameter::setAccession
void setAccession(const String &accession)
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:52
TransformationXMLFile.h
FASTAFile.h
OpenMS::ConsensusMap::getProteinIdentifications
const std::vector< ProteinIdentification > & getProteinIdentifications() const
non-mutable access to the protein identifications
OpenMS::QCBase
This class serves as an abstract base class for all QC classes.
Definition: QCBase.h:52
OpenMS::QCBase::getName
virtual const String & getName() const =0
Returns the name of the metric.
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::QCBase::Requires::SIZE_OF_REQUIRES
OpenMS::QuantitativeExperimentalDesign
Merge files according to experimental design.
Definition: QuantitativeExperimentalDesign.h:56
OpenMS::MzTabParameter
Definition: MzTab.h:276
OpenMS::MzTabFile::store
void store(const String &filename, const MzTab &mz_tab) const
OpenMS::ConsensusMap::getUnassignedPeptideIdentifications
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications() const
non-mutable access to the unassigned peptide identifications
OpenMS::QCBase::Requires::CONTAMINANTS
OpenMS::FragmentMassError::names_of_toleranceUnit
static const std::string names_of_toleranceUnit[]
strings corresponding to enum ToleranceUnit
Definition: FragmentMassError.h:56
Ms2IdentificationRate.h
seqan::find
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
OpenMS::ConsensusMap
A container for consensus elements.
Definition: ConsensusMap.h:79
OpenMS::FeatureMap::getUnassignedPeptideIdentifications
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications() const
non-mutable access to the unassigned peptide identifications
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.
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
OpenMS::Contaminants
This class is a metric for the QualityControl TOPP tool.
Definition: Contaminants.h:52
OpenMS::QCBase::names_of_requires
static const std::string names_of_requires[]
strings corresponding to enum Requires
Definition: QCBase.h:70
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
MSExperiment.h
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:95
OpenMS::PeptideIdentification
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
OpenMS::TransformationXMLFile
Used to load and store TransformationXML files.
Definition: TransformationXMLFile.h:56
OpenMS::PeptideIdentification::getMZ
double getMZ() const
returns the MZ of the MS2 spectrum
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::Feature
An LC-MS feature.
Definition: Feature.h:70
IDConflictResolverAlgorithm.h
OpenMS::FeatureXMLFile
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
OpenMS::Ms2IdentificationRate::getResults
const std::vector< IdentificationRateData > & getResults() const
returns results
OpenMS::QCBase::Status::isSuperSetOf
bool isSuperSetOf(const Status &stat) const
Check if input status fulfills requirement status.
Definition: QCBase.h:212
FragmentMassError.h
OpenMS::PeptideIdentification::getIdentifier
const String & getIdentifier() const
returns the identifier
ProteinResolver.h
TIC.h
OpenMS::MzCalibration
QC metric calculating (un)calibrated m/z error.
Definition: MzCalibration.h:58
OpenMS::Exception::MissingInformation
Not all required information provided.
Definition: Exception.h:195
OpenMS::TIC::getResults
const std::vector< MSChromatogram > & getResults() const
MissedCleavages.h
OpenMS::MzTab::getMetaData
const MzTabMetaData & getMetaData() const
OpenMS::Ms2IdentificationRate
This class is a metric for the QualityControl-ToppTool.
Definition: Ms2IdentificationRate.h:53
OpenMS::MzTabParameter::setValue
void setValue(const String &value)
OpenMS::QCBase::iterateFeatureMap
static void iterateFeatureMap(MAP &fmap, T lambda)
function, which iterates through all PeptideIdentifications of a given FeatureMap and applies a given...
Definition: QCBase.h:244
PeptideIdentification.h
OpenMS::MissedCleavages
This class is a metric for the QualityControl TOPP Tool.
Definition: MissedCleavages.h:55
OpenMS::TIC::compute
void compute(const MSExperiment &exp, float bin_size=0)
Compute Total Ion Count and applies the resampling algorithm, if a bin size in RT seconds greater tha...
OpenMS::ProteinResolver
Helper class for peptide and protein quantification based on feature data annotated with IDs.
Definition: ProteinResolver.h:56
OpenMS::TransformationDescription
Generic description of a coordinate transformation.
Definition: TransformationDescription.h:61
OpenMS::QCBase::Requires::POSTFDRFEAT
MzCalibration.h
Ms2SpectrumStats.h
OpenMS::QCBase::SpectraMap::calculateMap
void calculateMap(const MSExperiment &exp)
calculate a new map, delete the old one
MzIdentMLFile.h
TOPPBase.h
OpenMS::MzTabParameter::setCVLabel
void setCVLabel(const String &CV_label)
OpenMS::FeatureMap::getProteinIdentifications
const std::vector< ProteinIdentification > & getProteinIdentifications() const
non-mutable access to the protein identifications
OpenMS::QCBase::Requires::RAWMZML
OpenMS::ConsensusXMLFile
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:61
OpenMS::PeptideIdentification::getRT
double getRT() const
returns the RT of the MS2 spectrum where the identification occurred
OpenMS::Ms2SpectrumStats
QC metric to determine the number of MS2 scans per MS1 scan over RT.
Definition: Ms2SpectrumStats.h:67
QCBase.h