SBRG / pymodulon

Python package for analyzing and visualizing iModulons
MIT License
11 stars 13 forks source link

ZIP handling for IO functions #35

Closed camlam closed 4 years ago

camlam commented 4 years ago

The JSON file for PRECISE 2.0 is over 100 MB, which makes GitHub reject it by default. I've added some handling for load_json_model and save_to_json to work with ZIP archives. Specifically, save_to_json gets a compress option, and load_json_model automatically detects if the provided file to load is a .zip file.

When creating/loading the ZIP file, I'm doing it in a fairly dumb way involving the intermediate step of having the bare JSON file existing too; for now, I just delete that after the fact. A bit hacky, but we can iterate and figure out how to directly write JSON to a ZIP archive later perhaps?

camlam commented 4 years ago

@sapoudel nice find, let me give that a try.