Often times, GATK cannot calculate a particular annotation value for every variant site. When this happens, GATK uses a 'dot' to represent the missing value (e.g. BaseQRankSum=.). When this occurs, cyvcf2 throws a KeyError (see error output below). Is there a way to discard any sites that have this missing value so that the numeric values of other variant sites can still be extracted?
Traceback (most recent call last):
File "/usr/local/bin/vcfstats", line 6, in <module>
sys.exit(main())
File "/vcfstats/vcfstats/cli.py", line 192, in main
instance.iterate(variant)
File "/vcfstats/vcfstats/instance.py", line 181, in iterate
self.formula.run(variant, self.data.append, self.data.extend)
File "/vcfstats/vcfstats/formula.py", line 319, in run
self.Y.run(variant, self.passed),
File "/vcfstats/vcfstats/formula.py", line 131, in run
value = self.term["func"](variant)
File "/mnt/info_macros.py", line 30, in BaseQRankSum
return variant.INFO["BaseQRankSum"]
File "cyvcf2/cyvcf2.pyx", line 2174, in cyvcf2.cyvcf2.INFO.__getitem__
KeyError: b'BaseQRankSum'
Often times, GATK cannot calculate a particular annotation value for every variant site. When this happens, GATK uses a 'dot' to represent the missing value (e.g. BaseQRankSum=.). When this occurs, cyvcf2 throws a KeyError (see error output below). Is there a way to discard any sites that have this missing value so that the numeric values of other variant sites can still be extracted?
The macro formula I'm using is:
The error output is: