Skip to content
Snippets Groups Projects
Commit 69f3124c authored by Langella Olivier's avatar Langella Olivier
Browse files

xtpcpp (0.2.1-1) stretch

parent 97b07e8b
No related branches found
Tags xtpcpp_0.2.1-1
No related merge requests found
......@@ -40,8 +40,8 @@ configure_file (${CMAKE_SOURCE_DIR}/debian/control.cmake ${CMAKE_SOURCE_DIR}/deb
SET(SOFTWARE_NAME "XTPcpp")
SET(XTPCPP_VERSION_MAJOR "0")
SET(XTPCPP_VERSION_MINOR "1")
SET(XTPCPP_VERSION_PATCH "23")
SET(XTPCPP_VERSION_MINOR "2")
SET(XTPCPP_VERSION_PATCH "1")
SET(XTPCPP_VERSION "${XTPCPP_VERSION_MAJOR}.${XTPCPP_VERSION_MINOR}.${XTPCPP_VERSION_PATCH}")
# Set the CMAKE_PREFIX_PATH for the find_library fonction when using non
......
xtpcpp (0.2.1-1) stretch; urgency=medium
* huge refactoring
* new xpip output file
* clear mz file list in tandem run dialog
-- Olivier Langella <olivier.langella@u-psud.fr> Wed, 22 Nov 2017 15:56:02 +0100
xtpcpp (0.1.23-1) stretch; urgency=medium
* better ODS and XPIP file
......
......@@ -43,7 +43,9 @@ IdentificationDataSource::~IdentificationDataSource()
{
}
const PeptideEvidenceStore & IdentificationDataSource::getPeptideEvidenceStore() const {
return _peptide_evidence_store;
}
PeptideEvidenceStore & IdentificationDataSource::getPeptideEvidenceStore() {
return _peptide_evidence_store;
}
......
......@@ -47,6 +47,7 @@ public:
bool operator==(const IdentificationDataSource& other) const;
PeptideEvidenceStore & getPeptideEvidenceStore();
const PeptideEvidenceStore & getPeptideEvidenceStore() const;
void setXmlId(const QString xmlid);
const QString & getXmlId() const;
......
......@@ -128,7 +128,7 @@ void ProteinMatch::setChecked(bool arg1) {
}
void ProteinMatch::addPeptideMatch(const PeptideMatch & peptide_match) {
qDebug() << "ProteinMatch::addPeptideMatch begin " << peptide_match.getPeptideEvidence()->getPeptideXtpSp().get()->toAbsoluteString();
//qDebug() << "ProteinMatch::addPeptideMatch begin " << peptide_match.getPeptideEvidence()->getPeptideXtpSp().get()->toAbsoluteString();
_peptide_match_list.push_back(peptide_match);
}
......
......@@ -365,26 +365,63 @@ void Xpip::writeIdentificationGroupList() {
qDebug() << "Xpip::writeIdentificationGroupList end";
}
void Xpip::dedupPeptideMatch(const IdentificationGroup * p_identification_group) {
qDebug() << "Xpip::dedupPeptideMatch begin";
qDebug() << "Xpip::dedupPeptideMatch end";
void Xpip::writePeptideEvidence(const PeptideEvidence * p_peptide_evidence) {
qDebug() << "Xpip::writePeptideEvidence begin";
_output_stream->writeStartElement("peptide_evidence");
QString idp = QString("pe%1").arg(pappso::Utils::getLexicalOrderedString(_map_peptide_evidences.size()+1));
_map_peptide_evidences.insert(std::pair<const PeptideEvidence *, QString>(p_peptide_evidence, idp));
_output_stream->writeAttribute("id",idp);
_output_stream->writeAttribute("source_id",p_peptide_evidence->getIdentificationDataSource()->getXmlId());
//_output_stream->writeAttribute("ms_id",p_peptide_match->getMsRunP()->getXmlId());
_output_stream->writeAttribute("peptide_id",_map_peptides.at( p_peptide_evidence->getPeptideXtpSp().get()));
_output_stream->writeAttribute("scan",QString("%1").arg(p_peptide_evidence->getScan()));
writeDoubleAttribute("rt",p_peptide_evidence->getRetentionTime());
writeDoubleAttribute("evalue",p_peptide_evidence->getEvalue());
writeDoubleAttribute("exp_mass",p_peptide_evidence->getExperimentalMass());
_output_stream->writeAttribute("charge",QString("%1").arg(p_peptide_evidence->getCharge()));
if (p_peptide_evidence->isChecked()) {
_output_stream->writeAttribute("checked","true");
}
else {
_output_stream->writeAttribute("checked","false");
}
const std::map<PeptideMatchParam, QVariant> & params = p_peptide_evidence->getParamList();
//if (params.size() > 0) {
// _output_stream->writeStartElement("stats");
for (const std::pair<PeptideMatchParam, QVariant> param_pair: params) {
_output_stream->writeStartElement("param");
_output_stream->writeAttribute("key",QString("%1").arg(static_cast<std::int8_t>(param_pair.first)));
_output_stream->writeAttribute("value",param_pair.second.toString());
_output_stream->writeEndElement();
}
// _output_stream->writeEndElement();
_output_stream->writeEndElement(); //peptide_evidence
qDebug() << "Xpip::writePeptideEvidence end";
}
void Xpip::writeUniquePeptideMatch(const IdentificationGroup * p_identification_group) {
qDebug() << "Xpip::writeUniquePeptideMatch begin";
dedupPeptideMatch(p_identification_group);
_output_stream->writeStartElement("peptide_match_list");
_output_stream->writeEndElement(); //peptide_match_list
qDebug() << "Xpip::writeUniquePeptideMatch end";
void Xpip::writePeptideEvidenceList(const IdentificationGroup * p_identification_group) {
qDebug() << "Xpip::writePeptideEvidenceList begin";
_output_stream->writeStartElement("peptide_evidence_list");
for (const IdentificationDataSource * p_ident_source : p_identification_group->getIdentificationDataSourceList()) {
for (const PeptideEvidenceSp & sp_peptide_evidence:p_ident_source->getPeptideEvidenceStore().getPeptideEvidenceList()) {
writePeptideEvidence(sp_peptide_evidence.get());
}
}
_output_stream->writeEndElement(); //peptide_evidence_list
qDebug() << "Xpip::writePeptideEvidenceList end";
}
void Xpip::writeIdentificationGroup(const IdentificationGroup * p_identification_group) {
qDebug() << "Xpip::writeIdentificationGroup begin";
_output_stream->writeStartElement("identification_group");
writeUniquePeptideMatch(p_identification_group);
writePeptideEvidenceList(p_identification_group);
_output_stream->writeStartElement("protein_match_list");
for (const ProteinMatch * p_protein_match : p_identification_group->getProteinMatchList()) {
//std::vector<ProteinMatch *> & getProteinMatchList()
......@@ -409,35 +446,8 @@ void Xpip::writeIdentificationGroup(const IdentificationGroup * p_identification
void Xpip::writePeptideMatch(const PeptideMatch & peptide_match) {
qDebug() << "Xpip::writePeptideMatch begin";
_output_stream->writeStartElement("peptide_match");
_output_stream->writeAttribute("source_id",peptide_match.getPeptideEvidence()->getIdentificationDataSource()->getXmlId());
//_output_stream->writeAttribute("ms_id",p_peptide_match->getMsRunP()->getXmlId());
_output_stream->writeAttribute("peptide_id",_map_peptides.at( peptide_match.getPeptideEvidence()->getPeptideXtpSp().get()));
_output_stream->writeAttribute("scan",QString("%1").arg(peptide_match.getPeptideEvidence()->getScan()));
writeDoubleAttribute("rt",peptide_match.getPeptideEvidence()->getRetentionTime());
writeDoubleAttribute("evalue",peptide_match.getPeptideEvidence()->getEvalue());
writeDoubleAttribute("exp_mass",peptide_match.getPeptideEvidence()->getExperimentalMass());
_output_stream->writeAttribute("peptide_evidence_id",_map_peptide_evidences.at( peptide_match.getPeptideEvidence()));
_output_stream->writeAttribute("start",QString("%1").arg(peptide_match.getStart()));
_output_stream->writeAttribute("charge",QString("%1").arg(peptide_match.getPeptideEvidence()->getCharge()));
if (peptide_match.getPeptideEvidence()->isChecked()) {
_output_stream->writeAttribute("checked","true");
}
else {
_output_stream->writeAttribute("checked","false");
}
const std::map<PeptideMatchParam, QVariant> & params = peptide_match.getPeptideEvidence()->getParamList();
//if (params.size() > 0) {
// _output_stream->writeStartElement("stats");
for (const std::pair<PeptideMatchParam, QVariant> param_pair: params) {
_output_stream->writeStartElement("param");
_output_stream->writeAttribute("key",QString("%1").arg(static_cast<std::int8_t>(param_pair.first)));
_output_stream->writeAttribute("value",param_pair.second.toString());
_output_stream->writeEndElement();
}
// _output_stream->writeEndElement();
//}
_output_stream->writeEndElement(); //protein_match_list
qDebug() << "Xpip::writePeptideMatch end";
......
......@@ -59,9 +59,9 @@ private :
void writeLabelingMethod();
void writeIdentificationGroupList();
void writeIdentificationGroup(const IdentificationGroup * p_identification_group);
void dedupPeptideMatch(const IdentificationGroup * p_identification_group);
void writeUniquePeptideMatch(const IdentificationGroup * p_identification_group);
void writePeptideEvidenceList(const IdentificationGroup * p_identification_group);
void writePeptideMatch(const PeptideMatch & peptide_match);
void writePeptideEvidence(const PeptideEvidence * p_peptide_evidence);
QString getPeptideId(std::size_t crc_peptide) const;
......@@ -72,6 +72,7 @@ private :
std::map<pappso::AaModificationP, QString> _map_modifications;
std::map<const PeptideXtp *, QString> _map_peptides;
std::map<const PeptideEvidence *, QString> _map_peptide_evidences;
};
......
......@@ -36,7 +36,7 @@
std::shared_ptr<PeptideEvidence> & PeptideEvidenceStore::getInstance(const PeptideEvidence * p_peptide_evidence) {
qDebug() << "PeptideEvidenceStore::getInstance begin" ;
//qDebug() << "PeptideEvidenceStore::getInstance begin" ;
std::multimap<unsigned int ,PeptideEvidenceSp>::iterator it = _multimap_scan_evidence.find(p_peptide_evidence->getScan());
std::multimap<unsigned int ,PeptideEvidenceSp>::iterator find_it = _multimap_scan_evidence.end();
......@@ -54,16 +54,21 @@ std::shared_ptr<PeptideEvidence> & PeptideEvidenceStore::getInstance(const Pepti
find_it = _multimap_scan_evidence.insert(std::pair<unsigned int , PeptideEvidenceSp>(p_peptide_evidence->getScan(), p_peptide_evidence->makePeptideEvidenceSp()));
_peptide_evidence_list.push_back(find_it->second);
}
qDebug() << "PeptideEvidenceStore::getInstance end " << find_it->second.get()->getScan() << " size=" << _multimap_scan_evidence.size();
//qDebug() << "PeptideEvidenceStore::getInstance end " << find_it->second.get()->getScan() << " size=" << _multimap_scan_evidence.size();
return find_it->second;
}
void PeptideEvidenceStore::updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters) {
qDebug() << "PeptideEvidenceStore::updateAutomaticFilters begin" ;
_multimap_scan_evidence.clear();
for (PeptideEvidenceSp & peptide_evidence_sp:_peptide_evidence_list) {
peptide_evidence_sp.get()->updateAutomaticFilters(automatic_filter_parameters);
}
qDebug() << "PeptideEvidenceStore::updateAutomaticFilters end" ;
}
const std::vector<std::shared_ptr<PeptideEvidence>> & PeptideEvidenceStore::getPeptideEvidenceList() const {
return _peptide_evidence_list;
}
......@@ -43,6 +43,8 @@ class PeptideEvidenceStore
public:
std::shared_ptr<PeptideEvidence> & getInstance(const PeptideEvidence * p_peptide_evidence);
void updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters);
const std::vector<std::shared_ptr<PeptideEvidence>> & getPeptideEvidenceList() const;
private:
std::vector<std::shared_ptr<PeptideEvidence>> _peptide_evidence_list;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment