From e8d544869d1a0d9f026a40e284c11d2c4e805e88 Mon Sep 17 00:00:00 2001 From: depristo Date: Sat, 12 Sep 2009 19:11:38 +0000 Subject: [PATCH] Alignment context now supports the idea of skipped bases -- not currently in use git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1598 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/contexts/AlignmentContext.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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; + } }