Commit 5e86a36a authored by Langella Olivier's avatar Langella Olivier
Browse files

indentation, cleaning debug messages, comments

parent 795d4099
/** @file src/lib/quantifications/mapquantirealxic.cpp
*/
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.fr>. * Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
...@@ -64,7 +66,7 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem) ...@@ -64,7 +66,7 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem)
{ {
try try
{ {
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
const std::vector<MsMsRtIntensity> rt_list = const std::vector<MsMsRtIntensity> rt_list =
p_currentSearchItem->getPeptide()->getPeptideRtSp()->getObservedRtList( p_currentSearchItem->getPeptide()->getPeptideRtSp()->getObservedRtList(
_p_msrun); _p_msrun);
...@@ -90,7 +92,7 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem) ...@@ -90,7 +92,7 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem)
// rt_list_z.size(); // rt_list_z.size();
// if (rt_list_z.size() > 0) { // if (rt_list_z.size() > 0) {
// and it was observed with this charge // and it was observed with this charge
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
XicFilterDetectMatchRealRt filter_detect_match_real_xic( XicFilterDetectMatchRealRt filter_detect_match_real_xic(
p_xic_trace, p_xic_trace,
_monitor, _monitor,
...@@ -98,24 +100,24 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem) ...@@ -98,24 +100,24 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem)
_p_detection, _p_detection,
_quantificator, _quantificator,
_matching_mode); _matching_mode);
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
pappso::MzRange mass_range( pappso::MzRange mass_range(
p_currentSearchItem->getMz(), p_currentSearchItem->getMz(),
_quantificator->getQuantificationMethod()->getLowerPrecision(), _quantificator->getQuantificationMethod()->getLowerPrecision(),
_quantificator->getQuantificationMethod()->getUpperPrecision()); _quantificator->getQuantificationMethod()->getUpperPrecision());
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
pappso::XicCstSPtr msrun_xic_sp = pappso::XicCstSPtr msrun_xic_sp =
_p_msrun->extractXicCstSPtr(mass_range, rt_list[0].rt); _p_msrun->extractXicCstSPtr(mass_range, rt_list[0].rt);
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
if(msrun_xic_sp != nullptr) if(msrun_xic_sp != nullptr)
{ {
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
filter_detect_match_real_xic.filterDetectQuantify( filter_detect_match_real_xic.filterDetectQuantify(
msrun_xic_sp.get(), &rt_list, p_currentSearchItem, _p_msrun); msrun_xic_sp.get(), &rt_list, p_currentSearchItem, _p_msrun);
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
if(p_xic_trace != nullptr) if(p_xic_trace != nullptr)
{ {
...@@ -127,7 +129,7 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem) ...@@ -127,7 +129,7 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem)
} }
else else
{ {
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
} }
p_currentSearchItem->endMsrunQuantification(_p_msrun); p_currentSearchItem->endMsrunQuantification(_p_msrun);
...@@ -136,7 +138,7 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem) ...@@ -136,7 +138,7 @@ MapQuantiRealXic::operator()(QuantiItemBase *p_currentSearchItem)
// this quanti item was not observed with this charge // this quanti item was not observed with this charge
//} //}
} }
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
} }
catch(mcqError &errorException) catch(mcqError &errorException)
{ {
......
/** @file src/lib/quantifications/mapquantirealxic.h
*/
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.fr>. * Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
......
...@@ -20,6 +20,7 @@ QuantificationMethod::QuantificationMethod(const QString &xml_id) ...@@ -20,6 +20,7 @@ QuantificationMethod::QuantificationMethod(const QString &xml_id)
_upper_precision_p = _upper_precision_p =
pappso::PrecisionFactory::getDaltonInstance(_upper_precision); pappso::PrecisionFactory::getDaltonInstance(_upper_precision);
} }
m_secondChance = false;
} }
QuantificationMethod::QuantificationMethod(const QuantificationMethod &other) QuantificationMethod::QuantificationMethod(const QuantificationMethod &other)
...@@ -52,8 +53,8 @@ void ...@@ -52,8 +53,8 @@ void
QuantificationMethod::printInfos(QTextStream &out) const QuantificationMethod::printInfos(QTextStream &out) const
{ {
out << "\t Quantification method '" << _xml_id << "' parameters : " << endl; out << "\t Quantification method '" << _xml_id << "' parameters : " << endl;
out << "\t xic type : '" << Utilities::toString(_m_xic_extract_method) << "'" out << "\t xic type : '" << Utilities::toString(_m_xic_extract_method) << "' "
<< endl; << "second chance:" << m_secondChance << endl;
/* /*
std::vector<const FilterBase *>::const_iterator it_f; std::vector<const FilterBase *>::const_iterator it_f;
for (it_f = _v_p_xic_filters.begin(); for (it_f = _v_p_xic_filters.begin();
......
/** @file src/lib/xic/xicfilterdetectmatchrealrt.cpp
*/
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.fr>. * Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
...@@ -17,9 +19,6 @@ ...@@ -17,9 +19,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with MassChroQ. If not, see <http://www.gnu.org/licenses/>. * along with MassChroQ. If not, see <http://www.gnu.org/licenses/>.
* *
* Contributors:
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
*implementation
******************************************************************************/ ******************************************************************************/
#include "xicfilterdetectmatchrealrt.h" #include "xicfilterdetectmatchrealrt.h"
#include "../quanti_items/quantiItemBase.h" #include "../quanti_items/quantiItemBase.h"
...@@ -33,26 +32,25 @@ XicFilterDetectMatchRealRt::XicFilterDetectMatchRealRt( ...@@ -33,26 +32,25 @@ XicFilterDetectMatchRealRt::XicFilterDetectMatchRealRt(
McqMatchingMode matching_mode) McqMatchingMode matching_mode)
: _monitor(monitor) : _monitor(monitor)
{ {
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
_p_detection = p_detection; _p_detection = p_detection;
_p_xic_filter = p_xic_filter; _p_xic_filter = p_xic_filter;
_p_quantificator = p_quantificator; _p_quantificator = p_quantificator;
_p_trace = p_trace; _p_trace = p_trace;
_matching_mode = matching_mode; _matching_mode = matching_mode;
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug();
} }
XicFilterDetectMatchRealRt::~XicFilterDetectMatchRealRt() XicFilterDetectMatchRealRt::~XicFilterDetectMatchRealRt()
{ {
qDebug() << "XicFilterDetectMatchRealRt::~XicFilterDetectMatchRealRt " qDebug() << this;
<< this;
} }
void void
XicFilterDetectMatchRealRt::setTracePeak(pappso::TracePeak &xic_peak) XicFilterDetectMatchRealRt::setTracePeak(pappso::TracePeak &xic_peak)
{ {
qDebug() << "XicFilterDetectMatchRealRt::setXicPeak begin " << this; qDebug() << " begin " << this;
if(_p_log_peaks == nullptr) if(_p_log_peaks == nullptr)
{ {
...@@ -83,7 +81,7 @@ XicFilterDetectMatchRealRt::setTracePeak(pappso::TracePeak &xic_peak) ...@@ -83,7 +81,7 @@ XicFilterDetectMatchRealRt::setTracePeak(pappso::TracePeak &xic_peak)
{ {
_p_log_peaks->push_back(xic_peak.makeTracePeakCstSPtr()); _p_log_peaks->push_back(xic_peak.makeTracePeakCstSPtr());
} }
qDebug() << "XicFilterDetectMatchRealRt::setXicPeak end " << this; qDebug() << " end " << this;
} }
void void
...@@ -94,13 +92,13 @@ XicFilterDetectMatchRealRt::filterDetectQuantify( ...@@ -94,13 +92,13 @@ XicFilterDetectMatchRealRt::filterDetectQuantify(
const Msrun *p_msrun) const Msrun *p_msrun)
{ {
qDebug() << "XicFilterDetectMatchRealRt::filterDetectQuantify begin " << this; qDebug() << " begin " << this;
if(p_origxic == nullptr) if(p_origxic == nullptr)
{ {
throw mcqError( throw mcqError(QObject::tr("error in %1 %2 %3: p_origxic == nullptr")
QObject::tr("error in " .arg(__FILE__)
"XicFilterDetectMatchRealRt::" .arg(__FUNCTION__)
"filterDetectQuantify: p_origxic == nullptr")); .arg(__LINE__));
} }
_peak_counter_map.clear(); _peak_counter_map.clear();
...@@ -113,27 +111,25 @@ XicFilterDetectMatchRealRt::filterDetectQuantify( ...@@ -113,27 +111,25 @@ XicFilterDetectMatchRealRt::filterDetectQuantify(
if(_p_xic_filter != nullptr) if(_p_xic_filter != nullptr)
{ {
qDebug() << "XicFilterDetectMatchRealRt::filterDetectQuantify filter " qDebug() << " filter " << p_origxic->size() << " " << newxic.size() << " "
<< p_origxic->size() << " " << newxic.size() << " " << this; << this;
_p_xic_filter->filter(newxic); _p_xic_filter->filter(newxic);
qDebug() << "XicFilterDetectMatchRealRt::filterDetectQuantify filter 2 " qDebug() << " filter 2 " << newxic.size() << " " << this;
<< newxic.size() << " " << this;
p_xic = &newxic; p_xic = &newxic;
} }
// qDebug() << "XicFilterDetectMatch::filterDetectQuantify detect " << // qDebug() << "XicFilterDetectMatch::filterDetectQuantify detect " <<
// _rt_target; // _rt_target;
_p_detection->detect(*p_xic, *this); _p_detection->detect(*p_xic, *this);
qDebug() << "XicFilterDetectMatchRealRt::filterDetectQuantify after detect" qDebug() << " after detect"
<< " " << this; << " " << this;
if(_peak_counter_map.size() > 0) if(_peak_counter_map.size() > 0)
{ {
if(_peak_counter_map.size() == 1) if(_peak_counter_map.size() == 1)
{ {
qDebug() qDebug() << " NO CHOICE "
<< "XicFilterDetectMatchRealRt::filterDetectQuantify NO CHOICE " "_peak_counter_map.size() "
"_peak_counter_map.size() " << _peak_counter_map.size() << " " << this;
<< _peak_counter_map.size() << " " << this;
// const pappso::XicPeak * p_peak = // const pappso::XicPeak * p_peak =
// _peak_counter_map.begin()->first.get(); // _peak_counter_map.begin()->first.get();
AlignedXicPeak aligned_peak(*(_peak_counter_map.begin()->first.get()), AlignedXicPeak aligned_peak(*(_peak_counter_map.begin()->first.get()),
...@@ -166,9 +162,7 @@ XicFilterDetectMatchRealRt::filterDetectQuantify( ...@@ -166,9 +162,7 @@ XicFilterDetectMatchRealRt::filterDetectQuantify(
else else
{ {
// we have to choose among Xic peaks :/ // we have to choose among Xic peaks :/
qDebug() << "XicFilterDetectMatchRealRt::filterDetectQuantify " qDebug() << _peak_counter_map.size() << " " << this;
"_peak_counter_map.size() "
<< _peak_counter_map.size() << " " << this;
auto it = _peak_counter_map.begin(); auto it = _peak_counter_map.begin();
auto itend = _peak_counter_map.end(); auto itend = _peak_counter_map.end();
pappso::TracePeakCstSPtr peak_sp = it->first; pappso::TracePeakCstSPtr peak_sp = it->first;
...@@ -213,9 +207,7 @@ XicFilterDetectMatchRealRt::filterDetectQuantify( ...@@ -213,9 +207,7 @@ XicFilterDetectMatchRealRt::filterDetectQuantify(
*/ */
if(_p_quantificator->getQuantificationMethod()->getSecondChance()) if(_p_quantificator->getQuantificationMethod()->getSecondChance())
{ {
qDebug() qDebug() << " " << this;
<< "XicFilterDetectMatchRealRt::filterDetectQuantify not detected "
<< " " << this;
_monitor.writeMatchedPeak( _monitor.writeMatchedPeak(
_p_current_msrun, _p_current_search_item, nullptr); _p_current_msrun, _p_current_search_item, nullptr);
...@@ -313,6 +305,5 @@ XicFilterDetectMatchRealRt::filterDetectQuantify( ...@@ -313,6 +305,5 @@ XicFilterDetectMatchRealRt::filterDetectQuantify(
} }
} }
qDebug() << "XicFilterDetectMatchRealRt::filterDetectQuantify end" qDebug() << " " << this;
<< " " << this;
} }
/** @file src/lib/xic/xicfilterdetectmatchrealrt.h
*/
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.fr>. * Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
...@@ -17,9 +20,6 @@ ...@@ -17,9 +20,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with MassChroQ. If not, see <http://www.gnu.org/licenses/>. * along with MassChroQ. If not, see <http://www.gnu.org/licenses/>.
* *
* Contributors:
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
*implementation
******************************************************************************/ ******************************************************************************/
#pragma once #pragma once
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment