From b1f2e019dce2b44e56b5c9062c00893e41e02cf7 Mon Sep 17 00:00:00 2001 From: Adam English Date: Sun, 4 Feb 2024 16:39:30 -0500 Subject: [PATCH] pylint and test files --- repo_utils/test_files/beds/boundary_cpx.bed | 3 +++ .../test_files/variants/boundary_cpx.vcf.gz | Bin 0 -> 567 bytes .../test_files/variants/boundary_cpx.vcf.gz.tbi | Bin 0 -> 132 bytes truvari/region_vcf_iter.py | 7 +++---- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 repo_utils/test_files/beds/boundary_cpx.bed create mode 100644 repo_utils/test_files/variants/boundary_cpx.vcf.gz create mode 100644 repo_utils/test_files/variants/boundary_cpx.vcf.gz.tbi diff --git a/repo_utils/test_files/beds/boundary_cpx.bed b/repo_utils/test_files/beds/boundary_cpx.bed new file mode 100644 index 00000000..c1af045b --- /dev/null +++ b/repo_utils/test_files/beds/boundary_cpx.bed @@ -0,0 +1,3 @@ +reference 10 20 +reference 110 120 +reference2 10 20 diff --git a/repo_utils/test_files/variants/boundary_cpx.vcf.gz b/repo_utils/test_files/variants/boundary_cpx.vcf.gz new file mode 100644 index 0000000000000000000000000000000000000000..57aba8042e31e71ebdaa0e8c849095b83f6c6d2a GIT binary patch literal 567 zcmb2|=3rp}f&Xj_PR>jW?-+U~9L#HS5O6sEI$U7qq%>9AGGDVtN}OGXUd?^PFnbMi zWSiOFYC(Uq%uAp5n143f7cb3S`aDmy^R!#--u}3l6bHy#^3L%;>@%%nJW(%v^jJVoYzJap8KD4=>CLLpY~oc7J2=^ z;GW&V&d>$*RRXM*&1bXyd2U=ZnWH_a`Bd7~gw*5Oe-7`Ta&C&pz3mIHEpX3U@@-@G z=F^*Pt?>OHfGxx-lH-kIvp$iN_v=3Q;Zxl<2j z9X1efIe)od^VY`6mz?<>*&c5G%f6DU@ljJ|-p?QFCO`0w+Lc^#cVd{f?Y$WLS24?z zUAxa2$gSg6p4E~*XW8TDKlkpdox4BK?Z(l0&rClw^+l}m*0W$?TL0oKcfPv|(=>w$ z{}UT;&5PSz@>qM?i&4wlIHJUCdQ;G=$sMMcB9ag&HfbYqv;it5H)5*jla uH%V#iZrmlKal3JsoW_sFT?#9tn;2dHFt|OPcT$-XGpwW;n87IpL;wIEGX3WO literal 0 HcmV?d00001 diff --git a/repo_utils/test_files/variants/boundary_cpx.vcf.gz.tbi b/repo_utils/test_files/variants/boundary_cpx.vcf.gz.tbi new file mode 100644 index 0000000000000000000000000000000000000000..83718c31d40191a3d68ab768b3438101a9ef638a GIT binary patch literal 132 zcmb2|=3rp}f&Xj_PR>jW=?vV3pHfni5)v2^-86WaP6b4XbaV$@4(bm2JSkXEM|p#j zzhZ|PTif@9pc%YQ)xJ%VEn4diG;mG$sx+HD`1}Edvn@GtyLK>$eHO@4U|?7&V0`x> Q(0F+?d!!kdLAHVc0F cur_intv.end - 1: try: cur_intv = cur_tree.popleft() - except IndexError as e: + except IndexError: if not inside: yield entry continue # next chromosome - break + break # well before if end < cur_intv.begin: @@ -199,4 +199,3 @@ def region_filter(vcf, tree, inside=True): is_within = truvari.coords_within(start, end, cur_intv.begin, cur_intv.end - 1, end_within) if is_within == inside: yield entry -