From 7624815e3159d926d8a0710f674f44c616b68bd5 Mon Sep 17 00:00:00 2001 From: Ron Hause Date: Sun, 3 May 2020 22:50:07 -0700 Subject: [PATCH] ZipFile: set allowZip64=True to write larger allele frequency tables Addresses terminating ERROR: Filesize would require ZIP64 extensions when trying to write compressed allele frequency tables > 2 GB --- CRISPResso2/CRISPRessoCORE.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRISPResso2/CRISPRessoCORE.py b/CRISPResso2/CRISPRessoCORE.py index 2a5690c3..0a4d3fc2 100644 --- a/CRISPResso2/CRISPRessoCORE.py +++ b/CRISPResso2/CRISPRessoCORE.py @@ -1965,7 +1965,7 @@ def calculate_range(l): df_alleles.ix[:,dsODN_cols].to_csv(allele_frequency_table_fileLoc,sep='\t',header=True,index=None) - with zipfile.ZipFile(allele_frequency_table_zip_filename,'w',zipfile.ZIP_DEFLATED) as myzip: + with zipfile.ZipFile(allele_frequency_table_zip_filename,'w',zipfile.ZIP_DEFLATED, allowZip64=True) as myzip: myzip.write(allele_frequency_table_fileLoc,allele_frequency_table_filename) os.remove(allele_frequency_table_fileLoc) crispresso2_info['allele_frequency_table_filename'] = os.path.basename(allele_frequency_table_filename) #filename is the name of the file in the zip