Skip to content

Commit

Permalink
Add --version and fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pvanheus committed Nov 21, 2023
1 parent 9ba304f commit 79d7e0f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/tb_variant_filter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

__version_info__ = ('0', '4', '1')
__version__ = '.'.join(__version_info__)

from dataclasses import dataclass
from functools import wraps

Expand Down
2 changes: 2 additions & 0 deletions src/tb_variant_filter/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import vcfpy

from . import __version__
from .filters import get_filters, UnionFilter


Expand Down Expand Up @@ -51,6 +52,7 @@ def main():
parser = argparse.ArgumentParser(
description="Filter variants from a VCF file (relative to M. tuberculosis H37Rv)"
)
parser.add_argument('--version', action='version', version=__version__, help="Print version and exit")
parser.add_argument(
"input_file",
type=argparse.FileType(),
Expand Down
2 changes: 1 addition & 1 deletion src/tb_variant_filter/filters/alt_percentage_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __repr__(self) -> str:
def __call__(self, record: vcfpy.Record) -> Union[vcfpy.Record, None]:
# VCF records have 1 (or 0?) or more ALT records supported by calls from 1 or more samples
# and (sometimes) AO INFO fields with dimension matching the ALT dimensions. Or AF1 or DP4
# or... there really is not standard way of representing ALT allele frequency in
# or... there really is not standard way of representing ALT allele frequency in
# VCF - see this discussion: https://github.com/samtools/hts-specs/issues/78
# This Transform type Filter retains only those ALTs and corresponding INFO matching the
# criteria of the filter
Expand Down

0 comments on commit 79d7e0f

Please sign in to comment.