Add fromPath to IntervalList. #846

Merged
merged 2 commits into from Apr 20, 2017

Conversation

Projects
None yet
4 participants
Contributor

nh13 commented Apr 7, 2017

I added a fromPath method that is analogous to the fromFile static method in IntervalList. I added a simple test to make both behave similarly.

@nh13 nh13 Add fromPath to IntervalList.
d8ee2b3

codecov-io commented Apr 7, 2017 edited

Codecov Report

Merging #846 into master will increase coverage by 0.959%.
The diff coverage is 85.714%.

@@              Coverage Diff               @@
##             master      #846       +/-   ##
==============================================
+ Coverage     64.86%   65.819%   +0.959%     
- Complexity     7195      7552      +357     
==============================================
  Files           527       527               
  Lines         31781     33334     +1553     
  Branches       5424      5889      +465     
==============================================
+ Hits          20613     21940     +1327     
- Misses         9020      9181      +161     
- Partials       2148      2213       +65
Impacted Files Coverage Δ Complexity Δ
src/main/java/htsjdk/samtools/util/IOUtil.java 30.945% <100%> (+0.879%) 60 <2> (+1) ⬆️
...c/main/java/htsjdk/samtools/util/IntervalList.java 64.879% <80%> (+0.091%) 84 <3> (+27) ⬆️
.../main/java/htsjdk/samtools/fastq/FastqEncoder.java 48.276% <0%> (-34.483%) 7% <0%> (-5%)
...rc/main/java/htsjdk/samtools/SAMProgramRecord.java 67.568% <0%> (-8.108%) 13% <0%> (-2%)
src/main/java/htsjdk/samtools/SAMFileHeader.java 55.625% <0%> (-3.559%) 34% <0%> (ø)
.../htsjdk/samtools/util/AbstractRecordAndOffset.java 73.333% <0%> (-3.137%) 16% <0%> (+7%)
.../main/java/htsjdk/samtools/SAMReadGroupRecord.java 48.276% <0%> (-1.724%) 16% <0%> (-1%)
...ain/java/htsjdk/samtools/fastq/FastqConstants.java 0% <0%> (ø) 0% <0%> (ø) ⬇️
src/main/java/htsjdk/tribble/Feature.java 0% <0%> (ø) 0% <0%> (ø) ⬇️
... and 33 more
Contributor

nh13 commented Apr 7, 2017

@yfarjoun or @droazen care to review?

final IntervalList list = fromReader(reader);
try {
reader.close();
} catch (final IOException e) {
- throw new SAMException(String.format("Failed to close file %s after reading",file));
@lbergelson

lbergelson Apr 7, 2017

Contributor

You might want to use the more ugly path.toUri().toString() because the path.toString() tends to drop the scheme.

@yfarjoun

please use toUri() to include the scheme, then 👍

nh13 was assigned by yfarjoun Apr 18, 2017

@nh13 nh13 Update with small suggestion
a253cb0

@nh13 nh13 merged commit ee21d81 into master Apr 20, 2017

4 of 5 checks passed

codecov/changes 29 files have unexpected coverage changes not visible in diff.
Details
codecov/patch 85.714% of diff hit (target 64.86%)
Details
codecov/project 65.819% (+0.959%) compared to 476adb2
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

nh13 deleted the nh_interval_list_path branch Apr 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment