diff --git a/java/src/org/broadinstitute/sting/gatk/contexts/AlignmentContext.java b/java/src/org/broadinstitute/sting/gatk/contexts/AlignmentContext.java index c6ed4d6a4..9e3fbec81 100755 --- a/java/src/org/broadinstitute/sting/gatk/contexts/AlignmentContext.java +++ b/java/src/org/broadinstitute/sting/gatk/contexts/AlignmentContext.java @@ -45,6 +45,12 @@ public class AlignmentContext { protected List reads = null; protected List offsets = null; + /** + * The number of bases we've skipped over in the reference since the last map invocation. + * Only filled in by RodTraversals right now. By default, nothing is being skipped, so skippedBases == 0. + */ + private long skippedBases = 0; + /** * Default constructor for AlignmentContext object * since private objects are already set to null we @@ -70,6 +76,14 @@ public class AlignmentContext { this.offsets = offsets; } + public AlignmentContext(GenomeLoc loc, List reads, List offsets, long skippedBases ) { + this.loc = loc; + this.reads = reads; + this.offsets = offsets; + this.skippedBases = skippedBases; + } + + /** * get all of the reads within this context * @@ -184,4 +198,14 @@ public class AlignmentContext { return new AlignmentContext(ac.getLocation(), reads, offsets); } + + /** + * Returns the number of bases we've skipped over in the reference since the last map invocation. + * Only filled in by RodTraversals right now. A value of 0 indicates that no bases were skipped. + * + * @return the number of skipped bases + */ + public long getSkippedBases() { + return skippedBases; + } }