Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesshale committed Jun 22, 2024
2 parents 1bf9f88 + aa003a6 commit c97a47e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public boolean processSample(final String sampleId, final List<Mismatch> mismatc
@Override
public List<String> comparedFieldNames()
{
return Lists.newArrayList(FLD_TOP_CANCER_TYPE, FLD_PROBABILITY, FLD_CLASSIFIER_NAME);
return Lists.newArrayList(FLD_TOP_CANCER_TYPE, FLD_PROBABILITY);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public CuppaData(final CuppaPredictionEntry predictionEntry)
@Override
public String key()
{
return "";
return String.format("%s;%s", PredictionEntry.DataType, PredictionEntry.ClassifierName);
}

@Override
Expand All @@ -45,7 +45,6 @@ public List<String> displayValues()
List<String> values = Lists.newArrayList();
values.add(format("%s", PredictionEntry.CancerType));
values.add(format("%.3f", PredictionEntry.DataValue));
values.add(format("%s", PredictionEntry.ClassifierName));
return values;
}

Expand All @@ -56,6 +55,9 @@ public List<String> displayValues()
public boolean matches(final ComparableItem other)
{
final CuppaData otherCuppaData = (CuppaData) other;

// Match by DataType in case we want to compare other DataTypes (e.g. 'feat_contrib' and 'sig_quantile') in the future
// Currently only support 'prob' DataType
return otherCuppaData.PredictionEntry.DataType.equals(PredictionEntry.DataType) &
otherCuppaData.PredictionEntry.ClassifierName.equals(PredictionEntry.ClassifierName);
}
Expand All @@ -69,7 +71,6 @@ public Mismatch findMismatch(final ComparableItem other, final MatchLevel matchL

checkDiff(diffs, FLD_TOP_CANCER_TYPE, PredictionEntry.CancerType, otherCuppaData.PredictionEntry.CancerType);
checkDiff(diffs, FLD_PROBABILITY, PredictionEntry.DataValue, otherCuppaData.PredictionEntry.DataValue, thresholds);
checkDiff(diffs, FLD_CLASSIFIER_NAME, PredictionEntry.ClassifierName.toString(), otherCuppaData.PredictionEntry.ClassifierName.toString());

return !diffs.isEmpty() ? new Mismatch(this, other, VALUE, diffs) : null;
}
Expand Down

0 comments on commit c97a47e

Please sign in to comment.