OpenMS
MQMsms Class Reference

Builds a MaxQuant msms.txt. More...

#include <OpenMS/QC/MQMsmsExporter.h>

Collaboration diagram for MQMsms:
[legend]

Public Member Functions

 MQMsms (const OpenMS::String &path)
 Creates MQMsms object and msms.txt in given path. More...
 
 ~MQMsms ()
 Closes f_stream. More...
 
void exportFeatureMap (const OpenMS::FeatureMap &feature_map, const OpenMS::ConsensusMap &cmap, const OpenMS::MSExperiment &exp, const std::map< OpenMS::String, OpenMS::String > &prot_map={})
 

Private Member Functions

void exportHeader_ ()
 Writes the header of msms.txt (Names of columns) More...
 
void exportRowFromFeature_ (const OpenMS::Feature &f, const OpenMS::ConsensusMap &cmap, const OpenMS::Size c_feature_number, const OpenMS::String &raw_file, const std::multimap< OpenMS::String, std::pair< OpenMS::Size, OpenMS::Size >> &UIDs, const OpenMS::ProteinIdentification::Mapping &mp_f, const OpenMS::MSExperiment &exp={}, const std::map< OpenMS::String, OpenMS::String > &prot_map={})
 Export one Feature as a row in msms.txt. More...
 

Private Attributes

std::fstream file_
 Stream where the data is added to create msms.txt. More...
 
OpenMS::Size id_ = 0
 number of rows in msms.txt to give each row a specific id More...
 
OpenMS::String filename_
 path and name of the msms.txt More...
 

Detailed Description

Builds a MaxQuant msms.txt.

This class is closely related to QualityControl, it creates an msms.txt similar to a MaxQuant msms.txt. But not all columns of a MaxQuant file get exported. By the construction of an object, the column names of the msms values are added to the msms.txt. For the construction a valid path is needed (check out constructor) where the msms.txt can be stored. To fill the output msms.txt with data from the MS/MS run use the exportFeatureMap function, it needs a FeatureMap and the matching ConsensusMap as an input. To check if the created msms.txt is writable use the function isValid.

Constructor & Destructor Documentation

◆ MQMsms()

MQMsms ( const OpenMS::String path)
explicit

Creates MQMsms object and msms.txt in given path.

If the path for the constructor is empty (path not valid), no msms.txt is created. If the creation of the fstream object is successful a constant header is added to the msms.txt If the path does not exist, it will be created

Exceptions
Exception::FileNotWritableif msms.txt could not be created
Parameters
paththat is the path where msms.txt has to be stored

◆ ~MQMsms()

~MQMsms ( )

Closes f_stream.

Member Function Documentation

◆ exportFeatureMap()

void exportFeatureMap ( const OpenMS::FeatureMap feature_map,
const OpenMS::ConsensusMap cmap,
const OpenMS::MSExperiment exp,
const std::map< OpenMS::String, OpenMS::String > &  prot_map = {} 
)

◆ exportHeader_()

void exportHeader_ ( )
private

Writes the header of msms.txt (Names of columns)

◆ exportRowFromFeature_()

void exportRowFromFeature_ ( const OpenMS::Feature f,
const OpenMS::ConsensusMap cmap,
const OpenMS::Size  c_feature_number,
const OpenMS::String raw_file,
const std::multimap< OpenMS::String, std::pair< OpenMS::Size, OpenMS::Size >> &  UIDs,
const OpenMS::ProteinIdentification::Mapping mp_f,
const OpenMS::MSExperiment exp = {},
const std::map< OpenMS::String, OpenMS::String > &  prot_map = {} 
)
private

Export one Feature as a row in msms.txt.

If the feature has no PepID's or the corresponding CF has no PepIDs, no row will be exported

Parameters
fFeature to extract evidence data
cmapConsensusMap to extract msms data if Feature has no valid PeptideIdentifications
c_feature_numberIndex of corresponding ConsensusFeature in ConsensusMap
raw_fileis specifying the raw_file the feature belongs to
UIDsUIDs of all PeptideIdentifications of the ConsensusMap
mp_fMapping between the FeatureMap and ProteinIdentifications for the UID from PeptideIdenfitication::buildUIDfromAllPepIds
expMS Experiment holds evidence data to extract
prot_mapMapping a protein_accession to its description(proteinname, genename...)

Member Data Documentation

◆ file_

std::fstream file_
private

Stream where the data is added to create msms.txt.

◆ filename_

OpenMS::String filename_
private

path and name of the msms.txt

◆ id_

OpenMS::Size id_ = 0
private

number of rows in msms.txt to give each row a specific id