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

WIP: mcqprm

parent b3562c22
No related branches found
No related tags found
No related merge requests found
......@@ -72,76 +72,79 @@ void MassChroqPrm::write(ProjectSp sp_project) {
//<masschroq>
_output_stream->writeStartElement("masschroqprm");
/*
*
<parameters>
<parentIonMassTolerance>
<daltonPrecision value="1.5"/>
</parentIonMassTolerance>
<fragmentIonMassTolerance>
<daltonPrecision value="0.02"/>
</fragmentIonMassTolerance>
</parameters>
*/
_output_stream->writeStartElement("parameters");
_output_stream->writeStartElement("parentIonMassTolerance");
_output_stream->writeComment("choose dalton or ppm mass precision to select parent ions based on the precursor mass of each MS/MS spectrum");
_output_stream->writeStartElement("ppmPrecision");
_output_stream->writeAttribute("value", "10");
_output_stream->writeEndElement();
_output_stream->writeEndElement();
_output_stream->writeStartElement("fragmentIonMassTolerance");
_output_stream->writeComment("choose dalton or ppm mass precision to MS/MS fragment ion observed mass with theoretical mass");
_output_stream->writeStartElement("daltonPrecision");
_output_stream->writeAttribute("value", "0.02");
_output_stream->writeEndElement();
_output_stream->writeEndElement();
_output_stream->writeEndElement();
writePeptides();
}
void MassChroqPrm::writePeptides(Identification ident) {
/*
*
*
* <peptide seq="TCVADESHAGCEK" id="p1"> <psimod at="2"
* acc="MOD:00397"/> <psimod at="11" acc="MOD:00397"/> </peptide>
*/
try {
/*
*
<parameters>
<parentIonMassTolerance>
<daltonPrecision value="1.5"/>
</parentIonMassTolerance>
<fragmentIonMassTolerance>
<daltonPrecision value="0.02"/>
</fragmentIonMassTolerance>
</parameters>
*/
_output_stream->writeStartElement("parameters");
_output_stream->writeStartElement("parentIonMassTolerance");
_output_stream->writeComment("choose dalton or ppm mass precision to select parent ions based on the precursor mass of each MS/MS spectrum");
_output_stream->writeStartElement("ppmPrecision");
_output_stream->writeAttribute("value", "10");
_output_stream->writeEndElement();
_output_stream->writeEndElement();
_output_stream->writeStartElement("fragmentIonMassTolerance");
_output_stream->writeComment("choose dalton or ppm mass precision to MS/MS fragment ion observed mass with theoretical mass");
_output_stream->writeStartElement("daltonPrecision");
_output_stream->writeAttribute("value", "0.02");
_output_stream->writeEndElement();
_output_stream->writeEndElement();
_output_stream->writeEndElement();
_output_stream->writeStartElement("peptideList");
for (Group group : ident.getGrouping().getGroupList()) {
PeptideMassSet pepMassSet = new PeptideMassSet();
logger.debug("pepMassSet size : " + pepMassSet.size());
logger.debug("pepMassSet numbering");
pepMassSet.numberingGetPepMass2PeptideList(group);
// iterated current pepid to write buffer peptide element
for (PeptideMass pepMass : pepMassSet) {
_output_stream->writeStartElement("peptide");
_output_stream->writeAttribute("id",
Utils.getPappsoPeptideMassId(group, pepMass));
Peptide bestPeptide = pepMass.getBestEvaluePeptide();
_output_stream->writeAttribute("seq", bestPeptide.getSequence());
ArrayList<Modifs> arrModif = bestPeptide.get_Modifs();
for (Modifs modif : arrModif) {
_output_stream->writeStartElement("psimod");
_output_stream->writeAttribute("at", "" + modif.get_posi());
_output_stream->writeAttribute("acc", ""
+ modif.getPsiMod().getAccession());
_output_stream->writeEndElement();
}
_output_stream->writeEndElement();
}
}
_output_stream->writeEndElement();
}
catch (pappso::PappsoException &error)
void MassChroqPrm::writePeptides() {
/*
*
*
* <peptide seq="TCVADESHAGCEK" id="p1"> <psimod at="2"
* acc="MOD:00397"/> <psimod at="11" acc="MOD:00397"/> </peptide>
*/
try {
_output_stream->writeStartElement("peptideList");
for (IdentificationGroup * p_ident_group : _sp_project.get()->getIdentificationGroupList()) {
for () {
PeptideMassSet pepMassSet = new PeptideMassSet();
logger.debug("pepMassSet size : " + pepMassSet.size());
logger.debug("pepMassSet numbering");
pepMassSet.numberingGetPepMass2PeptideList(group);
// iterated current pepid to write buffer peptide element
for (PeptideMass pepMass : pepMassSet) {
_output_stream->writeStartElement("peptide");
_output_stream->writeAttribute("id",
Utils.getPappsoPeptideMassId(group, pepMass));
Peptide bestPeptide = pepMass.getBestEvaluePeptide();
_output_stream->writeAttribute("seq", bestPeptide.getSequence());
ArrayList<Modifs> arrModif = bestPeptide.get_Modifs();
for (Modifs modif : arrModif) {
_output_stream->writeStartElement("psimod");
_output_stream->writeAttribute("at", "" + modif.get_posi());
_output_stream->writeAttribute("acc", ""
+ modif.getPsiMod().getAccession());
_output_stream->writeEndElement();
}
_output_stream->writeEndElement();
}
}
_output_stream->writeEndElement();
}
catch (pappso::PappsoException &error)
{
throw pappso::PappsoException(QObject::tr("Error in MassChroqPrm::writePeptides :\n%1").arg(error.qwhat()));
}
......@@ -149,6 +152,6 @@ void MassChroqPrm::writePeptides(Identification ident) {
{
throw pappso::PappsoException(QObject::tr("Error in MassChroqPrm::writePeptides stdex :\n%1").arg(error.what()));
}
}
}
}
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