-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add support for random reading of a bcf file. #187
Conversation
Codecov Report
@@ Coverage Diff @@
## master #187 +/- ##
==========================================
+ Coverage 86.59% 86.67% +0.08%
==========================================
Files 76 76
Lines 6011 6051 +40
Branches 501 501
==========================================
+ Hits 5205 5245 +40
Misses 305 305
Partials 501 501
Continue to review full report at Codecov.
|
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.
Thanks! 👍 LGTM except for a redefined var.
test/cljam/test_common.clj
Outdated
(def test-bcf-various-bins-file "test-resources/bcf/various-bins.bcf") | ||
(def test-bcf-various-bins-csi-file "test-resources/bcf/various-bins.bcf.csi") | ||
(def test-large-bcf-file (cavia/resource mycavia "large.bcf")) | ||
(def test-large-vcf-csi-file (cavia/resource mycavia "large.bcf.csi")) |
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.
Rename this to test-large-bcf-csi-file
as test-large-vcf-csi-file
is defined at https://github.com/chrovis/cljam/pull/187/files#diff-ec7848941b3c1273617402827ddb7e2dR220
(def test-large-vcf-csi-file (cavia/resource mycavia "large.bcf.csi")) | |
(def test-large-bcf-csi-file (cavia/resource mycavia "large.bcf.csi")) |
Thank you for pointing. |
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.
👍
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.
Thanks for the feature enhancement! LGTM 👍
I just left a somewhat nitpicky comment 😅
src/cljam/io/bcf/reader.clj
Outdated
|
||
(defn read-variants-randomly | ||
"Reads variants of the bgzip compressed BCF file randomly using csi file. | ||
Returning them as a lazy sequence." |
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 matter of English grammar, but it sounds more natural to me if the second sentence starts with Returns them as ...
instead of Returning them as ...
, unless you join these two sentences into one:
Returning them as a lazy sequence." | |
Returns them as a lazy sequence." |
Thank you for pointing. |
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.
Thanks! I will merge this 💪
Thank you for reviewing. |
This PR provides random reader of BCF files with CSI.