Bug fix for Kiran; insertions now get a null reference allele even if the ref input object is null

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3254 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2010-04-24 21:31:03 +00:00
parent c8d09a29ed
commit 29ab59a7b3
2 changed files with 5 additions and 4 deletions

View File

@ -239,12 +239,12 @@ public class VariantContextAdaptors {
private static Allele determineRefAllele(VCFRecord vcf, ReferenceContext ref) {
Allele refAllele;
if ( ref == null ) {
if ( vcf.isInsertion() ) {
refAllele = new Allele(Allele.NULL_ALLELE_STRING, true);
} else if ( ref == null ) {
refAllele = new Allele(vcf.getReference(), true);
} else if ( !vcf.isIndel() ) {
refAllele = new Allele(Character.toString(ref.getBase()), true);
} else if ( vcf.isInsertion() ) {
refAllele = new Allele(Allele.NULL_ALLELE_STRING, true);
} else if ( vcf.isDeletion() ) {
int start = (int)(ref.getLocus().getStart() - ref.getWindow().getStart() + 1);
int delLength = 0;

View File

@ -154,7 +154,8 @@ public class VariantEvalWalker extends RodWalker<Integer, Integer> {
public double minCompQualScore = NO_MIN_QUAL_SCORE;
// Right now we will only be looking at SNPS
EnumSet<VariantContext.Type> ALLOW_VARIANT_CONTEXT_TYPES = EnumSet.of(VariantContext.Type.SNP, VariantContext.Type.NO_VARIATION);
// todo -- enable INDEL variant contexts, there's no reason not to but the integration tests need to be updated
EnumSet<VariantContext.Type> ALLOW_VARIANT_CONTEXT_TYPES = EnumSet.of(VariantContext.Type.SNP, VariantContext.Type.NO_VARIATION); //, VariantContext.Type.INDEL);
@Argument(shortName="rsID", fullName="rsID", doc="If provided, list of rsID and build number for capping known snps by their build date", required=false)
protected String rsIDFile = null;