Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle truncated files more gracefully #214

Closed
susannasiebert opened this issue Oct 11, 2018 · 0 comments
Closed

Handle truncated files more gracefully #214

susannasiebert opened this issue Oct 11, 2018 · 0 comments

Comments

@susannasiebert
Copy link
Contributor

When a file is truncated pVACseq will error out with the following:

 File “/opt/conda/lib/python3.6/site-packages/lib/input_file_converter.py”, line 348, in execute
   genotype = entry.genotype(self.sample_name)
 File “/opt/conda/lib/python3.6/site-packages/vcf/model.py”, line 277, in genotype
   return self.samples[self._sample_indexes[name]]
IndexError: list index out of range

We should add a try except around this line and throw a more descriptive error message. Something like:
No genotype found for sample SAMPLE NAME at position CHROM POS. Is your file truncated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant