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
ef77225c
Commit
ef77225c
authored
6 years ago
by
Langella Olivier
Browse files
Options
Downloads
Patches
Plain Diff
grab mascot parameters
parent
79b54719
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
+126
-17
126 additions, 17 deletions
src/input/mascot/mascotdatparser.cpp
src/input/mascot/mascotdatparser.h
+1
-0
1 addition, 0 deletions
src/input/mascot/mascotdatparser.h
with
127 additions
and
17 deletions
src/input/mascot/mascotdatparser.cpp
+
126
−
17
View file @
ef77225c
...
...
@@ -38,7 +38,8 @@
#include
"../../core/peptideevidence.h"
MascotDatParser
::
MascotDatParser
(
Project
*
p_project
,
IdentificationGroup
*
p_identification_group
,
Project
*
p_project
,
IdentificationGroup
*
p_identification_group
,
IdentificationDataSource
*
p_identification_data_source
)
{
_p_project
=
p_project
;
...
...
@@ -71,6 +72,14 @@ MascotDatParser::parse(QIODevice *in_stream)
parseProteinLine
(
mime_parser
.
getCurrentTextStream
().
readLine
());
}
}
else
if
(
mime_parser
.
getCurrentFileName
()
==
"parameters"
)
{
while
(
!
mime_parser
.
getCurrentTextStream
().
atEnd
())
{
parseParametersLine
(
mime_parser
.
getCurrentTextStream
().
readLine
());
}
}
else
if
(
mime_parser
.
getCurrentFileName
()
==
"header"
)
{
while
(
!
mime_parser
.
getCurrentTextStream
().
atEnd
())
...
...
@@ -321,6 +330,103 @@ MascotDatParser::parseHeaderLine(const QString &header_line)
}
}
void
MascotDatParser
::
parseParametersLine
(
const
QString
&
header_line
)
{
if
(
_regexp_header_line
.
exactMatch
(
header_line
))
{
QStringList
header_list
=
_regexp_header_line
.
capturedTexts
();
/*
* LICENSE=licence du logiciel
MP=
NM=
COM=WP4 Batch4 inj2 paramSTR QEKAC160601_02.raw.mgf
IATOL=
IA2TOL=
IASTOL=
IBTOL=
IB2TOL=
IBSTOL=
IYTOL=
IY2TOL=
IYSTOL=
SEG=
SEGT=
SEGTU=
LTOL=
TOL=5
TOLU=ppm
ITH=
ITOL=70
ITOLU=mmu
PFA=1
DB=Contaminants_WP4_D
DB2=S_cerevisiae_D
DB3=UPS1UPS2_D
MODS=Carbamidomethyl (C)
MASS=Monoisotopic
CLE=Trypsin/P
FILE=F:\MSData\Batch4 Qex+TOUL Injection2\QEKAC160601_02.raw.mgf
PEAK=
QUE=
TWO=
SEARCH=MIS
USERNAME=AMH
USEREMAIL=
CHARGE=2+ and 3+
INTERMEDIATE=
REPORT= AUTO
OVERVIEW=
FORMAT=Mascot generic
FORMVER=1.01
FRAG=
IT_MODS=Acetyl (Protein N-term),Oxidation (M)
USER00=
USER01=
USER02=
USER03=
USER04=
USER05=
USER06=
USER07=
USER08=
USER09=
USER10=
USER11=
USER12=
PRECURSOR=
TAXONOMY=All entries
ACCESSION=
REPTYPE=
SUBCLUSTER=
ICAT=
INSTRUMENT=ESI FTMS HCD
ERRORTOLERANT=
FRAMES=
CUTOUT=
USERID=0
QUANTITATION=
DECOY=
PEP_ISOTOPE_ERROR=
MULTI_SITE_MODS=
DATAURL=
RULES=1,2,4,5,6,7,8,9,10,13,14,15,17,18
INTERNALS=0.0,700.0
*/
if
(
header_list
[
1
]
==
"FILE"
)
{
// FILE=F:\MSData\Batch4 Qex+TOUL Injection2\QEKAC160601_02.raw.mgf
/* not finished
QFileInfo fileinfo(header_list[2]);
_p_identification_data_source->getMsRunSp().get()->setSampleName(
fileinfo.baseName());
*/
_p_identification_data_source
->
getMsRunSp
().
get
()
->
setFilename
(
header_list
[
2
]);
}
}
}
void
MascotDatParser
::
parsePeptidesLine
(
const
QString
&
peptide_line
)
{
...
...
@@ -415,8 +521,9 @@ MascotDatParser::parsePeptidesLine(const QString &peptide_line)
catch
(
pappso
::
PappsoException
exception_pappso
)
{
_error_str
=
QObject
::
tr
(
"ERROR in MascotDatParser::parsePeptidesLine "
"%1, PAPPSO exception:
\n
%2"
)
_error_str
=
QObject
::
tr
(
"ERROR in MascotDatParser::parsePeptidesLine "
"%1, PAPPSO exception:
\n
%2"
)
.
arg
(
peptide_line
)
.
arg
(
exception_pappso
.
qwhat
());
qDebug
()
<<
_error_str
;
...
...
@@ -424,11 +531,11 @@ MascotDatParser::parsePeptidesLine(const QString &peptide_line)
}
catch
(
std
::
exception
exception_std
)
{
_error_str
=
QObject
::
tr
(
"ERROR in MascotDatParser::parsePeptidesLine %1, std
exception:
\n
%2"
)
.
arg
(
peptide_line
)
.
arg
(
exception_std
.
what
());
_error_str
=
QObject
::
tr
(
"ERROR in MascotDatParser::parsePeptidesLine %1, std "
"
exception:
\n
%2"
)
.
arg
(
peptide_line
)
.
arg
(
exception_std
.
what
());
qDebug
()
<<
_error_str
;
throw
pappso
::
PappsoException
(
_error_str
);
}
...
...
@@ -482,11 +589,11 @@ MascotDatParser::parseQueryLine(const QString &query_line)
catch
(
pappso
::
PappsoException
exception_pappso
)
{
_error_str
=
QObject
::
tr
(
"ERROR in MascotDatParser::parseQueryLine %1, PAPPSO
exception:
\n
%2"
)
.
arg
(
query_line
)
.
arg
(
exception_pappso
.
qwhat
());
_error_str
=
QObject
::
tr
(
"ERROR in MascotDatParser::parseQueryLine %1, PAPPSO "
"
exception:
\n
%2"
)
.
arg
(
query_line
)
.
arg
(
exception_pappso
.
qwhat
());
qDebug
()
<<
_error_str
;
throw
pappso
::
PappsoException
(
_error_str
);
}
...
...
@@ -633,9 +740,10 @@ MascotDatParser::savePeptideList(std::vector<PeptideLine> &peptide_list,
if
(
is_decoy
)
{
peptide_evidence
.
setEvalue
(
getEvalue
(
ion_score
,
_decoy_summary_list
.
at
(
_current_query
.
query_index
-
1
),
0.05
));
peptide_evidence
.
setEvalue
(
getEvalue
(
ion_score
,
_decoy_summary_list
.
at
(
_current_query
.
query_index
-
1
),
0.05
));
}
else
{
...
...
@@ -767,7 +875,8 @@ MascotDatParser::getEvalue(pappso::pappso_double ion_score,
pappso
::
pappso_double
MascotDatParser
::
getEvalueExperimental
(
pappso
::
pappso_double
ion_score
,
SummaryLine
&
summary_line
,
pappso
::
pappso_double
ion_score
,
SummaryLine
&
summary_line
,
pappso
::
pappso_double
confidence_interval
)
const
{
// Evalue experimental Homology threshold (QPlughole value from .dat file).
...
...
This diff is collapsed.
Click to expand it.
src/input/mascot/mascotdatparser.h
+
1
−
0
View file @
ef77225c
...
...
@@ -43,6 +43,7 @@ class MascotDatParser
void
parse
(
QIODevice
*
in_stream
);
private:
void
parseParametersLine
(
const
QString
&
parameters_line
);
void
parseProteinLine
(
const
QString
&
protein_line
);
void
parseHeaderLine
(
const
QString
&
protein_line
);
void
parsePeptidesLine
(
const
QString
&
peptide_line
);
...
...
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