diff --git a/src/svtk/svtk/standardize/std_dragen.py b/src/svtk/svtk/standardize/std_dragen.py index 388d617d7..e47e2f37c 100644 --- a/src/svtk/svtk/standardize/std_dragen.py +++ b/src/svtk/svtk/standardize/std_dragen.py @@ -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 = '+-' @@ -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):