Skip to content
Open
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
17 changes: 9 additions & 8 deletions uk/ac/babraham/FastQC/Sequence/FastQFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,18 @@ protected FastQFile(FastQCConfig config,File file) throws SequenceFormatExceptio
}

System.out.println(file.toPath());
System.out.println(Files.probeContentType(file.toPath()));


String content_type = Files.probeContentType(file.toPath());
System.out.println(content_type);

if (file.getName().startsWith("stdin")) {
br = new BufferedReader(new InputStreamReader(System.in));
}
else if (Files.probeContentType(file.toPath()).equals("application/x-gzip")) {
} else if (content_type != null
&& (content_type.equals("application/x-gzip") || content_type.equals("application/gzip"))) {
br = new BufferedReader(new InputStreamReader(new MultiMemberGZIPInputStream(fis)));
}
else if (file.getName().toLowerCase().endsWith(".bz2")) {
br = new BufferedReader(new InputStreamReader(new BZip2InputStream(fis,false)));
}
} else if (file.getName().toLowerCase().endsWith(".bz2")) {
br = new BufferedReader(new InputStreamReader(new BZip2InputStream(fis, false)));
}

else {
br = new BufferedReader(new InputStreamReader(fis));
Expand Down