Skip to content

Commit

Permalink
Fix the AF format row in sniffles vcf modifier script for snv indels …
Browse files Browse the repository at this point in the history
…vcfs (#954)
  • Loading branch information
EddieLF authored Oct 25, 2024
1 parent 1126264 commit 8f76e91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpg_workflows/scripts/long_read_sniffles_vcf_modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ def modify_sniffles_vcf(file_in: str, file_out: str, fa: str, new_id: str | None
f_out.write('\t'.join(l_split) + '\n')
continue

if 'FORMAT=<ID=AF,Number=1' in line and not sv:
# Correct the AF field to have 'Number=A' for SNPs/Indels, to allow for multiple AF values
line = line.replace('Number=1', 'Number=A')

f_out.write(line)
continue

Expand Down

0 comments on commit 8f76e91

Please sign in to comment.