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
93d79254
Commit
93d79254
authored
7 years ago
by
Langella Olivier
Browse files
Options
Downloads
Patches
Plain Diff
compute MASCOT evalue
parent
00e57c9c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/input/mascot/mascotdatparser.cpp
+15
-3
15 additions, 3 deletions
src/input/mascot/mascotdatparser.cpp
src/input/mascot/mascotdatparser.h
+6
-2
6 additions, 2 deletions
src/input/mascot/mascotdatparser.h
src/utils/types.h
+5
-3
5 additions, 3 deletions
src/utils/types.h
with
26 additions
and
8 deletions
src/input/mascot/mascotdatparser.cpp
+
15
−
3
View file @
93d79254
...
...
@@ -29,6 +29,7 @@
#include
"mascotdatparser.h"
#include
"mimeparser.h"
#include
<cmath>
#include
<QDebug>
#include
<pappsomspp/pappsoexception.h>
#include
"../../core/peptidextp.h"
...
...
@@ -328,7 +329,7 @@ void MascotDatParser::parseSummaryLine(const QString & summary_line) {
else
if
(
index
.
startsWith
(
"qmatch"
))
{
unsigned
int
query_index
=
index
.
mid
(
6
).
toUInt
();
//_current_query.title = value;
_summary_list
[
query_index
-
1
].
match
=
value
.
to
UInt
();
_summary_list
[
query_index
-
1
].
match
=
value
.
to
Double
();
}
//qplughole1=14.820890
else
if
(
index
.
startsWith
(
"qplughole"
))
{
...
...
@@ -368,12 +369,18 @@ void MascotDatParser::saveQuery() {
peptide_evidence
.
setExperimentalMass
(
_summary_list
[
_current_query
.
query_index
-
1
].
exp_mass
);
peptide_evidence
.
setRetentionTime
(
_current_query
.
rt
);
peptide_evidence
.
setParam
(
PeptideEvidenceParam
::
mascot_macth_score
,
QVariant
(
_summary_list
[
_current_query
.
query_index
-
1
].
match
));
peptide_evidence
.
setIdentificationDataSource
(
_p_identification_data_source
);
//parse and save
for
(
PeptideLine
&
peptide_line
:
peptide_list
)
{
pappso
::
pappso_double
ion_score
=
peptide_line
.
peptide_string_list
.
at
(
7
).
toDouble
();
peptide_evidence
.
setParam
(
PeptideEvidenceParam
::
mascot_score
,
QVariant
(
ion_score
));
peptide_evidence
.
setEvalue
(
getEvalue
(
ion_score
,
_current_query
.
query_index
,
0.05
));
peptide_evidence
.
setParam
(
PeptideEvidenceParam
::
mascot_expectation_value
,
QVariant
(
peptide_evidence
.
getEvalue
()));
QString
peptide_str
=
peptide_line
.
peptide_string_list
.
at
(
4
);
if
(
!
peptide_line
.
subst
.
isEmpty
())
{
//q856_p9_subst=1,X,W
...
...
@@ -426,3 +433,8 @@ void MascotDatParser::saveQuery() {
qDebug
()
<<
"MascotDatParser::saveQuery end"
;
}
pappso
::
pappso_double
MascotDatParser
::
getEvalue
(
pappso
::
pappso_double
ion_score
,
unsigned
int
query_index
,
pappso
::
pappso_double
confidence_interval
)
const
{
double
identity_threshold
=
10.0
*
std
::
log
(
_summary_list
.
at
(
query_index
-
1
).
match
/
(
confidence_interval
*
20.0
))
/
log
(
10
);;
return
(
confidence_interval
*
pow
(
10
,
((
identity_threshold
-
ion_score
)
/
10
)));
}
This diff is collapsed.
Click to expand it.
src/input/mascot/mascotdatparser.h
+
6
−
2
View file @
93d79254
...
...
@@ -48,6 +48,10 @@ private:
void
saveQuery
();
void
saveAndClearPeptide
();
pappso
::
pappso_double
getEvalue
(
pappso
::
pappso_double
ion_score
,
unsigned
int
query_index
,
pappso
::
pappso_double
confidence_interval
=
0.05
)
const
;
struct
PeptideLine
{
unsigned
int
query_index
=
0
;
unsigned
int
peptide_index
=
0
;
...
...
@@ -63,9 +67,9 @@ private:
QString
title
;
};
struct
SummaryLine
{
unsigned
int
match
=
0
;
pappso
::
pappso_double
match
=
0
;
//qmatch, identity threshold
pappso
::
pappso_double
exp_mass
=
0
;
pappso
::
pappso_double
plug_hole
=
0
;
pappso
::
pappso_double
plug_hole
=
0
;
//qplughole, homology threshold
};
private
:
Project
*
_p_project
;
...
...
This diff is collapsed.
Click to expand it.
src/utils/types.h
+
5
−
3
View file @
93d79254
...
...
@@ -51,11 +51,13 @@ enum class IdentificationEngine: std::int8_t {
};
/** \def PeptideEvidenceParam peptide evidence specific parameters
*
*
is_a: MS:1001143 ! PSM-level search engine specific statistic
*/
enum
class
PeptideEvidenceParam
:
std
::
int8_t
{
tandem_hyperscore
=
0
,
///< X!Tandem hyperscore
mascot_macth_score
=
1
///< MASCOT match score
tandem_hyperscore
=
0
,
///< X!Tandem hyperscore MS:1001331
tandem_expectation_value
=
1
,
///< X!Tandem expectation value MS:1001330
mascot_score
=
2
,
///< PSI-MS MS:1001171 mascot:score 56.16
mascot_expectation_value
=
3
///< PSI-MS MS:1001172 mascot:expectation value 2.42102904673618e-006
};
/** \def IdentificationEngineParam identification engine parameters
...
...
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