public int getFlags() { return getUShort(FLAGS); }
public int calculateAlignmentEnd() { int aend = getAlignmentStart() - 1; int readNamelen = getUByte(READ_NAME_LEN); int cigarLen = getUShort(CIGAR_LEN); CIGAR = READ_NAME + readNamelen; for (int i = CIGAR; i < CIGAR + 4 * cigarLen; i += 4) { int e = getInt(i); byte op = (byte) (e & 15); int oplen = e >>> 4; switch (op) { case OP_M: case OP_D: case OP_N: case OP_EQ: case OP_X: aend += oplen; break; case OP_I: case OP_S: case OP_H: case OP_P: break; default: break; } } return aend; }