} else {
slice.alignmentStart = minAlStart;
slice.alignmentSpan = maxAlEnd - minAlStart;
}
Writer writer = f.buildWriter(bos, map, h, slice.sequenceId);
int prevAlStart = slice.alignmentStart;
for (CramRecord r : records) {
r.alignmentStartOffsetFromPreviousRecord = r.getAlignmentStart()
- prevAlStart;
prevAlStart = r.getAlignmentStart();
writer.write(r);
}
slice.contentType = slice.alignmentSpan > -1 ? BlockContentType.MAPPED_SLICE
: BlockContentType.RESERVED;