From 3d15e27e80a6abde953fc91f338dc200f986ad9a Mon Sep 17 00:00:00 2001 From: Arthur Gymer <24782660+awgymer@users.noreply.github.com> Date: Mon, 22 Jun 2026 14:28:52 +0930 Subject: [PATCH] fix: move 'del a' to after last access of 'a' --- annotationFinalForStrVCTVRE.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/annotationFinalForStrVCTVRE.py b/annotationFinalForStrVCTVRE.py index 05dc0a9..57aaeda 100644 --- a/annotationFinalForStrVCTVRE.py +++ b/annotationFinalForStrVCTVRE.py @@ -230,7 +230,6 @@ def annotateSVs(inpath, outpath, phylopPath, tempdir): names=['chrom', 'start', 'stop', 'ID', 'uChrom', 'uStart', 'uStop', 'avgUsage', 'avgExp']) out = usageOverlap.groupby('ID').apply(topUsage,n=size) out.drop_duplicates(subset='ID', inplace=True) - del a del b if out.shape[0] == 0: @@ -250,7 +249,9 @@ def annotateSVs(inpath, outpath, phylopPath, tempdir): out = final[['ID']].copy() out['topUsage'] = usageMed out['topExp'] = expMed - + + del a + out.reset_index(drop=True, inplace=True) final2 = final.merge(out[['ID', 'topUsage', 'topExp']], how='left', on='ID') del final