-
Notifications
You must be signed in to change notification settings - Fork 243
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
re-enable reading bam files from pipes #1085
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1085 +/- ##
===============================================
+ Coverage 66.179% 66.183% +0.004%
Complexity 7635 7635
===============================================
Files 535 535
Lines 32394 32401 +7
Branches 5510 5512 +2
===============================================
+ Hits 21438 21444 +6
- Misses 8790 8792 +2
+ Partials 2166 2165 -1
|
ba33b8a
to
8c7cb2b
Compare
@@ -335,7 +347,7 @@ public URL asUrl() { | |||
|
|||
@Override | |||
public SeekableStream asUnbufferedSeekableStream() { | |||
return lazySeekableStream.get(); | |||
return lazySeekableStream.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra whitespace
} | ||
|
||
@Override | ||
public InputStream asUnbufferedInputStream() { | ||
return asUnbufferedSeekableStream(); | ||
final SeekableStream seekableStream = asUnbufferedSeekableStream(); | ||
if( seekableStream != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space after if and not before seekableStream
return lazySeekableStream.get(); | ||
//if the file doesn't exist, the try to open the stream anyway because users might be expecting the exception | ||
//if it not a regular file than we won't be able to seek on it, so return null | ||
if(!fileResource.exists() || fileResource.isFile()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space after if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a couple style nitpicks.. otherwise 👍
fixing an issue that prevented reading a bam file from an unseekable file, ex: a unix pipe
fixes #1083 which was introduced by #1077
this only fixes the case where the bam is being opened as file, a similar issue exists for Paths, #1084
support for reading pipes as paths has never worked
Checklist