From 485f6ecbc3e4439fa7a2252ed3cfa74d0097c353 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 23 Mar 2022 12:22:41 +0000 Subject: [PATCH] JAL-3976 skip entries with null values when analyzing --- .../gui/structurechooser/TDBResultAnalyser.java | 23 +++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/jalview/gui/structurechooser/TDBResultAnalyser.java b/src/jalview/gui/structurechooser/TDBResultAnalyser.java index 981fa23..02d4bda 100644 --- a/src/jalview/gui/structurechooser/TDBResultAnalyser.java +++ b/src/jalview/gui/structurechooser/TDBResultAnalyser.java @@ -131,18 +131,21 @@ public class TDBResultAnalyser // ignore anything outside the sequence region for (FTSData row : collectedResults) { - int up_s = (Integer) row.getSummaryData()[idx_ups]; - int up_e = (Integer) row.getSummaryData()[idx_upe]; - String provider = (String) row.getSummaryData()[idx_mprov]; - String mcat = (String) row.getSummaryData()[idx_mcat]; - // this makes sure all new categories are in the score array. - int scorecat = scoreCategory(mcat); - if (sourceFilter == null || sourceFilter.equals(provider)) + if (row.getSummaryData() != null && row.getSummaryData()[idx_ups]!=null) { - if (seq == row.getSummaryData()[0] && up_e > seq.getStart() - && up_s < seq.getEnd()) + int up_s = (Integer) row.getSummaryData()[idx_ups]; + int up_e = (Integer) row.getSummaryData()[idx_upe]; + String provider = (String) row.getSummaryData()[idx_mprov]; + String mcat = (String) row.getSummaryData()[idx_mcat]; + // this makes sure all new categories are in the score array. + int scorecat = scoreCategory(mcat); + if (sourceFilter == null || sourceFilter.equals(provider)) { - filteredResponse.add(row); + if (seq == row.getSummaryData()[0] && up_e > seq.getStart() + && up_s < seq.getEnd()) + { + filteredResponse.add(row); + } } } } -- 1.7.10.2