Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xtpcpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PAPPSO
xtpcpp
Commits
8ebc741a
Commit
8ebc741a
authored
7 years ago
by
Olivier Langella
Browse files
Options
Downloads
Patches
Plain Diff
WIP: reading identification using pwiz library
parent
05ade944
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/input/identificationpwizreader.cpp
+52
-1
52 additions, 1 deletion
src/input/identificationpwizreader.cpp
with
52 additions
and
1 deletion
src/input/identificationpwizreader.cpp
+
52
−
1
View file @
8ebc741a
...
...
@@ -38,6 +38,7 @@
#include
<pwiz/data/identdata/IdentData.hpp>
#include
<pwiz/data/identdata/IdentDataFile.hpp>
#include
"../core/peptidematch.h"
#include
<locale>
#include
"../core/proteinxtp.h"
#include
"../core/peptidextp.h"
...
...
@@ -120,13 +121,63 @@ void IdentificationPwizReader::read(
}
for
(
pwiz
::
identdata
::
PeptideEvidencePtr
seq_ptr
:
_pwiz_ident_data_file
->
sequenceCollection
.
peptideEvidence
)
{
}
//std::vector<SpectrumIdentificationListPtr> spectrumIdentificationList
//std::vector<SpectrumIdentificationResultPtr> spectrumIdentificationResult
for
(
pwiz
::
identdata
::
SpectrumIdentificationListPtr
spectrum_ident_list_ptr
:
_pwiz_ident_data_file
->
dataCollection
.
analysisData
.
spectrumIdentificationList
)
{
for
(
pwiz
::
identdata
::
SpectrumIdentificationResultPtr
spectrum_ptr
:
spectrum_ident_list_ptr
.
get
()
->
spectrumIdentificationResult
)
{
unsigned
int
scan
=
0
;
if
(
spectrum_ptr
.
get
()
->
hasCVParam
(
pwiz
::
cv
::
MS_scan_number_s__OBSOLETE
))
{
scan
=
std
::
stoi
(
spectrum_ptr
.
get
()
->
cvParam
(
pwiz
::
cv
::
MS_scan_number_s__OBSOLETE
).
value
);
}
else
{
throw
pappso
::
PappsoException
(
QObject
::
tr
(
"Scan number not found"
));
}
//<cvParam accession="MS:1001115" cvRef="PSI-MS" value="4925" name="scan number(s)"/>
PeptideMatch
*
p_peptide_match
=
new
PeptideMatch
(
_sp_msrun
.
get
(),
scan
);
double
rt
=
0
;
if
(
spectrum_ptr
.
get
()
->
hasCVParam
(
pwiz
::
cv
::
MS_retention_time
))
{
rt
=
std
::
stod
(
spectrum_ptr
.
get
()
->
cvParam
(
pwiz
::
cv
::
MS_retention_time
).
value
);
p_peptide_match
->
setRetentionTime
(
rt
);
}
else
{
//throw pappso::PappsoException(QObject::tr("Scan number not found"));
}
/*
p_peptide_match->setEvalue(attributes.value("expect").simplified().toDouble());
//qDebug() << "XtandemSaxHandler::startElement_domain evalue " << _p_peptide_match->getEvalue() << " scan " << _p_peptide_match->getScan();
pappso::pappso_double xtandem_mhtheo = attributes.value("mh").simplified().toDouble();
pappso::pappso_double xtandem_delta = attributes.value("delta").simplified().toDouble();
pappso::pappso_double exp_mass = xtandem_mhtheo + xtandem_delta - pappso::MHPLUS;
p_peptide_match->setExperimentalMass(exp_mass);
p_peptide_match->setStart(attributes.value("start").simplified().toUInt()-1);
p_peptide_match->setCharge(_charge);
p_peptide_match->setParam(PeptideMatchParam::tandem_hyperscore, QVariant( attributes.value("hyperscore").toDouble()));
p_peptide_match->setIdentificationDataSource( _p_identification_data_source);
p_peptide_match->setChecked(true);
_p_protein_match->addPeptideMatch(p_peptide_match);
*/
}
}
}
catch
(
pappso
::
PappsoException
&
error
)
{
qDebug
()
<<
"IdentificationPwizReader::read error "
;
throw
pappso
::
PappsoException
(
QObject
::
tr
(
"Error reading file (%1) using proteowizard library : %2"
).
arg
(
_identfile
.
absoluteFilePath
()).
arg
(
error
.
qwhat
()));
}
catch
(
std
::
exception
&
error
)
{
qDebug
()
<<
"IdentificationPwizReader::read std error "
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment