BioJulia / BioStructures.jl

A Julia package to read, write and manipulate macromolecular structures
Other
95 stars 22 forks source link

Add MMCIF reading and writing with gzip compression #25

Closed marcom closed 4 years ago

marcom commented 4 years ago

Add MMCIF reading and writing with gzip compression

This adds a gzip keyword in the same manner as the MMTF functions have.

Sorry that the patch for the tests is rather noisy and hard to compare, but that was the easiest way to test many things without adding a lot of extra code. Let me know if you want it changed in any way.

I also didn't add anything to the downloadpdb... functions. Not sure what the best way do that would be, perhaps a decompress=true keyword. I personally don't use those functions at the moment (using the PDB rsync).

I have not checked any influence on performance, hoping that there is none.

Types of changes

This PR implements the following changes: (Please tick any or all of the following that are applicable)

:clipboard: Additional detail

At the shell:

    $ wget https://files.rcsb.org/download/1AKI.cif.gz

In Julia:

using BioStructures
cif = MMCIFDict("1AKI.cif.gz"; gzip=true)

:ballot_box_with_check: Checklist

Note: the julia style guide link and the documentation style guide links don't work.

codecov[bot] commented 4 years ago

Codecov Report

Merging #25 into master will increase coverage by 0.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
+ Coverage   94.55%   94.60%   +0.04%     
==========================================
  Files           6        6              
  Lines        1507     1520      +13     
==========================================
+ Hits         1425     1438      +13     
  Misses         82       82              
Impacted Files Coverage Δ
src/mmtf.jl 99.24% <ø> (ø)
src/mmcif.jl 98.81% <100.00%> (+0.06%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 68c891a...e6261ca. Read the comment docs.

jgreener64 commented 4 years ago

Thanks a lot for adding this, it was on the todo list but I didn't get round to it. It looks good to me as is.

jgreener64 commented 4 years ago

Available in v0.11.3.