Skip to content

Commit

Permalink
Added check to skip outlier truncation if number of matrix elements e…
Browse files Browse the repository at this point in the history
…xceeds Integer.MAX_VALUE in CreateReadCountPanelOfNormals. (#4734)
  • Loading branch information
samuelklee committed Mar 2, 2019
1 parent 994e987 commit e363ff9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ public double visit(int sampleIndex, int intervalIndex, double value) {
if (extremeOutlierTruncationPercentile == 0.) {
logger.info(String.format("A value of 0 was provided for argument %s, so the corresponding truncation step will be skipped...",
CreateReadCountPanelOfNormals.EXTREME_OUTLIER_TRUNCATION_PERCENTILE_LONG_NAME));
} else if ((long) preprocessedReadCounts.getRowDimension() * preprocessedReadCounts.getColumnDimension() > Integer.MAX_VALUE) {
logger.warn("The number of matrix elements exceeds Integer.MAX_VALUE, so outlier truncation will be skipped...");
} else {
final double[] values = Doubles.concat(preprocessedReadCounts.getData());
final double minimumOutlierTruncationThreshold = new Percentile(extremeOutlierTruncationPercentile).evaluate(values);
Expand Down

0 comments on commit e363ff9

Please sign in to comment.