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
This commit is contained in:
depristo 2009-09-12 19:11:38 +00:00
parent 3ad97e4ab4
commit e8d544869d
1 changed files with 24 additions and 0 deletions

View File

@ -45,6 +45,12 @@ public class AlignmentContext {
protected List<SAMRecord> reads = null; protected List<SAMRecord> reads = null;
protected List<Integer> offsets = null; protected List<Integer> 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 * Default constructor for AlignmentContext object
* since private objects are already set to null we * since private objects are already set to null we
@ -70,6 +76,14 @@ public class AlignmentContext {
this.offsets = offsets; this.offsets = offsets;
} }
public AlignmentContext(GenomeLoc loc, List<SAMRecord> reads, List<Integer> offsets, long skippedBases ) {
this.loc = loc;
this.reads = reads;
this.offsets = offsets;
this.skippedBases = skippedBases;
}
/** /**
* get all of the reads within this context * get all of the reads within this context
* *
@ -184,4 +198,14 @@ public class AlignmentContext {
return new AlignmentContext(ac.getLocation(), reads, offsets); 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;
}
} }