Check if VC is null before trying to subset it (can happen with indels)

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4165 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
chartl 2010-08-30 20:43:37 +00:00
parent e14a347e2e
commit e64d1be475
1 changed files with 3 additions and 0 deletions

View File

@ -203,6 +203,9 @@ public class SelectVariants extends RodWalker<Integer, Integer> {
return 0;
VariantContext vc = tracker.getVariantContext(ref, "variant", null, context.getLocation(), true);
if ( vc == null ){
return 0;
}
VariantContext sub = subsetRecord(vc, samples);
if ( (sub.isPolymorphic() || !EXCLUDE_NON_VARIANTS) && (!sub.isFiltered() || !EXCLUDE_FILTERED) ) {