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

Fix FastqToSam regression. #1811

Merged
merged 1 commit into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions src/main/java/picard/sam/FastqToSam.java
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,7 @@ protected int doPaired(final FastqReader freader1, final FastqReader freader2, f
}

private FastqReader fileToFastqReader(final Path path) throws PicardException {
try {
return new FastqReader(null, Files.newBufferedReader(path), ALLOW_AND_IGNORE_EMPTY_LINES);
} catch (IOException e){
throw new PicardException("cannot create a reader for " + path, e);
}
return new FastqReader(null, IOUtil.openFileForBufferedReading(path), ALLOW_AND_IGNORE_EMPTY_LINES);
}

private SAMRecord createSamRecord(final SAMFileHeader header, final String baseName, final FastqRecord frec, final boolean paired) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/picard/sam/CramCompatibilityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class CramCompatibilityTest {
public static final String CRAM_FILE_QUERY_SORTED = "testdata/picard/sam/test_cram_file_query_sorted.cram";

public static final String REFERENCE_FILE = "testdata/picard/sam/test_cram_file.ref.fa";
public static final String FASTQ_FILE = "testdata/picard/sam/fastq2bam/fastq-sanger/5k-v1-Rhodobacter_LW1.sam.fastq";
public static final String FASTQ_FILE = "testdata/picard/sam/fastq2bam/fastq-sanger/5k-v1-Rhodobacter_LW1.sam.fastq.gz";

public static final String CRAM_UNMAPPED = "testdata/picard/sam/SamFormatConverterTest/unmapped.cram";
public static final String CRAM_UNMAPPED_WITH_OQ_TAG = "testdata/picard/sam/unmapped_with_oq_tag.cram";
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/picard/sam/FastqToSamTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public String getCommandLineProgramName() {
@DataProvider(name = "okVersionFiles")
public Object[][] okVersionFiles() {
return new Object[][] {
{"fastq-sanger/5k-v1-Rhodobacter_LW1.sam.fastq", FastqQualityFormat.Standard },
{"fastq-sanger/5k-v1-Rhodobacter_LW1.sam.fastq.gz", FastqQualityFormat.Standard },
{"fastq-sanger/5k-30BB2AAXX.3.aligned.sam.fastq", FastqQualityFormat.Standard },
{"fastq-sanger/sanger_full_range_as_sanger-63.fastq", FastqQualityFormat.Standard }, // all sanger chars

Expand Down
Loading