Skip to content
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

Adding getPathToDataFile default method to FeatureCodec #1223

Merged
merged 3 commits into from
Nov 14, 2018

Conversation

lbergelson
Copy link
Member

  • adding a new method FeatureCodec.getPathToDataFile()
    • This method allows a special class of codec where the files that they
      accept are a configuration file and the actual data is stored elsewhere.
    • The default implementation means that existing codecs do not need to be modified in any way
  • modifying AbstractFeatureReader and it's subclasses to use getPathToDataFile
  • downstream tools that implement their own FeatureReader subclasses may
    want to update them to be aware of getPathToDataFile if they want to
    understand these codecs

Checklist

  • Code compiles correctly
  • New tests covering changes and new functionality
  • All tests passing
  • Extended the README / documentation, if necessary
  • Is not backward compatible (breaks binary or source compatibility)

* adding a new method FeatureCodec.getPathToDataFile()
  - This method allows a special class of codec where the files that they
      accept are a configuration file and the actual data is stored elsewhere.
  - The default implementation means that existing codecs do not need to be modified in any way
* modifing AbstractFeatureReader and it's subclasses to use getPathToDataFile
* downstream tools that implement their own FeatureReader subclasses may
  want to update them to be aware of getPathToDataFile if they want to
  understand these codecs
@codecov-io
Copy link

codecov-io commented Nov 9, 2018

Codecov Report

Merging #1223 into master will decrease coverage by 0.078%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##              master     #1223       +/-   ##
===============================================
- Coverage     69.016%   68.938%   -0.078%     
- Complexity      8066      8197      +131     
===============================================
  Files            539       539               
  Lines          32552     32973      +421     
  Branches        5488      5591      +103     
===============================================
+ Hits           22466     22731      +265     
- Misses          7890      8012      +122     
- Partials        2196      2230       +34
Impacted Files Coverage Δ Complexity Δ
...c/main/java/htsjdk/tribble/TabixFeatureReader.java 68.657% <100%> (ø) 8 <0> (ø) ⬇️
src/main/java/htsjdk/tribble/FeatureCodec.java 50% <100%> (+50%) 1 <1> (+1) ⬆️
...ain/java/htsjdk/tribble/AbstractFeatureReader.java 70.213% <100%> (+0.648%) 17 <2> (ø) ⬇️
...sjdk/samtools/util/Md5CalculatingOutputStream.java 66.667% <0%> (-7.692%) 7% <0%> (-1%)
...huffman/codec/CanonicalHuffmanIntegerEncoding.java 78.846% <0%> (-6.868%) 20% <0%> (+10%)
...samtools/cram/encoding/readfeatures/Insertion.java 34.375% <0%> (-4.514%) 8% <0%> (+4%)
src/main/java/htsjdk/samtools/LinearIndex.java 56.818% <0%> (-3.182%) 20% <0%> (+10%)
.../samtools/cram/encoding/readfeatures/SoftClip.java 36.364% <0%> (-2.525%) 9% <0%> (+5%)
src/main/java/htsjdk/tribble/index/Block.java 57.692% <0%> (-2.308%) 12% <0%> (+6%)
.../samtools/cram/encoding/readfeatures/Deletion.java 36.667% <0%> (-2.222%) 8% <0%> (+4%)
... and 15 more

@lbergelson
Copy link
Member Author

@jrobinso As a heads up, this touches FeatureCodec, but I believe it should have no effect on IGV.

@jrobinso
Copy link
Contributor

jrobinso commented Nov 9, 2018

@lbergelson thanks for the heads up, I agree I don't see any impact.

droazen
droazen previously requested changes Nov 9, 2018
Copy link
Contributor

@droazen droazen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete, back to @lbergelson. Minor comments, merge after addressing them.

src/main/java/htsjdk/tribble/FeatureCodec.java Outdated Show resolved Hide resolved
src/main/java/htsjdk/tribble/FeatureCodec.java Outdated Show resolved Hide resolved
src/main/java/htsjdk/tribble/FeatureCodec.java Outdated Show resolved Hide resolved
@droazen droazen assigned lbergelson and unassigned droazen Nov 9, 2018
@lbergelson lbergelson dismissed droazen’s stale review November 14, 2018 18:00

responded to comments

@lbergelson lbergelson merged commit bc4b3ae into master Nov 14, 2018
@lbergelson lbergelson deleted the lb_redirect_codec branch November 14, 2018 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants