Occasionally if a JEXL expression results in no variants being captured (like "QD > 20.0" on filtered variants) the per-sample mapping from samples to eval objects can be empty. This semi-hacky fix prevents null pointer exceptions in setting up the resulting empty table (by jumping straight to it in this case)
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4023 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
f874e548aa
commit
c6a8fba922
|
|
@ -163,6 +163,10 @@ class EvalBySample implements TableType {
|
|||
}
|
||||
|
||||
public void finalizeTable() {
|
||||
if ( sampleAndEvalResults == null || sampleAndEvalResults.size() == 0 ) {
|
||||
finalizedResults = new Object[0][0];
|
||||
return; // todo -- early return is hacky
|
||||
}
|
||||
finalizedResults = new Object[sampleAndEvalResults.size()][sampleAndEvalResults.firstEntry().getValue().size()];
|
||||
int i = 0;
|
||||
for ( Map.Entry<String,List<SampleDataPoint>> evalBySample : sampleAndEvalResults.entrySet() ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue