diff --git a/src/main/java/org/veupathdb/service/eda/ds/plugin/correlation/AbstractCorrelationBipartiteNetwork.java b/src/main/java/org/veupathdb/service/eda/ds/plugin/correlation/AbstractCorrelationBipartiteNetwork.java index a90d2908..a2d67ff5 100644 --- a/src/main/java/org/veupathdb/service/eda/ds/plugin/correlation/AbstractCorrelationBipartiteNetwork.java +++ b/src/main/java/org/veupathdb/service/eda/ds/plugin/correlation/AbstractCorrelationBipartiteNetwork.java @@ -67,9 +67,10 @@ protected void writeResults(OutputStream out, Map dataStrea // each node. stats.getStatistics().forEach((correlationRow) -> { - // Skip rows that have no correlation coefficient or a correlation coef that is too small. Filtering here prevents us + // Skip rows that have no correlation coefficient, a NaN correlation coef, or a correlation coef that is too small. Filtering here prevents us // from showing nodes with no links. if (correlationRow.getCorrelationCoef() == null) return; + if (Float.isNaN(Float.parseFloat(correlationRow.getCorrelationCoef()))) return; if (Math.abs(Float.parseFloat(correlationRow.getCorrelationCoef())) < correlationCoefThreshold.floatValue()) return; if (correlationRow.getPValue() != null) { if (Float.parseFloat(correlationRow.getPValue()) > pValueThreshold.floatValue()) return;