EBISPOT / gwas-sumstats-tools

Apache License 2.0
7 stars 1 forks source link

If file is truncated/corrupted, catch and report this error #19

Open jdhayhurst opened 1 year ago

jdhayhurst commented 1 year ago

catch the pandas parser errors e.g. EOFError: Compressed file ended before the end-of-stream marker was reached and report this correctly.

ljwh2 commented 1 year ago

@jdhayhurst to flesh out this ticket

jdhayhurst commented 1 year ago

When parsing the file with Pandas, add an exception catch for the EOFError so that we can report this back to users in a user friendly manner. I think the point to catch the exception would be here: https://github.com/EBISPOT/gwas-sumstats-tools/blob/61eb5714d2455ec2ff2553679c544ed386944f2f/gwas_sumstats_tools/interfaces/data_table.py#L277. How it's handled from there is up to you, but you'll want to be aware of the exception from the validate module.