Skip to content

Commit

Permalink
Merge pull request #69 from oxfordmmm/feat/gvcf-support
Browse files Browse the repository at this point in the history
fix: ensure all minos positions from merge-vcfs
  • Loading branch information
JeremyWesthead authored Jun 20, 2024
2 parents d06efd7 + 05202ef commit 5563c8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/merge-vcfs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def fetch_minos_positions(minos_vcf: Path) -> set[int]:
Returns:
set[int]: The positions to exclude.
"""
vcf = gumpy.VCFFile(minos_vcf.as_posix())
vcf = gumpy.VCFFile(minos_vcf.as_posix(), ignore_filter=True)
positions = set()
for pos, m_type in vcf.calls:
if m_type != "indel":
Expand Down Expand Up @@ -65,7 +65,7 @@ if __name__ == "__main__":
# Pull out these positions from the GVCF
gvcf_headers, subset = subset_vcf(gvcf_path.as_posix(), to_fetch)

minos_headers, minos_values = subset_vcf(minos_path.as_posix(), sorted(list(minos_positions)))
minos_headers, minos_values = subset_vcf(minos_path.as_posix(), [])

# Pull out header parts to catch parts which need adding
minos_format = [header for header in minos_headers if "##FORMAT" in header]
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = gnomonicus
version = 2.6.0
version = 2.6.1
author = Philip W Fowler, Jeremy Westhead
author_email = philip.fowler@ndm.ox.ac.uk
description = Python code to integrate results of tb-pipeline and provide an antibiogram, mutations and variants
Expand All @@ -18,6 +18,7 @@ python_requires = >=3.10
install_requires =
gumpy>=1.3.0
piezo>=0.8.3
vcf_subset>=1.1.1
numpy
pandas
recursive_diff
Expand Down

0 comments on commit 5563c8c

Please sign in to comment.