robinandeer / puzzle

Variant caller GUI + genetic disease analysis
https://robinandeer.gitbooks.io/puzzle/content/
MIT License
22 stars 7 forks source link

KeyError raised when cyvcf2 loads FindSV vcfs #188

Closed dnil closed 8 years ago

dnil commented 8 years ago

I'm getting a "KeyError" when cyvcf2 tries to fetch INFO-fields from a FindSV VCF. Known issue? Any additional refactor in progress around there or can I safely debug? ;-)

[2016-03-11 10:43:24,499] puzzle.server.factory     ERROR    Exception on /variants/P2760_102_head_5.vcf [GET]
Traceback (most recent call last):
...
 File "/Users/daniel/sandbox/puzzle/puzzle/server/blueprints/variants/templates/sv_variants.html", line 3, in top-level template code
    {% from "macros/filters.html" import filters_form %}
...
 File "/Users/daniel/sandbox/puzzle/puzzle/server/blueprints/variants/templates/sv_variants.html", line 38, in block "container"
    {% for variant in variants %}
 File "/Users/daniel/sandbox/puzzle/puzzle/plugins/vcf/mixins/variant_mixin.py", line 119, in variants
    case_obj=case_obj,
  File "/Users/daniel/sandbox/puzzle/puzzle/plugins/vcf/mixins/variant_mixin.py", line 232, in _format_variants
    info_dict = dict(variant.INFO)
  File "cyvcf2/cyvcf2.pyx", line 1271, in cyvcf2.cyvcf2.INFO.__next__ (cyvcf2/cyvcf2.c:26404)
    return name, self._getval(info) 
File "cyvcf2/cyvcf2.pyx", line 1218, in cyvcf2.cyvcf2.INFO._getval (cyvcf2/cyvcf2.c:25476)
    raise KeyError
KeyError
[2016-03-11 10:43:24,503] werkzeug                  INFO     127.0.0.1 - - [11/Mar/2016 10:43:24] "GET /variants/P2760_102_head_5.vcf HTTP/1.1" 500 -
moonso commented 8 years ago

Guess it has to do with inconsistent header but you should look closer. We have a lot of wierd entries in our file but no complains yet...

dnil commented 8 years ago

Yep, there were a couple of inconsistencies in the INFO variable types from FT. Works on my minimal test now. Will pass the issue on.. :)

moonso commented 8 years ago

Good. Can we close?