Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PAPPSO
MassChroQ
Commits
e2d0d635
Commit
e2d0d635
authored
Dec 23, 2020
by
Langella Olivier
Browse files
disable the second chance algorithm
parent
0867f3d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib/quantifications/quantificationMethod.cpp
View file @
e2d0d635
...
...
@@ -35,6 +35,7 @@ QuantificationMethod::QuantificationMethod(const QuantificationMethod &other)
_lower_precision_p
=
other
.
_lower_precision_p
;
_upper_precision_p
=
other
.
_upper_precision_p
;
m_secondChance
=
other
.
m_secondChance
;
}
QuantificationMethod
::~
QuantificationMethod
()
...
...
@@ -184,3 +185,9 @@ QuantificationMethod::getMzRange(pappso::pappso_double mz) const
{
return
pappso
::
MzRange
(
mz
,
_lower_precision_p
,
_upper_precision_p
);
}
bool
QuantificationMethod
::
getSecondChance
()
const
{
return
m_secondChance
;
}
src/lib/quantifications/quantificationMethod.h
View file @
e2d0d635
...
...
@@ -71,6 +71,12 @@ class QuantificationMethod
void
setXicExtractPrecision
(
pappso
::
PrecisionPtr
precision
);
/** @brief tells if we want a second chance to detect small peaks, very near
* the targeted retention time if enabled, this looks for small peaks with
* boundary retention time smaller than the MS1 minimum range
*/
bool
getSecondChance
()
const
;
private:
/// unique xml id for this method
const
QString
_xml_id
;
...
...
@@ -92,4 +98,6 @@ class QuantificationMethod
pappso
::
PrecisionPtr
_lower_precision_p
=
nullptr
;
pappso
::
PrecisionPtr
_upper_precision_p
=
nullptr
;
bool
m_secondChance
=
false
;
};
src/lib/xic/xicfilterdetectmatchrealrt.cpp
View file @
e2d0d635
...
...
@@ -209,99 +209,107 @@ XicFilterDetectMatchRealRt::filterDetectQuantify(
}
else
{
qDebug
()
<<
"XicFilterDetectMatchRealRt::filterDetectQuantify not detected "
<<
" "
<<
this
;
_monitor
.
writeMatchedPeak
(
_p_current_msrun
,
_p_current_search_item
,
nullptr
);
_p_log_peaks
=
new
std
::
vector
<
pappso
::
TracePeakCstSPtr
>
();
_p_detection
->
detect
(
*
p_xic
,
*
this
);
if
(
_p_log_peaks
->
size
()
>
0
)
/** @comments look for small little peaks nearby (second chance)
*/
if
(
_p_quantificator
->
getQuantificationMethod
()
->
getSecondChance
())
{
unsigned
int
nbpeaks_near
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
p_real_rt
->
size
();
i
++
)
qDebug
()
<<
"XicFilterDetectMatchRealRt::filterDetectQuantify not detected "
<<
" "
<<
this
;
_monitor
.
writeMatchedPeak
(
_p_current_msrun
,
_p_current_search_item
,
nullptr
);
_p_log_peaks
=
new
std
::
vector
<
pappso
::
TracePeakCstSPtr
>
();
_p_detection
->
detect
(
*
p_xic
,
*
this
);
if
(
_p_log_peaks
->
size
()
>
0
)
{
pappso
::
pappso_double
rt
=
p_real_rt
->
at
(
i
).
rt
;
for
(
unsigned
int
j
=
0
;
j
<
_
p_
log_peaks
->
size
();
j
++
)
unsigned
int
nbpeaks_near
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
p_
real_rt
->
size
();
i
++
)
{
pappso
::
TracePeakCstSPtr
peak_sp
=
_
p_
log_peaks
->
at
(
j
)
;
if
(
peak_sp
.
get
()
->
getMaxXicElement
().
x
<
rt
)
pappso
::
pappso_double
rt
=
p_
real_rt
->
at
(
i
).
rt
;
for
(
unsigned
int
j
=
0
;
j
<
_p_log_peaks
->
size
();
j
++
)
{
if
((
rt
-
peak_sp
.
get
()
->
getRightBoundary
().
x
)
<
10
)
pappso
::
TracePeakCstSPtr
peak_sp
=
_p_log_peaks
->
at
(
j
);
if
(
peak_sp
.
get
()
->
getMaxXicElement
().
x
<
rt
)
{
unsigned
int
distance_point
=
p_origxic
->
getMsPointDistance
(
rt
,
peak_sp
.
get
()
->
getRightBoundary
().
x
);
if
(
distance_point
<
10
)
if
((
rt
-
peak_sp
.
get
()
->
getRightBoundary
().
x
)
<
10
)
{
nbpeaks_near
++
;
unsigned
int
distance_point
=
p_origxic
->
getMsPointDistance
(
rt
,
peak_sp
.
get
()
->
getRightBoundary
().
x
);
if
(
distance_point
<
10
)
{
nbpeaks_near
++
;
}
}
}
}
else
{
if
((
peak_sp
.
get
()
->
getLeftBoundary
().
x
-
rt
)
<
10
)
else
{
unsigned
int
distance_point
=
p_origxic
->
getMsPointDistance
(
rt
,
peak_sp
.
get
()
->
getLeftBoundary
().
x
);
if
(
distance_point
==
0
)
if
((
peak_sp
.
get
()
->
getLeftBoundary
().
x
-
rt
)
<
10
)
{
AlignedXicPeak
aligned_peak
(
*
(
peak_sp
.
get
()),
_p_current_msrun
);
_monitor
.
writeMatchedPeak
(
_p_current_msrun
,
_p_current_search_item
,
&
aligned_peak
);
if
(
_matching_mode
==
McqMatchingMode
::
post_matching
)
unsigned
int
distance_point
=
p_origxic
->
getMsPointDistance
(
rt
,
peak_sp
.
get
()
->
getLeftBoundary
().
x
);
if
(
distance_point
==
0
)
{
// store aligned rt of this matched peak
// warning : this could be risky
_p_current_search_item
->
getPeptideRtSp
()
.
get
()
->
postMatchingAlignedPeak
(
aligned_peak
);
}
else
{
_p_current_search_item
->
getPeptide
()
->
getPeptideRtSp
()
->
addWeightedRealXicRt
(
aligned_peak
,
1
);
}
AlignedXicPeak
aligned_peak
(
*
(
peak_sp
.
get
()),
_p_current_msrun
);
_monitor
.
writeMatchedPeak
(
_p_current_msrun
,
_p_current_search_item
,
&
aligned_peak
);
if
(
_p_trace
!=
nullptr
)
{
_p_trace
->
setMatchedPeak
(
*
(
peak_sp
.
get
()));
_p_trace
->
setAlignedMatchedPeak
(
aligned_peak
);
if
(
_matching_mode
==
McqMatchingMode
::
post_matching
)
{
// store aligned rt of this matched peak
// warning : this could be risky
_p_current_search_item
->
getPeptideRtSp
()
.
get
()
->
postMatchingAlignedPeak
(
aligned_peak
);
}
else
{
_p_current_search_item
->
getPeptide
()
->
getPeptideRtSp
()
->
addWeightedRealXicRt
(
aligned_peak
,
1
);
}
if
(
_p_trace
!=
nullptr
)
{
_p_trace
->
setMatchedPeak
(
*
(
peak_sp
.
get
()));
_p_trace
->
setAlignedMatchedPeak
(
aligned_peak
);
}
return
;
}
return
;
nbpeaks_near
++
;
}
nbpeaks_near
++
;
}
}
}
}
pappso
::
PeptideNaturalIsotopeAverageSp
peptide_natural_sp
=
_p_current_search_item
->
getPeptideNaturalIsotopeAverageSp
();
if
(
nbpeaks_near
>
0
)
{
if
((
peptide_natural_sp
==
nullptr
)
||
(
peptide_natural_sp
.
get
()
->
getIsotopeNumber
()
==
0
))
pappso
::
PeptideNaturalIsotopeAverageSp
peptide_natural_sp
=
_p_current_search_item
->
getPeptideNaturalIsotopeAverageSp
();
if
(
nbpeaks_near
>
0
)
{
// _monitor.logMissedObservedRealXic(_p_current_search_item,
// p_origxic, p_real_rt,_p_log_peaks);
}
if
((
peptide_natural_sp
==
nullptr
)
||
(
peptide_natural_sp
.
get
()
->
getIsotopeNumber
()
==
0
))
{
// _monitor.logMissedObservedRealXic(_p_current_search_item,
// p_origxic, p_real_rt,_p_log_peaks);
}
// it seems to be better to forget quanti items that was not
// matched here : leave it in comments
//_p_quantificator->addMissedQuantiItem(_p_current_msrun,
//_p_current_search_item);
// it seems to be better to forget quanti items that was not
// matched here : leave it in comments
//_p_quantificator->addMissedQuantiItem(_p_current_msrun,
//_p_current_search_item);
}
}
else
{
// no peaks : nothing to do
}
}
else
{
// no peaks : nothing to do
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment