Skip locations with no genotypes instead of throwing a NPE
This commit is contained in:
parent
4bdfeacdaa
commit
7ed0ee7ed0
|
|
@ -600,8 +600,7 @@ public class SelectVariants extends RodWalker<Integer, Integer> implements TreeR
|
|||
genotypes.add(Genotype.modifyAttributes(genotype, genotypeAttributes));
|
||||
}
|
||||
|
||||
// TODO: handle result == null
|
||||
|
||||
if (result != null) {
|
||||
ArrayList<Allele> alleles = new ArrayList<Allele>();
|
||||
BasicDBObject allelesInDb = (BasicDBObject)result.get("alleles");
|
||||
for (Object alleleInDb : allelesInDb.values()) {
|
||||
|
|
@ -641,6 +640,7 @@ public class SelectVariants extends RodWalker<Integer, Integer> implements TreeR
|
|||
builder.filters(filters);
|
||||
|
||||
vcs.add(builder.make());
|
||||
}
|
||||
|
||||
return vcs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue