Skip to content

Commit

Permalink
Update htsjdk to 2.14.3.
Browse files Browse the repository at this point in the history
Update some code to avoid deprecated methods.
  • Loading branch information
Lenbok committed Mar 12, 2018
1 parent 488f8c1 commit 04c37b2
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.xml
Expand Up @@ -32,7 +32,7 @@

<property name="regression.update" value=""/> <!-- Empty means don't update nano-regression results -->

<property name="htsjdk.jar" value="sam-2.12.0.jar"/> <!-- This must currently be built from the RTG fork of htsjdk -->
<property name="htsjdk.jar" value="sam-2.14.3.jar"/> <!-- This must currently be built from the RTG fork of htsjdk -->


<!-- Define resource collections for compilation, running, etc -->
Expand Down
Binary file renamed lib/sam-2.12.0-src.jar → lib/sam-2.14.3-src.jar
Binary file not shown.
Binary file renamed lib/sam-2.12.0.jar → lib/sam-2.14.3.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/com/rtg/reader/SamSequence.java
Expand Up @@ -101,7 +101,7 @@ static byte getFlags(SAMRecord record) {
if (record.getReadNegativeStrandFlag()) {
flags ^= READ_STRAND_FLAG;
}
if (record.getNotPrimaryAlignmentFlag()) {
if (record.isSecondaryAlignment()) {
flags ^= NOT_PRIMARY_ALIGNMENT_FLAG;
}
return flags;
Expand Down
2 changes: 1 addition & 1 deletion src/com/rtg/sam/DuplicateSamFilter.java
Expand Up @@ -49,7 +49,7 @@ public boolean acceptRecord(SAMRecord rec) {
if (rec == null || rec.getReadName() == null) {
return false;
}
if (!rec.getNotPrimaryAlignmentFlag()) {
if (!rec.isSecondaryAlignment()) {
return true;
}
final long hash = internalHash(rec.getReadName(), !rec.getReadPairedFlag() || rec.getFirstOfPairFlag());
Expand Down
2 changes: 1 addition & 1 deletion src/com/rtg/sam/SamUtils.java
Expand Up @@ -631,7 +631,7 @@ public static Integer getNHOrIH(SAMRecord sam) {
*/
public static boolean uniquelyMapped(SAMRecord record) {
assert !record.getReadUnmappedFlag();
if (record.getMappingQuality() == 0 || record.getNotPrimaryAlignmentFlag()) {
if (record.getMappingQuality() == 0 || record.isSecondaryAlignment()) {
return false;
}
final Integer nh = SamUtils.getNHOrIH(record);
Expand Down
2 changes: 1 addition & 1 deletion test/com/rtg/sam/SkipInvalidRecordsIteratorTest.java
Expand Up @@ -343,7 +343,7 @@ public void testBad2First4() throws IOException {
public void testBad2First5() throws IOException {
checkWarning(SAM_HEAD10 + SAM_REC_BAD4, 0, "SAM record is invalid in file ",
"badread4" + TAB + "2308" + TAB + "gi0" + TAB + "3" + TAB + "255" + TAB + "10M" + TAB + "*" + TAB + "0" + TAB + "0" + TAB + "AAAAAAAAAA" + TAB + "GC@=I3IIII" + TAB /*+ "AS:i:0" + TAB + "IH:i:0"*/,
"ERROR: Read name badread4, Not primary alignment flag should not be set for unmapped read.",
"ERROR: Read name badread4, Secondary alignment flag should not be set for unmapped read.",
"ERROR: Read name badread4, Supplementary alignment flag should not be set for unmapped read.",
"ERROR: Read name badread4, MAPQ should be 0 for unmapped read.]",
"At data line 1"); //"Line: badread4", "MRNM not specified but flags indicate mate mapped;");
Expand Down

0 comments on commit 04c37b2

Please sign in to comment.