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
fd70b054
Commit
fd70b054
authored
7 years ago
by
Langella Olivier
Browse files
Options
Downloads
Patches
Plain Diff
error if fasta file is not found
parent
0d70f987
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/proteinmatch.cpp
+3
-3
3 additions, 3 deletions
src/core/proteinmatch.cpp
src/files/fastafile.cpp
+5
-0
5 additions, 0 deletions
src/files/fastafile.cpp
src/gui/project_view/projectwindow.cpp
+65
-39
65 additions, 39 deletions
src/gui/project_view/projectwindow.cpp
with
73 additions
and
42 deletions
src/core/proteinmatch.cpp
+
3
−
3
View file @
fd70b054
...
...
@@ -64,7 +64,7 @@ bool ProteinMatch::contains(PeptideMatch * peptide_match) const {
}
void
ProteinMatch
::
updateAutomaticFilters
(
const
AutomaticFilterParameters
&
automatic_filter_parameters
)
{
qDebug
()
<<
"ProteinMatch::updateAutomaticFilters begin "
;
//
qDebug() <<"ProteinMatch::updateAutomaticFilters begin " ;
_proxy_valid
=
false
;
unsigned
int
number_of_valid_peptides
=
0
;
bool
cross_sample
=
automatic_filter_parameters
.
getFilterCrossSamplePeptideNumber
();
...
...
@@ -91,7 +91,7 @@ void ProteinMatch::updateAutomaticFilters(const AutomaticFilterParameters & auto
}
}
qDebug
()
<<
"ProteinMatch::updateAutomaticFilters begin 2"
;
//
qDebug() <<"ProteinMatch::updateAutomaticFilters begin 2" ;
if
(
number_of_valid_peptides
==
0
)
{
_proxy_valid
=
false
;
...
...
@@ -105,7 +105,7 @@ void ProteinMatch::updateAutomaticFilters(const AutomaticFilterParameters & auto
}
}
}
qDebug
()
<<
"ProteinMatch::updateAutomaticFilters end "
<<
number_of_valid_peptides
;
//
qDebug() <<"ProteinMatch::updateAutomaticFilters end " << number_of_valid_peptides ;
}
const
ProteinXtpSp
&
ProteinMatch
::
getProteinXtpSp
()
const
{
...
...
This diff is collapsed.
Click to expand it.
src/files/fastafile.cpp
+
5
−
0
View file @
fd70b054
...
...
@@ -25,6 +25,7 @@
#include
<pappsomspp/fasta/fastareader.h>
#include
<QStringList>
#include
<QDebug>
#include
<pappsomspp/exception/exceptionnotfound.h>
class
AccessionContaminantReader
:
public
pappso
::
FastaHandlerInterface
{
public:
...
...
@@ -94,10 +95,12 @@ void FastaFile::setContaminants(ProteinStore & protein_store) const {
}
else
{
qDebug
()
<<
"FastaFile::setContaminants "
<<
_fasta_source
.
absoluteFilePath
()
<<
" not open"
;
throw
pappso
::
ExceptionNotFound
(
QObject
::
tr
(
"unable to open contaminant fasta file
\"
%1
\"
"
).
arg
(
_fasta_source
.
absoluteFilePath
()));
}
}
else
{
qDebug
()
<<
"FastaFile::setContaminants "
<<
_fasta_source
.
absoluteFilePath
()
<<
" does not exists"
;
throw
pappso
::
ExceptionNotFound
(
QObject
::
tr
(
"contaminant fasta file
\"
%1
\"
not found"
).
arg
(
_fasta_source
.
absoluteFilePath
()));
}
}
...
...
@@ -113,9 +116,11 @@ void FastaFile::setDecoys(ProteinStore & protein_store) const {
}
else
{
qDebug
()
<<
"FastaFile::setDecoys "
<<
_fasta_source
.
absoluteFilePath
()
<<
" not open"
;
throw
pappso
::
ExceptionNotFound
(
QObject
::
tr
(
"unable to open decoy fasta file
\"
%1
\"
"
).
arg
(
_fasta_source
.
absoluteFilePath
()));
}
}
else
{
qDebug
()
<<
"FastaFile::setDecoys "
<<
_fasta_source
.
absoluteFilePath
()
<<
" does not exists"
;
throw
pappso
::
ExceptionNotFound
(
QObject
::
tr
(
"decoy fasta file
\"
%1
\"
not found"
).
arg
(
_fasta_source
.
absoluteFilePath
()));
}
}
This diff is collapsed.
Click to expand it.
src/gui/project_view/projectwindow.cpp
+
65
−
39
View file @
fd70b054
...
...
@@ -282,29 +282,42 @@ void ProjectWindow::computeMassPrecision() {
void
ProjectWindow
::
doFdrChanged
()
{
qDebug
()
<<
"ProjectWindow::doFdrChanged begin "
;
showWaitingMessage
(
tr
(
"FDR modifications"
));
doDisplayLoadingMessage
(
tr
(
"tagging decoy proteins"
));
QModelIndexList
index_list
=
ui
->
decoy_database_listview
->
selectionModel
()
->
selectedIndexes
();
if
(
index_list
.
size
()
>
0
)
{
_project_sp
.
get
()
->
getProteinStore
().
clearDecoys
();
for
(
QModelIndex
index
:
index_list
)
{
if
(
index
.
data
(
Qt
::
UserRole
).
canConvert
<
FastaFile
*>
())
{
FastaFile
*
p_fasta_file
=
index
.
data
(
Qt
::
UserRole
).
value
<
FastaFile
*>
();
p_fasta_file
->
setDecoys
(
_project_sp
.
get
()
->
getProteinStore
());
}
else
{
throw
pappso
::
PappsoException
(
QObject
::
tr
(
"can not convert to FastaFile index.data().canConvert<FastaFile *>()"
));
try
{
showWaitingMessage
(
tr
(
"FDR modifications"
));
doDisplayLoadingMessage
(
tr
(
"tagging decoy proteins"
));
QModelIndexList
index_list
=
ui
->
decoy_database_listview
->
selectionModel
()
->
selectedIndexes
();
if
(
index_list
.
size
()
>
0
)
{
qDebug
()
<<
"ProjectWindow::doFdrChanged index_list.size()="
<<
index_list
.
size
();
_project_sp
.
get
()
->
getProteinStore
().
clearDecoys
();
for
(
QModelIndex
index
:
index_list
)
{
if
(
index
.
data
(
Qt
::
UserRole
).
canConvert
<
FastaFile
*>
())
{
FastaFile
*
p_fasta_file
=
index
.
data
(
Qt
::
UserRole
).
value
<
FastaFile
*>
();
p_fasta_file
->
setDecoys
(
_project_sp
.
get
()
->
getProteinStore
());
}
else
{
throw
pappso
::
PappsoException
(
QObject
::
tr
(
"can not convert to FastaFile index.data().canConvert<FastaFile *>()"
));
}
}
}
else
{
_project_sp
.
get
()
->
getProteinStore
().
setRegexpDecoyPattern
(
ui
->
decoy_protein_regexp_line_edit
->
text
());
}
doDisplayLoadingMessage
(
tr
(
"updating filters"
));
_project_sp
.
get
()
->
updateAutomaticFilters
(
_project_sp
.
get
()
->
getAutomaticFilterParameters
());
//re group
emit
operateGrouping
(
_project_sp
);
}
else
{
_project_sp
.
get
()
->
getProteinStore
().
setRegexpDecoyPattern
(
ui
->
decoy_protein_regexp_line_edit
->
text
());
catch
(
pappso
::
PappsoException
exception_pappso
)
{
hideWaitingMessage
();
QMessageBox
::
warning
(
this
,
tr
(
"Unable to compute FDR :"
),
exception_pappso
.
qwhat
());
}
catch
(
std
::
exception
exception_std
)
{
hideWaitingMessage
();
QMessageBox
::
warning
(
this
,
tr
(
"Unable to compute FDR :"
),
exception_std
.
what
());
}
doDisplayLoadingMessage
(
tr
(
"updating filters"
));
_project_sp
.
get
()
->
updateAutomaticFilters
(
_project_sp
.
get
()
->
getAutomaticFilterParameters
());
//re group
emit
operateGrouping
(
_project_sp
);
qDebug
()
<<
"ProjectWindow::doFdrChanged end "
;
}
...
...
@@ -317,30 +330,42 @@ void ProjectWindow::refresh() {
}
void
ProjectWindow
::
doAutomaticFilterParametersChanged
(
AutomaticFilterParameters
parameters
)
{
qDebug
()
<<
"ProjectWindow::doAutomaticFilterParametersChanged begin "
;
showWaitingMessage
(
tr
(
"Updating filters"
));
doDisplayLoadingMessage
(
tr
(
"tagging contaminant proteins"
));
QModelIndexList
index_list
=
ui
->
contaminant_database_listview
->
selectionModel
()
->
selectedIndexes
();
if
(
index_list
.
size
()
>
0
)
{
_project_sp
.
get
()
->
getProteinStore
().
clearContaminants
();
for
(
QModelIndex
index
:
index_list
)
{
if
(
index
.
data
(
Qt
::
UserRole
).
canConvert
<
FastaFile
*>
())
{
FastaFile
*
p_fasta_file
=
index
.
data
(
Qt
::
UserRole
).
value
<
FastaFile
*>
();
p_fasta_file
->
setContaminants
(
_project_sp
.
get
()
->
getProteinStore
());
}
else
{
throw
pappso
::
PappsoException
(
QObject
::
tr
(
"can not convert to FastaFile index.data().canConvert<FastaFile *>()"
));
try
{
showWaitingMessage
(
tr
(
"Updating filters"
));
doDisplayLoadingMessage
(
tr
(
"tagging contaminant proteins"
));
QModelIndexList
index_list
=
ui
->
contaminant_database_listview
->
selectionModel
()
->
selectedIndexes
();
if
(
index_list
.
size
()
>
0
)
{
_project_sp
.
get
()
->
getProteinStore
().
clearContaminants
();
for
(
QModelIndex
index
:
index_list
)
{
if
(
index
.
data
(
Qt
::
UserRole
).
canConvert
<
FastaFile
*>
())
{
FastaFile
*
p_fasta_file
=
index
.
data
(
Qt
::
UserRole
).
value
<
FastaFile
*>
();
p_fasta_file
->
setContaminants
(
_project_sp
.
get
()
->
getProteinStore
());
}
else
{
throw
pappso
::
PappsoException
(
QObject
::
tr
(
"can not convert to FastaFile index.data().canConvert<FastaFile *>()"
));
}
}
}
else
{
_project_sp
.
get
()
->
getProteinStore
().
setRegexpContaminantPattern
(
ui
->
contaminant_protein_regexp_line_edit
->
text
());
}
doDisplayLoadingMessage
(
tr
(
"updating filters"
));
_project_sp
.
get
()
->
updateAutomaticFilters
(
parameters
);
qDebug
()
<<
"ProjectWindow::doAutomaticFilterParametersChanged emit operateGrouping(_project_sp) "
;
emit
operateGrouping
(
_project_sp
);
}
else
{
_project_sp
.
get
()
->
getProteinStore
().
setRegexpContaminantPattern
(
ui
->
contaminant_protein_regexp_line_edit
->
text
());
catch
(
pappso
::
PappsoException
exception_pappso
)
{
hideWaitingMessage
();
QMessageBox
::
warning
(
this
,
tr
(
"Error filtering results :"
),
exception_pappso
.
qwhat
());
}
catch
(
std
::
exception
exception_std
)
{
hideWaitingMessage
();
QMessageBox
::
warning
(
this
,
tr
(
"Error filtering results :"
),
exception_std
.
what
());
}
doDisplayLoadingMessage
(
tr
(
"updating filters"
));
_project_sp
.
get
()
->
updateAutomaticFilters
(
parameters
);
qDebug
()
<<
"ProjectWindow::doAutomaticFilterParametersChanged emit operateGrouping(_project_sp) "
;
emit
operateGrouping
(
_project_sp
);
qDebug
()
<<
"ProjectWindow::doAutomaticFilterParametersChanged end "
;
}
...
...
@@ -653,3 +678,4 @@ void ProjectWindow::doAcceptedLabelingMethod() {
emit
operateGrouping
(
_project_sp
);
}
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