Skip to content

Commit

Permalink
Updated standardizer to mark inversions
Browse files Browse the repository at this point in the history
  • Loading branch information
kjaisingh committed Jan 9, 2025
1 parent 9079a3b commit 395d519
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/svtk/svtk/standardize/std_dragen.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,20 @@ def standardize_info(self, std_rec, raw_rec):
std_rec.info['CHR2'] = chrB
std_rec.stop = posB

# Update INV
isInv3, isInv5, matePos = checkInversion(raw_rec)
if isInv3 or isInv5:
std_rec.stop = matePos
std_rec.info['SVTYPE'] = 'INV'
std_rec.info['SVLEN'] = matePos - std_rec.pos

# Update STRANDS
if svtype == 'BND':
if svtype == 'INV':
if isInv3:
strands = '++'
else:
strands = '--'
elif svtype == 'BND':
strands = parse_bnd_strands(raw_rec.alts[0])
elif svtype == 'DEL':
strands = '+-'
Expand Down Expand Up @@ -129,13 +141,6 @@ def standardize_info(self, std_rec, raw_rec):
# Update ALGORITHMS
std_rec.info['ALGORITHMS'] = ['dragen']

# Update INV
isInv3, isInv5, matePos = checkInversion(raw_rec)
if isInv3 or isInv5:
std_rec.stop = matePos
std_rec.info['SVTYPE'] = 'INV'
std_rec.info['SVLEN'] = matePos - std_rec.pos

return std_rec

def standardize_alts(self, std_rec, raw_rec):
Expand Down

0 comments on commit 395d519

Please sign in to comment.