Skip to content

Commit

Permalink
Remove CHR2 and END2 from INS in CleanVcf (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
epiercehoffman authored May 2, 2024
1 parent e0069ff commit d3514d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sv-pipeline/scripts/format_svtk_vcf_for_gatk.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def is_null(val):
is_ddup = svtype == 'CPX' and 'dDUP' in record.info.get('CPX_TYPE', '')
if svtype == 'BND' or svtype == 'INS' or svtype == 'CTX' or is_ddup:
record.stop = record.start + 1
if svtype == 'CPX':
if svtype == 'CPX' or svtype == 'INS':
if 'CHR2' in record.info:
record.info.pop('CHR2')
if 'END2' in record.info:
Expand Down
5 changes: 4 additions & 1 deletion src/svtk/svtk/svfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ def __init__(self, record):

chrA = record.chrom
posA = record.pos
chrB = record.info['CHR2']
if 'CHR2' in record.info:
chrB = record.info['CHR2']
else:
chrB = chrA
posB = record.stop
name = record.id

Expand Down

0 comments on commit d3514d4

Please sign in to comment.