Skip to content

Commit

Permalink
Merge pull request #73 from oxfordmmm/feat/gvcf-support
Browse files Browse the repository at this point in the history
fix: make sure duplicate rows can't make it through
  • Loading branch information
JeremyWesthead authored Jun 24, 2024
2 parents 7c7ff2c + a1040e7 commit b0e0e17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions bin/merge-vcfs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ if __name__ == "__main__":
f.write(chrom_line + "\n")

# Minos rows
minos_positions = []
for row in minos_values:
r = row.split("\t")
pos = int(r[1])
minos_positions.append(pos)
f.write(row + "\n")

# GVCF rows
Expand All @@ -122,6 +126,12 @@ if __name__ == "__main__":
row = row.replace("\tDP:", "\tCOV:")

row = row.split("\t")
pos = int(row[1])
if pos in minos_positions:
# We should already be filtering out positions, but in cases of dels, the start can slip through
# Catch duplicates in these cases
continue

# GVCF doesn't explicitly call filter passes, so ensure the calls are picked up
row[6] = "PASS" if row[6] == "." else row[6]
f.write("\t".join(row) + "\n")
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = gnomonicus
version = 2.6.3
version = 2.6.4
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 Down

0 comments on commit b0e0e17

Please sign in to comment.