OpenMS  2.6.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::Status
Storing a status of available/needed inputs (i.e. a set of Requires) as UInt64.
Definition: QCBase.h:120
OpenMS::Ms2IdentificationRate::addMetaDataMetricsToMzTab
void addMetaDataMetricsToMzTab(MzTabMetaData &meta)
RTAlignment.h
OpenMS::FragmentMassError::ToleranceUnit
ToleranceUnit
Definition: FragmentMassError.h:48
OpenMS::Contaminants::compute
void compute(FeatureMap &features, const std::vector< FASTAFile::FASTAEntry > &contaminants)
Checks if the peptides are in the contaminant database.
OpenMS::ProteinIdentification::Mapping::identifier_to_msrunpath
std::map< String, StringList > identifier_to_msrunpath
Definition: ProteinIdentification.h:80
OpenMS::ConsensusMap::split
std::vector< FeatureMap > split(SplitMeta mode=SplitMeta::DISCARD) const
splits ConsensusMap into its original FeatureMaps
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:59
OpenMS::Exception::Precondition
Precondition failed exception.
Definition: Exception.h:166
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:800
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::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:77
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:92
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:469
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
Exception.h
OpenMS::MissedCleavages::compute
void compute(FeatureMap &fmap)
Counts the number of MissedCleavages per PeptideIdentification.
OpenMS::MetaInfoInterface::setMetaValue
void setMetaValue(const String &name, const DataValue &value)
Sets the DataValue corresponding to a name.
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::addMetaDataMetricsToMzTab
void addMetaDataMetricsToMzTab(MzTabMetaData &meta)
append QC data for given metrics to mzTab's MTD section
OpenMS::TIC
Definition: TIC.h:55
TransformationXMLFile.h
FASTAFile.h
OpenMS::ConsensusMap::getProteinIdentifications
const std::vector< ProteinIdentification > & getProteinIdentifications() const
non-mutable access to the protein identifications
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::MapUtilities::applyFunctionOnPeptideIDs
void applyFunctionOnPeptideIDs(T &&f, bool include_unassigned=true)
applies a function on all PeptideIDs or only assigned ones
Definition: MapUtilities.h:68
OpenMS::MzTabFile::store
void store(const String &filename, const MzTab &mz_tab) const
OpenMS::QCBase::isRunnable
bool isRunnable(const Status &s) 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
OpenMS::Exception::NotImplemented
Not implemented exception.
Definition: Exception.h:436
seqan::find
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
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:80
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
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
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
MSExperiment.h
OpenMS::ProteinIdentification::Mapping::create
void create(const std::vector< ProteinIdentification > &prot_ids)
Definition: ProteinIdentification.h:89
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:97
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::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
FragmentMassError.h
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_LOG_INFO
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
MissedCleavages.h
OpenMS::MzTab::getMetaData
const MzTabMetaData & getMetaData() const
OpenMS::Ms2IdentificationRate
This class is a metric for the QualityControl-ToppTool.
Definition: Ms2IdentificationRate.h:56
OpenMS::PeptideMass::compute
void compute(FeatureMap &features)
Sets the 'mass' metavalue to all PeptideHits by computing the theoretical mass.
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...
PeptideMass.h
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::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::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:62
OpenMS::Ms2SpectrumStats
QC metric to determine the number of MS2 scans per MS1 scan over RT.
Definition: Ms2SpectrumStats.h:67