Skip to content

Commit

Permalink
Update AbstractAlignmentMergerTest to use PicardHtsPath.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnbroad committed May 2, 2022
1 parent f0bf3fa commit 3828906
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ public File getReferenceFile() {
return null;
} else if (!REFERENCE_SEQUENCE.getScheme().equals("file")) {
log.warn(String.format(
"This tool cannot be used with non-local reference files: %s",
"the reference specified by %s cannot be used as a local file object",
REFERENCE_SEQUENCE.getRawInputString()));
return null;
return new File(REFERENCE_SEQUENCE.getRawInputString());
} else {
return REFERENCE_SEQUENCE == null ? null : REFERENCE_SEQUENCE.toPath().toFile();
}
return REFERENCE_SEQUENCE == null ? null : REFERENCE_SEQUENCE.toPath().toFile();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ public File getReferenceFile() {
if (REFERENCE_SEQUENCE == null) {
return null;
} else if (!REFERENCE_SEQUENCE.getScheme().equals("file")) {
log.warn(String.format(
"%s cannot bs used as a Java File object",
REFERENCE_SEQUENCE.getRawInputString()));
log.warn(String.format(
"the reference specified by %s cannot be used as a local file object",
REFERENCE_SEQUENCE.getRawInputString()));
return new File(REFERENCE_SEQUENCE.getRawInputString());
} else {
return REFERENCE_SEQUENCE == null ? null : REFERENCE_SEQUENCE.toPath().toFile();
}
return REFERENCE_SEQUENCE == null ? null : REFERENCE_SEQUENCE.toPath().toFile();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/picard/sam/AbstractAlignmentMergerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ public void testUnmapBacterialContamination() throws IOException {

//yuck!
final RequiredReferenceArgumentCollection requiredReferenceArgumentCollection = new RequiredReferenceArgumentCollection();
requiredReferenceArgumentCollection.REFERENCE_SEQUENCE = new HtsPath(reference.getAbsolutePath());
requiredReferenceArgumentCollection.REFERENCE_SEQUENCE = new PicardHtsPath(reference.getAbsolutePath());
mergeBamAlignment.referenceSequence = requiredReferenceArgumentCollection;

final File fileMerged = newTempSamFile("merged");
Expand Down

0 comments on commit 3828906

Please sign in to comment.