Fix for SamLocusIterator.RecordAndOffset #849

Merged
merged 1 commit into from Apr 16, 2017
Jump to file or symbol
Failed to load files and symbols.
+3 −19
Split
@@ -49,16 +49,6 @@
/**
* @param record inner SAMRecord
* @param offset from the start of the read
- * @param length of alignment block
- * @param refPos corresponding to read offset reference position
- */
- public AbstractRecordAndOffset(final SAMRecord record, final int offset, int length, int refPos) {
- this(record, offset);
- }
-
- /**
- * @param record inner SAMRecord
- * @param offset from the start of the read
*/
public AbstractRecordAndOffset(final SAMRecord record, final int offset) {
this.offset = offset;
@@ -94,13 +84,6 @@ public int getLength() {
}
/**
- * @return the position in reference sequence, to which the start of alignment block is aligned.
- */
- public int getRefPos() {
- return -1;
- }
-
- /**
* @return read name of inner SAMRecord.
*/
public String getReadName() {
@@ -56,6 +56,8 @@ private EdgingRecordAndOffset(SAMRecord record, int offset) {
public abstract byte getBaseQuality(int position);
+ public abstract int getRefPos();
+
public static EdgingRecordAndOffset createBeginRecord(SAMRecord record, int offset, int length, int refPos) {
return new StartEdgingRecordAndOffset(record, offset, length, refPos);
}
@@ -52,12 +52,11 @@ public void setUp(){
@Test
public void testConstructor(){
- AbstractRecordAndOffset abstractRecordAndOffset = new AbstractRecordAndOffset(record, 0, 10, 3);
+ AbstractRecordAndOffset abstractRecordAndOffset = new AbstractRecordAndOffset(record, 0);
assertArrayEquals(qualities, abstractRecordAndOffset.getBaseQualities());
assertArrayEquals(bases, abstractRecordAndOffset.getRecord().getReadBases());
assertEquals('A', abstractRecordAndOffset.getReadBase());
assertEquals(30, abstractRecordAndOffset.getBaseQuality());
assertEquals(0, abstractRecordAndOffset.getOffset());
- assertEquals(-1, abstractRecordAndOffset.getRefPos());
}
}