samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
283 stars 242 forks source link

Add HtsgetBAMFileReader #1494

Closed andersleung closed 4 years ago

andersleung commented 4 years ago

Description

Add a new SamReader type that is able to request reads from HTSget sources, as well as classes defining the content of an HTSget request and response. This change allows consumers of the htsjdk library to use HTSget sources like any other type of reads source.

Things to think about before submitting:

codecov-commenter commented 4 years ago

Codecov Report

Merging #1494 into master will increase coverage by 0.046%. The diff coverage is 72.156%.

@@               Coverage Diff               @@
##              master     #1494       +/-   ##
===============================================
+ Coverage     69.279%   69.325%   +0.046%     
- Complexity      8764      8888      +124     
===============================================
  Files            590       601       +11     
  Lines          34755     35433      +678     
  Branches        5800      5901      +101     
===============================================
+ Hits           24078     24564      +486     
- Misses          8386      8538      +152     
- Partials        2291      2331       +40     
Impacted Files Coverage Δ Complexity Δ
...rc/main/java/htsjdk/samtools/SamReaderFactory.java 65.487% <18.750%> (-3.381%) 7.000 <0.000> (ø)
src/main/java/htsjdk/samtools/SamReader.java 79.348% <25.000%> (-2.470%) 0.000 <0.000> (ø)
.../util/htsget/HtsgetMalformedResponseException.java 28.571% <28.571%> (ø) 1.000 <1.000> (?)
src/main/java/htsjdk/samtools/BAMFileReader.java 69.501% <50.000%> (+1.036%) 50.000 <1.000> (-2.000) :arrow_up:
...rc/main/java/htsjdk/samtools/SamInputResource.java 65.432% <53.846%> (-2.451%) 20.000 <3.000> (+3.000) :arrow_down:
...ava/htsjdk/samtools/util/htsget/HtsgetRequest.java 61.905% <61.905%> (ø) 34.000 <34.000> (?)
...dk/samtools/util/SAMRecordPrefetchingIterator.java 74.667% <74.667%> (ø) 13.000 <13.000> (?)
...main/java/htsjdk/samtools/HtsgetBAMFileReader.java 75.799% <75.799%> (ø) 24.000 <24.000> (?)
...sjdk/samtools/util/htsget/HtsgetErrorResponse.java 80.000% <80.000%> (ø) 4.000 <4.000> (?)
src/main/java/htsjdk/samtools/QueryInterval.java 71.429% <90.909%> (+4.762%) 24.000 <5.000> (+5.000)
... and 22 more
lbergelson commented 4 years ago

@andersleung 👍