Python ‘or’

I’ve been trying to write more Pythonic code. I’m sure everyone has their own definition of what Pythonic is, but everyone will agree on things like using list/dict comprehensions where possible and so on and so forth. I was perusing some code written by some colleagues and found this: push_data = {‘message’: container.message or ‘NO… Read More Python ‘or’

PyVCF and header lines

PyCVF which I use for loading VCF files ignores* all lines of the header (## lines) but needs the column header line – if you omit this than PyVCF will skip the first variant line. *And by ignores I really meant – interprets such lines as ##key=value pairs which are then found in vcf_reader.metadata.