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
c82e8b16
Commit
c82e8b16
authored
7 years ago
by
Langella Olivier
Browse files
Options
Downloads
Patches
Plain Diff
same evalue as computed by MASCOT java dat parser
parent
93d79254
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/input/mascot/mascotdatparser.cpp
+13
-3
13 additions, 3 deletions
src/input/mascot/mascotdatparser.cpp
src/input/mascot/mascotdatparser.h
+11
-8
11 additions, 8 deletions
src/input/mascot/mascotdatparser.h
with
24 additions
and
11 deletions
src/input/mascot/mascotdatparser.cpp
+
13
−
3
View file @
c82e8b16
...
...
@@ -320,6 +320,7 @@ void MascotDatParser::parseSummaryLine(const QString & summary_line) {
//qmass1=598.300206
if
(
index
.
startsWith
(
"qmass"
))
{
unsigned
int
query_index
=
index
.
mid
(
5
).
toUInt
();
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
<<
" "
<<
query_index
<<
" "
<<
index
;
//_current_query.title = value;
_summary_list
[
query_index
-
1
].
exp_mass
=
value
.
toDouble
();
}
...
...
@@ -380,7 +381,6 @@ void MascotDatParser::saveQuery() {
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
...
...
@@ -394,6 +394,10 @@ void MascotDatParser::saveQuery() {
peptide_sp
=
PeptideXtp
(
peptide_str
).
makePeptideXtpSp
();
peptide_sp
=
_p_project
->
getPeptideStore
().
getInstance
(
peptide_sp
);
qDebug
()
<<
"MascotDatParser::saveQuery peptide="
<<
peptide_str
<<
" evalue="
<<
peptide_evidence
.
getEvalue
()
<<
" ionscore="
<<
ion_score
;
if
(
peptide_line
.
protein_string_list
.
size
()
!=
peptide_line
.
fasta_file_list
.
size
())
{
throw
pappso
::
PappsoException
(
QObject
::
tr
(
"ERROR (peptide_line.protein_string_list.size() != peptide_line.fasta_file_list.size()) %1"
).
arg
(
peptide_line
.
protein_string_list
.
join
(
",
\"
"
)));
}
...
...
@@ -435,6 +439,12 @@ void MascotDatParser::saveQuery() {
}
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
)));
pappso
::
pappso_double
identity_threshold
=
(
pappso
::
pappso_double
)
10.0
*
std
::
log
(
_summary_list
.
at
(
query_index
-
1
).
match
/
(
confidence_interval
*
(
pappso
::
pappso_double
)
20.0
))
/
log
((
pappso
::
pappso_double
)
10
);;
return
(
confidence_interval
*
pow
((
pappso
::
pappso_double
)
10
,
((
identity_threshold
-
ion_score
)
/
(
pappso
::
pappso_double
)
10
)));
}
pappso
::
pappso_double
MascotDatParser
::
getEvalueExperimental
(
pappso
::
pappso_double
ion_score
,
unsigned
int
query_index
,
pappso
::
pappso_double
confidence_interval
)
const
{
// Evalue experimental Homology threshold (QPlughole value from .dat file).
pappso
::
pappso_double
eval
=
(
ion_score
-
_summary_list
.
at
(
query_index
-
1
).
plug_hole
)
/
(
pappso
::
pappso_double
)
10
;
eval
=
confidence_interval
/
pow
((
pappso
::
pappso_double
)
10
,
eval
);
}
This diff is collapsed.
Click to expand it.
src/input/mascot/mascotdatparser.h
+
11
−
8
View file @
c82e8b16
...
...
@@ -47,11 +47,14 @@ private:
void
parseSummaryLine
(
const
QString
&
summary_line
);
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
;
pappso
::
pappso_double
getEvalueExperimental
(
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
;
...
...
@@ -80,21 +83,21 @@ private:
ProteinXtp
_current_protein
;
std
::
vector
<
FastaFileSp
>
_fasta_file_list
;
QRegExp
_regexp_header_line
;
unsigned
int
_number_of_queries
=
0
;
unsigned
int
_number_of_residues
=
0
;
unsigned
int
_current_query_index
=
0
;
QString
_error_str
;
PeptideLine
_current_peptide
;
QueryLine
_current_query
;
std
::
vector
<
std
::
vector
<
PeptideLine
>>
_query_peptide_results
;
std
::
vector
<
SummaryLine
>
_summary_list
;
};
#endif // MASCOTDATPARSER_H
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