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
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
PAPPSO
xtpcpp
Commits
e898506e
Commit
e898506e
authored
4 years ago
by
Renne Thomas
Browse files
Options
Downloads
Patches
Plain Diff
merge getMsRunReader TDF and other
parent
7e3a68cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!26
Allow to use TDF raw data to load MGF spectrum
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/msrun.cpp
+60
-117
60 additions, 117 deletions
src/core/msrun.cpp
src/core/msrun.h
+1
-0
1 addition, 0 deletions
src/core/msrun.h
with
61 additions
and
117 deletions
src/core/msrun.cpp
+
60
−
117
View file @
e898506e
...
...
@@ -69,71 +69,7 @@ MsRun::getMsRunReaderSPtr()
// qDebug() << " filename=" << getFileName();
if
(
_msrun_reader_sp
==
nullptr
)
{
qDebug
()
<<
" runid="
<<
getRunId
()
<<
" xmlid="
<<
getXmlId
();
pappso
::
MsFileAccessor
*
p_accessor
=
nullptr
;
try
{
// pappso::MsFileAccessor accessor(getFileName(), "");
p_accessor
=
new
pappso
::
MsFileAccessor
(
getFileName
(),
"runa1"
);
p_accessor
->
setPreferedFileReaderType
(
pappso
::
MzFormat
::
brukerTims
,
pappso
::
FileReaderType
::
tims_ms2
);
}
catch
(
pappso
::
ExceptionNotFound
&
error
)
{
qDebug
()
<<
"not found"
;
_msrun_reader_sp
=
nullptr
;
/// p_accessor = nullptr;
// throw error;
// file not found, don't throw exception, we'll try another location
}
if
(
p_accessor
!=
nullptr
)
{
try
{
_msrun_reader_sp
=
p_accessor
->
getMsRunReaderSPtrByRunId
(
getRunId
(),
getXmlId
());
delete
p_accessor
;
p_accessor
=
nullptr
;
//qDebug() << m_centroidOptions;
if
(
!
m_centroidOptions
.
isEmpty
())
{
pappso
::
TimsMsRunReaderMs2
*
tims2_reader
=
dynamic_cast
<
pappso
::
TimsMsRunReaderMs2
*>
(
_msrun_reader_sp
.
get
());
if
(
tims2_reader
!=
nullptr
)
{
qDebug
()
<<
m_centroidOptions
;
QStringList
option_list
=
m_centroidOptions
.
split
(
" "
);
std
::
shared_ptr
<
pappso
::
FilterPseudoCentroid
>
ms2filter
=
std
::
make_shared
<
pappso
::
FilterPseudoCentroid
>
(
option_list
.
at
(
0
).
toDouble
(),
option_list
.
at
(
1
).
toDouble
(),
option_list
.
at
(
2
).
toDouble
(),
option_list
.
at
(
3
).
toDouble
());
tims2_reader
->
setMs2FilterCstSPtr
(
ms2filter
);
qDebug
()
<<
m_centroidOptions
;
}
}
}
catch
(
pappso
::
PappsoException
&
error2
)
{
_msrun_reader_sp
=
nullptr
;
if
(
p_accessor
!=
nullptr
)
{
delete
p_accessor
;
p_accessor
=
nullptr
;
}
throw
error2
;
}
}
}
else
{
// qDebug();
setMsRunReaderSp
(
getFileName
());
}
return
_msrun_reader_sp
;
...
...
@@ -144,73 +80,80 @@ MsRun::getMsRunReaderSPtrMgfToTdf(QString tdf_file)
{
qDebug
()
<<
" filename="
<<
getFileName
();
qDebug
()
<<
"filenameTDF = "
<<
tdf_file
;
if
(
_msrun_reader_sp
==
nullptr
)
{
qDebug
()
<<
" runid="
<<
getRunId
()
<<
" xmlid="
<<
getXmlId
(
);
pappso
::
MsFileAccessor
*
p_accessor
=
nullptr
;
setMsRunReaderSp
(
tdf_file
);
}
try
{
return
_msrun_reader_sp
;
}
p_accessor
=
new
pappso
::
MsFileAccessor
(
tdf_file
,
"runa1"
);
void
MsRun
::
setMsRunReaderSp
(
QString
ms_run_file
)
{
qDebug
()
<<
" runid="
<<
getRunId
()
<<
" xmlid="
<<
getXmlId
();
pappso
::
MsFileAccessor
*
p_accessor
=
nullptr
;
p_accessor
->
setPreferedFileReaderType
(
pappso
::
MzFormat
::
brukerTims
,
pappso
::
FileReaderType
::
tims_ms2
);
}
catch
(
pappso
::
ExceptionNotFound
&
error
)
{
qDebug
()
<<
"not found"
;
_msrun_reader_sp
=
nullptr
;
/// p_accessor = nullptr;
// throw error;
// file not found, don't throw exception, we'll try another location
}
if
(
p_accessor
!=
nullptr
)
try
{
p_accessor
=
new
pappso
::
MsFileAccessor
(
ms_run_file
,
"runa1"
);
p_accessor
->
setPreferedFileReaderType
(
pappso
::
MzFormat
::
brukerTims
,
pappso
::
FileReaderType
::
tims_ms2
);
}
catch
(
pappso
::
ExceptionNotFound
&
error
)
{
qDebug
()
<<
"not found"
;
_msrun_reader_sp
=
nullptr
;
/// p_accessor = nullptr;
// throw error;
// file not found, don't throw exception, we'll try another location
}
if
(
p_accessor
!=
nullptr
)
{
try
{
try
{
_msrun_reader_sp
=
p_accessor
->
getMsRunReaderSPtrByRunId
(
getRunId
(),
getXmlId
());
delete
p_accessor
;
p_accessor
=
nullptr
;
_msrun_reader_sp
=
p_accessor
->
getMsRunReaderSPtrByRunId
(
getRunId
(),
getXmlId
());
delete
p_accessor
;
p_accessor
=
nullptr
;
qDebug
()
<<
m_centroidOptions
;
if
(
!
m_centroidOptions
.
isEmpty
())
qDebug
()
<<
m_centroidOptions
;
if
(
!
m_centroidOptions
.
isEmpty
())
{
pappso
::
TimsMsRunReaderMs2
*
tims2_reader
=
dynamic_cast
<
pappso
::
TimsMsRunReaderMs2
*>
(
_msrun_reader_sp
.
get
());
if
(
tims2_reader
!=
nullptr
)
{
pappso
::
TimsMsRunReaderMs2
*
tims2_reader
=
dynamic_cast
<
pappso
::
TimsMsRunReaderMs2
*>
(
_msrun_reader_sp
.
get
());
if
(
tims2_reader
!=
nullptr
)
{
qDebug
()
<<
m_centroidOptions
;
QStringList
option_list
=
m_centroidOptions
.
split
(
" "
);
std
::
shared_ptr
<
pappso
::
FilterPseudoCentroid
>
ms2filter
=
std
::
make_shared
<
pappso
::
FilterPseudoCentroid
>
(
option_list
.
at
(
0
).
toDouble
(),
option_list
.
at
(
1
).
toDouble
(),
option_list
.
at
(
2
).
toDouble
(),
option_list
.
at
(
3
).
toDouble
());
tims2_reader
->
setMs2FilterCstSPtr
(
ms2filter
);
qDebug
()
<<
m_centroidOptions
;
}
qDebug
()
<<
m_centroidOptions
;
QStringList
option_list
=
m_centroidOptions
.
split
(
" "
);
std
::
shared_ptr
<
pappso
::
FilterPseudoCentroid
>
ms2filter
=
std
::
make_shared
<
pappso
::
FilterPseudoCentroid
>
(
option_list
.
at
(
0
).
toDouble
(),
option_list
.
at
(
1
).
toDouble
(),
option_list
.
at
(
2
).
toDouble
(),
option_list
.
at
(
3
).
toDouble
());
tims2_reader
->
setMs2FilterCstSPtr
(
ms2filter
);
qDebug
()
<<
m_centroidOptions
;
}
}
}
catch
(
pappso
::
PappsoException
&
error2
)
catch
(
pappso
::
PappsoException
&
error2
)
{
_msrun_reader_sp
=
nullptr
;
if
(
p_accessor
!=
nullptr
)
{
_msrun_reader_sp
=
nullptr
;
if
(
p_accessor
!=
nullptr
)
{
delete
p_accessor
;
p_accessor
=
nullptr
;
}
throw
error2
;
delete
p_accessor
;
p_accessor
=
nullptr
;
}
throw
error2
;
}
}
return
_msrun_reader_sp
;
}
...
...
This diff is collapsed.
Click to expand it.
src/core/msrun.h
+
1
−
0
View file @
e898506e
...
...
@@ -79,6 +79,7 @@ class MsRun : public pappso::MsRunId
pappso
::
MsRunReaderSPtr
&
getMsRunReaderSPtr
();
pappso
::
MsRunReaderSPtr
&
getMsRunReaderSPtrMgfToTdf
(
QString
tdf_file
);
void
setMsRunReaderSp
(
QString
ms_run_file
);
/** @brief release shared pointer on MSrun reader
*/
...
...
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