Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
i2MassChroQ
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
i2MassChroQ
Commits
83e75fdc
Commit
83e75fdc
authored
5 years ago
by
Langella Olivier
Browse files
Options
Downloads
Patches
Plain Diff
WIP: finding best msrun for alignment reference
parent
9225e6b9
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/core/project.cpp
+64
-14
64 additions, 14 deletions
src/core/project.cpp
src/core/project.h
+5
-1
5 additions, 1 deletion
src/core/project.h
src/gui/export/export_masschroq_dialog/exportmasschroqdialog.cpp
+11
-28
11 additions, 28 deletions
.../export/export_masschroq_dialog/exportmasschroqdialog.cpp
with
80 additions
and
43 deletions
src/core/project.cpp
+
64
−
14
View file @
83e75fdc
...
...
@@ -27,6 +27,7 @@
#include
"peptidematch.h"
#include
"proteinmatch.h"
#include
<QDebug>
#include
<pappsomspp/exception/exceptionnotfound.h>
Project
::
Project
()
{
...
...
@@ -54,7 +55,7 @@ Project::readResultFile(QString filename)
_identification_data_source_store
.
getInstance
(
filename
);
ident_source
.
get
()
->
parseTo
(
this
);
qDebug
()
<<
"Project::readResultFile end"
;
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
;
}
const
ProjectMode
...
...
@@ -143,14 +144,13 @@ Project::updateAutomaticFilters(
const
AutomaticFilterParameters
&
automatic_filter_parameters
)
{
qDebug
()
<<
"Project::updateAutomaticFilters begin"
;
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
;
_automatic_filter_parameters
=
automatic_filter_parameters
;
for
(
auto
&
p_id_group
:
_identification_goup_list
)
{
p_id_group
->
updateAutomaticFilters
(
_automatic_filter_parameters
);
}
qDebug
()
<<
"Project::updateAutomaticFilters end"
;
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
;
}
ProjectSp
Project
::
makeProjectSp
()
const
...
...
@@ -168,16 +168,16 @@ Project::newIdentificationGroup()
void
Project
::
readXpipFile
(
WorkMonitorInterface
*
p_monitor
,
QFileInfo
xpip_fileinfo
)
{
qDebug
()
<<
"Project::readXpipFile begin"
;
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
;
XpipSaxHandler
*
parser_java_xpip
=
new
XpipSaxHandler
(
p_monitor
,
this
);
QXmlSimpleReader
simplereader
;
simplereader
.
setContentHandler
(
parser_java_xpip
);
simplereader
.
setErrorHandler
(
parser_java_xpip
);
qDebug
()
<<
"Project::readXpipFile Read XPIP XML result file '"
<<
xpip_fileinfo
.
absoluteFilePath
()
<<
"'"
;
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
<<
" Read XPIP XML result file '"
<<
xpip_fileinfo
.
absoluteFilePath
()
<<
"'"
;
QFile
qfile
(
xpip_fileinfo
.
absoluteFilePath
());
QXmlInputSource
xmlInputSource
(
&
qfile
);
...
...
@@ -189,7 +189,8 @@ Project::readXpipFile(WorkMonitorInterface *p_monitor, QFileInfo xpip_fileinfo)
}
else
{
qDebug
()
<<
parser_java_xpip
->
errorString
();
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
<<
parser_java_xpip
->
errorString
();
// throw PappsoException(
// QObject::tr("error reading tandem XML result file :\n").append(
// parser->errorString()));
...
...
@@ -213,7 +214,8 @@ Project::readXpipFile(WorkMonitorInterface *p_monitor, QFileInfo xpip_fileinfo)
simplereaderb
.
setContentHandler
(
parser_xtp_xpip
);
simplereaderb
.
setErrorHandler
(
parser_xtp_xpip
);
qDebug
()
<<
"Project::readXpipFile Read XPIP XML result file '"
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
<<
" Read XPIP XML result file '"
<<
xpip_fileinfo
.
absoluteFilePath
()
<<
"'"
;
QFile
qfileb
(
xpip_fileinfo
.
absoluteFilePath
());
...
...
@@ -235,7 +237,8 @@ Project::readXpipFile(WorkMonitorInterface *p_monitor, QFileInfo xpip_fileinfo)
}
else
{
qDebug
()
<<
parser_xtp_xpip
->
errorString
();
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
;
throw
pappso
::
PappsoException
(
QObject
::
tr
(
"Error reading %1 XPIP file :
\n
it is not an XPIP file"
)
...
...
@@ -281,11 +284,58 @@ Project::hasPtmExperiment() const
void
Project
::
getSameXicPeptideEvidenceList
(
std
::
vector
<
const
PeptideEvidence
*>
&
peptide_evidence_list
,
const
MsRun
*
p_msrun
,
const
PeptideXtp
*
p_peptide
,
unsigned
int
charge
)
const
const
MsRun
*
p_msrun
,
const
PeptideXtp
*
p_peptide
,
unsigned
int
charge
)
const
{
for
(
const
IdentificationGroup
*
p_ident_group
:
_identification_goup_list
)
{
p_ident_group
->
getSameXicPeptideEvidenceList
(
peptide_evidence_list
,
p_msrun
,
p_peptide
,
charge
);
p_ident_group
->
getSameXicPeptideEvidenceList
(
peptide_evidence_list
,
p_msrun
,
p_peptide
,
charge
);
}
}
void
Project
::
prepareMsrunRetentionTimesForAlignment
()
const
{
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
;
bool
is_ok
=
true
;
for
(
IdentificationDataSourceSp
p_ident_data_source
:
this
->
getIdentificationDataSourceStore
()
.
getIdentificationDataSourceList
())
{
MsRunSp
msrun_sp
=
p_ident_data_source
->
getMsRunSp
();
if
(
msrun_sp
->
findMsRunFile
())
{
// msrun_sp->checkMsRunStatistics();
msrun_sp
->
buildMsRunRetentionTime
(
p_ident_data_source
->
getPeptideEvidenceStore
());
}
else
{
is_ok
=
false
;
throw
pappso
::
ExceptionNotFound
(
QObject
::
tr
(
"MS run file %1 not found."
)
.
arg
(
msrun_sp
.
get
()
->
getFileName
()));
break
;
}
}
if
(
is_ok
)
{
for
(
auto
&
msrun_sp
:
this
->
getMsRunStore
().
getMsRunList
())
{
msrun_sp
->
computeMsRunRetentionTime
();
}
// find the best reference
}
else
{
for
(
auto
&
msrun_sp
:
this
->
getMsRunStore
().
getMsRunList
())
{
msrun_sp
->
clearMsRunRetentionTime
();
}
}
qDebug
()
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" "
<<
__LINE__
;
}
This diff is collapsed.
Click to expand it.
src/core/project.h
+
5
−
1
View file @
83e75fdc
...
...
@@ -97,9 +97,13 @@ class Project
*/
void
getSameXicPeptideEvidenceList
(
std
::
vector
<
const
PeptideEvidence
*>
&
peptide_evidence_list
,
const
MsRun
*
p_msrun
,
const
PeptideXtp
*
p_peptide
,
const
MsRun
*
p_msrun
,
const
PeptideXtp
*
p_peptide
,
unsigned
int
charge
)
const
;
void
prepareMsrunRetentionTimesForAlignment
()
const
;
private:
LabelingMethodSp
_labeling_method_sp
;
ProjectMode
_project_mode
=
ProjectMode
::
combined
;
...
...
This diff is collapsed.
Click to expand it.
src/gui/export/export_masschroq_dialog/exportmasschroqdialog.cpp
+
11
−
28
View file @
83e75fdc
...
...
@@ -38,6 +38,7 @@
#include
<QFileDialog>
#include
<pappsomspp/msrun/alignment/msrunretentiontime.h>
#include
<pappsomspp/msfile/msfileaccessor.h>
#include
<pappsomspp/pappsoexception.h>
ExportMasschroqDialog
::
ExportMasschroqDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
),
ui
(
new
Ui
::
ExportMasschroqDialog
)
...
...
@@ -268,27 +269,11 @@ ExportMasschroqDialog::doBrowseMsrunDirectory()
void
ExportMasschroqDialog
::
doFindBestMsrunForAlignment
()
{
IdentificationGroup
*
p_identification_group
=
nullptr
;
if
(
mp_project
->
getIdentificationGroupList
().
size
()
!=
1
)
{
}
else
{
// p_identification_group =
// mp_project->getIdentificationGroupList()[0]->get
}
bool
is_ok
=
true
;
for
(
IdentificationDataSourceSp
p_ident_data_source
:
mp_project
->
getIdentificationDataSourceStore
()
.
getIdentificationDataSourceList
())
for
(
auto
&
msrun_sp
:
mp_project
->
getMsRunStore
().
getMsRunList
())
{
MsRunSp
msrun_sp
=
p_ident_data_source
->
getMsRunSp
();
if
(
msrun_sp
->
findMsRunFile
())
{
// msrun_sp->checkMsRunStatistics();
msrun_sp
->
buildMsRunRetentionTime
(
p_ident_data_source
->
getPeptideEvidenceStore
());
}
else
{
...
...
@@ -301,19 +286,17 @@ ExportMasschroqDialog::doFindBestMsrunForAlignment()
break
;
}
}
if
(
is_ok
)
try
{
for
(
auto
&
msrun_sp
:
mp_project
->
getMsRunStore
().
getMsRunList
())
{
msrun_sp
->
computeMsRunRetentionTime
();
}
//find the best reference
mp_project
->
prepareMsrunRetentionTimesForAlignment
();
}
else
catch
(
pappso
::
PappsoException
&
error
)
{
for
(
auto
&
msrun_sp
:
mp_project
->
getMsRunStore
().
getMsRunList
())
{
msrun_sp
->
clearMsRunRetentionTime
();
}
QMessageBox
msgBox
;
msgBox
.
setWindowTitle
(
"Error"
);
msgBox
.
setText
(
tr
(
"Error preparing MS run retention times: %1"
).
arg
(
error
.
qwhat
()));
msgBox
.
setIcon
(
QMessageBox
::
Critical
);
msgBox
.
exec
();
}
}
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