Builds a MaxQuant Evidence.txt.
This class is closely related to QualityControl, it creates an evidence.txt similar to a MaxQuant evidence.txt. But not all columns of a MaxQuant file get exported. By the construction of an object, the column names of the evidence values are added to the evidence.txt. For the construction a valid path is needed (check out constructor) where the evidence.txt can be stored. To fill the output evidence.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 evidence.txt is writable use the function isValid.
Creates MQEvidence object and evidence.txt in given path.
If the path for the constructor is empty (path not valid), no evidence.txt is created.
If the creation of the fstream object is successful a constant header is added to the evidence.txt
If the path does not exist, it will be created
- Exceptions
-
| Exception::FileNotWritable | if evidence.txt could not be created |
- Parameters
-
| [in] | path | that is the path where evidence.txt has to be stored |
References exportHeader_(), file_, filename_, OPENMS_LOG_FATAL_ERROR, and OpenMS::to_path().
Exports a FeatureMap to the evidence.txt.
Exports one row per feature from the FeatureMap to the evidence.txt file.
- Exceptions
-
| Exception::FileNotWritable | if evidence.txt is not writable |
| Exception::MissingInformation | if Feature_map has no corresponding ConsensusFeature |
- Parameters
-
| [in] | feature_map | which contains Features to extract evidence data |
| [in] | cmap | ConsensusMap to extract evidence data if Feature has no valid PeptideIdentifications |
| [in] | exp | MS Experiment holds evidence data to extract |
| [in] | prot_map | Mapping a protein_accession to its description(proteinname, genename...) |
References File::basename(), PeptideIdentification::buildUIDsFromAllPepIDs(), IdentifierMSRunMapper::create(), exportRowFromFeature_(), file_, filename_, DocumentIdentifier::getLoadedFilePath(), FeatureMap::getPrimaryMSRunPath(), FeatureMap::getProteinIdentifications(), MQExporterHelper::isValid(), MQExporterHelper::makeFeatureUIDtoConsensusMapIndex_(), and OPENMS_LOG_ERROR.
| void exportRowFromFeature_ |
( |
const OpenMS::Feature & |
f, |
|
|
const OpenMS::ConsensusMap & |
cmap, |
|
|
const OpenMS::Size |
c_feature_number, |
|
|
const std::string & |
raw_file, |
|
|
const std::multimap< std::string, std::pair< OpenMS::Size, OpenMS::Size > > & |
UIDs, |
|
|
const OpenMS::ProteinIdentification::Mapping & |
mp_f, |
|
|
const OpenMS::MSExperiment & |
exp = {}, |
|
|
const std::map< std::string, std::string > & |
prot_map = {} |
|
) |
| |
|
private |
Export one Feature as a row in MQEvidence.txt.
If the feature has no PepID's or the corresponding CF has no PepIDs, no row will be exported
- Parameters
-
| [in] | f | Feature to extract evidence data |
| [in] | cmap | ConsensusMap to extract evidence data if Feature has no valid PeptideIdentifications |
| [in] | c_feature_number | Index of corresponding ConsensusFeature in ConsensusMap |
| [in] | raw_file | is specifying the raw_file the feature belongs to |
| [in] | UIDs | UIDs of all PeptideIdentifications of the ConsensusMap |
| [in] | mp_f | Mapping between the FeatureMap and ProteinIdentifications for the UID from PeptideIdenfitication::buildUIDfromAllPepIds |
| [in] | exp | MS Experiment holds evidence data to extract |
| [in] | prot_map | Mapping a protein_accession to its description(proteinname, genename...) |
References ListUtils::concatenate(), AASequence::empty(), ExposedVector< VectorElement >::empty(), PeptideHit::extractProteinAccessionsSet(), file_, BaseFeature::getCharge(), Feature::getConvexHulls(), Peak2D::getIntensity(), MetaInfoInterface::getMetaValue(), AASequence::getMonoWeight(), Peak2D::getMZ(), PeptideHit::getPeptideEvidences(), BaseFeature::getPeptideIdentifications(), Peak2D::getRT(), PeptideHit::getScore(), PeptideHit::getSequence(), BaseFeature::getWidth(), MQExporterHelper::hasPeptideIdentifications_(), MQExporterHelper::hasValidPepID_(), id_, PeptideHit::isDecoy(), MetaInfoInterface::metaValueExists(), OpenMS::Constants::UserParam::NUM_OF_DATAPOINTS, OpenMS::Constants::UserParam::PSM_EXPLAINED_ION_CURRENT_USERPARAM, AASequence::size(), OpenMS::StringUtils::toStr(), and AASequence::toUnmodifiedString().
Referenced by exportFeatureMap().