diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/RodVCF.java b/java/src/org/broadinstitute/sting/gatk/refdata/RodVCF.java index 6026a83f0..98271b00b 100755 --- a/java/src/org/broadinstitute/sting/gatk/refdata/RodVCF.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/RodVCF.java @@ -78,6 +78,11 @@ public class RodVCF extends BasicReferenceOrderedDatum implements VariationRod, if (!this.isBiallelic()) throw new StingException("We're not bi-allelic."); } + public boolean hasNonRefAlleleFrequency() { + return (this.mCurrentRecord.getInfoValues().containsKey("AF") || + (this.mCurrentRecord.getInfoValues().containsKey("AC") && this.mCurrentRecord.getInfoValues().containsKey("AN"))); + } + /** * get the frequency of this variant * @@ -101,6 +106,22 @@ public class RodVCF extends BasicReferenceOrderedDatum implements VariationRod, return 0.0; } + public boolean hasStrandBias() { + return this.mCurrentRecord.getInfoValues().containsKey("SB"); + } + + /** + * get the strand bias of this variant + * + * @return StrandBias with the stored slod + */ + public double getStrandBias() { + assertNotNull(); + if (this.mCurrentRecord.getInfoValues().containsKey("SB")) + return Double.valueOf(this.mCurrentRecord.getInfoValues().get("SB")); + return 0.0; + } + /** @return the VARIANT_TYPE of the current variant */ @Override public VARIANT_TYPE getType() {