From fb49dd439b905b92531eaaa592169b397572f0c1 Mon Sep 17 00:00:00 2001 From: James Casbon Date: Tue, 17 Jan 2012 15:25:17 +0000 Subject: [PATCH] add filter lines, but writer needs improvement --- setup.py | 1 + vcf.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/setup.py b/setup.py index 78566c2..ffb907f 100644 --- a/setup.py +++ b/setup.py @@ -20,6 +20,7 @@ entry_points = { 'vcf.filters': [ 'site_quality = vcf_filter:SiteQuality', + 'vgq = vcf_filter:VariantGenotypeQuality', ] } ) diff --git a/vcf.py b/vcf.py index 9dd2d6b..6908d16 100644 --- a/vcf.py +++ b/vcf.py @@ -530,6 +530,25 @@ def _stringify(self, x): return str(x) + +class Filter(object): + name = 'filter' + description = 'VCF filter base class' + short_name = 'f' + + @classmethod + def customize_parser(self): + pass + + def __init__(self, args): + pass + + def __call__(self): + raise NotImplementedError('Filters must implement this method') + + + + def __update_readme(): import sys file('README.rst', 'w').write(sys.modules[__name__].__doc__)