Don't trigger when ref=N (which can happen when a dbsnp track is provided)

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3150 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-04-11 02:59:11 +00:00
parent 961ca05abc
commit 3434a61146
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext;
import org.broadinstitute.sting.gatk.refdata.*;
import org.broadinstitute.sting.utils.cmdLine.Argument;
import org.broadinstitute.sting.utils.genotype.vcf.*;
import org.broadinstitute.sting.utils.BaseUtils;
import java.util.*;
@ -29,7 +30,7 @@ public class VariantsToVCF extends RodWalker<Integer, Integer> {
private String[] ALLOWED_FORMAT_FIELDS = {"GT"};
public Integer map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) {
if ( tracker == null )
if ( tracker == null || !BaseUtils.isRegularBase(ref.getBase()) )
return 0;
rodDbSNP dbsnp = rodDbSNP.getFirstRealSNP(tracker.getReferenceMetaData("dbsnp"));