Skip to content

Commit

Permalink
[ref] Change variable names of baseValue and outputValue in peakgroup…
Browse files Browse the repository at this point in the history
… class
  • Loading branch information
sakshikukreja14 committed Jan 21, 2021
1 parent 390b465 commit 7373061
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/core/libmaven/PeakGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ PeakGroup::PeakGroup(shared_ptr<MavenParameters> parameters,
_predictedLabel = ClassifiedLabel::None;
_predictionProbability = 0.0f;

baseValue = 0.0;
outputValue = 0.0;
peakMLBaseValue = 0.0;
peakMLOutputValue = 0.0;
isClassified = false;

//quantileIntensityPeaks = 0;
Expand Down Expand Up @@ -110,8 +110,8 @@ void PeakGroup::copyObj(const PeakGroup& o) {
meanMz = o.meanMz;
_expectedMz = o._expectedMz;

baseValue = o.baseValue;
outputValue = o.outputValue;
peakMLBaseValue = o.peakMLBaseValue;
peakMLOutputValue = o.peakMLOutputValue;

ms2EventCount = o.ms2EventCount;
fragMatchScore = o.fragMatchScore;
Expand Down
4 changes: 2 additions & 2 deletions src/core/libmaven/PeakGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ class PeakGroup{
float groupRank;

bool isClassified;
float baseValue;
float outputValue;
float peakMLBaseValue;
float peakMLOutputValue;

//for sample contrasts ratio and pvalue
float changeFoldRatio;
Expand Down
4 changes: 2 additions & 2 deletions src/core/libmaven/csvreports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ void CSVReports::_writePeakMLInfo(PeakGroup* group)
<< SEP << keyString
<< SEP << valueString
<< SEP << correlatedGroups
<< SEP << group->baseValue
<< SEP << group->outputValue;
<< SEP << group->peakMLBaseValue
<< SEP << group->peakMLOutputValue;
}

void CSVReports::_writePeakInfo(PeakGroup* group)
Expand Down
4 changes: 2 additions & 2 deletions src/gui/mzroll/backgroundopsthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ void BackgroundOpsThread::classifyGroups(vector<PeakGroup>& groups)

if (shapValues.count(group->groupId())) {
auto shapValue = shapValues.at(group->groupId());
group->outputValue = shapValue.first;
group->baseValue = shapValue.second;
group->peakMLOutputValue = shapValue.first;
group->peakMLBaseValue = shapValue.second;
}

auto& group_correlations = correlations.at(group->groupId());
Expand Down
4 changes: 2 additions & 2 deletions src/gui/mzroll/classificationWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ void ClassificationWidget::setBaseValue()
tagString = "Base Value = ";
QString basevalueString = tr("<b>%1</b>").arg(tagString);

string baseValue = mzUtils::float2string(_group->baseValue, 3);
string baseValue = mzUtils::float2string(_group->peakMLBaseValue, 3);

basevalueString += QString::fromStdString(baseValue);

Expand All @@ -426,7 +426,7 @@ void ClassificationWidget::setOutputValue(int startPosition)
tagString = "Output Value = ";
QString outputValueString = tr("<b>%1</b>").arg(tagString);

string outputValue = mzUtils::float2string(_group->outputValue, 3);
string outputValue = mzUtils::float2string(_group->peakMLOutputValue, 3);

outputValueString += QString::fromStdString(outputValue);

Expand Down
8 changes: 4 additions & 4 deletions src/projectDB/projectdatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ int ProjectDatabase::saveGroupAndPeaks(PeakGroup* group,
groupsQuery->bind(":peakML_label", peakML_label);
groupsQuery->bind(":peakML_probability",
group->predictionProbability());
groupsQuery->bind(":peakML_base_value", group->baseValue);
groupsQuery->bind(":peakML_output_value", group->outputValue);
groupsQuery->bind(":peakML_base_value", group->peakMLBaseValue);
groupsQuery->bind(":peakML_output_value", group->peakMLOutputValue);
string keyString = "";
string valueString = "";
auto inference = group->predictionInference();
Expand Down Expand Up @@ -1269,8 +1269,8 @@ vector<PeakGroup*> ProjectDatabase::loadGroups(const vector<mzSample*>& loaded,
group->setTableName(groupsQuery->stringValue("table_name"));
group->minQuality = groupsQuery->doubleValue("min_quality");

group->baseValue = groupsQuery->doubleValue("peakML_base_value");
group->outputValue = groupsQuery->doubleValue("peakML_output_value");
group->peakMLBaseValue = groupsQuery->doubleValue("peakML_base_value");
group->peakMLOutputValue = groupsQuery->doubleValue("peakML_output_value");

string compoundId = groupsQuery->stringValue("compound_id");
string compoundDB = groupsQuery->stringValue("compound_db");
Expand Down

0 comments on commit 7373061

Please sign in to comment.