Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant and unused BAM_FLAGS from CRAM code. #1292

Merged
merged 1 commit into from
Feb 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -345,25 +345,4 @@ public void setSupplementary(final boolean supplementary) {
flags = supplementary ? flags | SUPPLEMENTARY_FLAG : flags & ~SUPPLEMENTARY_FLAG;
}

public static class BAM_FLAGS {
public static final int READ_PAIRED_FLAG = 0x1;
public static final int PROPER_PAIR_FLAG = 0x2;
public static final int READ_UNMAPPED_FLAG = 0x4;
public static final int MATE_UNMAPPED_FLAG = 0x8;
public static final int READ_STRAND_FLAG = 0x10;
public static final int MATE_STRAND_FLAG = 0x20;
public static final int FIRST_OF_PAIR_FLAG = 0x40;
public static final int SECOND_OF_PAIR_FLAG = 0x80;
public static final int NOT_PRIMARY_ALIGNMENT_FLAG = 0x100;
public static final int READ_FAILS_VENDOR_QUALITY_CHECK_FLAG = 0x200;
public static final int DUPLICATE_READ_FLAG = 0x400;
public static final int SUPPLEMENTARY_FLAG = 0x800;
}

public static int getBAMFlags(final int cramFlags, final byte cramMateFlags) {
int value = cramFlags;
if ((cramMateFlags & MATE_NEG_STRAND_FLAG) != 0) value |= BAM_FLAGS.MATE_STRAND_FLAG;
if ((cramMateFlags & MATE_UNMAPPED_FLAG) != 0) value |= BAM_FLAGS.MATE_UNMAPPED_FLAG;
return value;
}
}