Skip to content

Commit

Permalink
ZipFile: set allowZip64=True to write larger allele frequency tables
Browse files Browse the repository at this point in the history
Addresses terminating ERROR: Filesize would require ZIP64 extensions when trying to write compressed allele frequency tables > 2 GB
  • Loading branch information
ronaldhause authored May 4, 2020
1 parent 6af15a0 commit 7624815
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRISPResso2/CRISPRessoCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7624815

Please sign in to comment.