Skip to content

Commit

Permalink
adding region flag to annotatr
Browse files Browse the repository at this point in the history
  • Loading branch information
Melissa Gymrek authored and Melissa Gymrek committed Aug 31, 2024
1 parent fd8bfec commit 38d2254
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trtools/annotaTR/annotaTR.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,6 @@ def main(args):
reader = utils.LoadSingleReader(args.vcf, checkgz=True)
if reader is None:
return 1
if args.region:
reader = reader(args.region)
if args.ref_panel is not None:
vcftype = refpanel_vcftype # should be same as refpanel
elif args.vcftype != 'auto':
Expand Down Expand Up @@ -534,6 +532,8 @@ def main(args):
num_variants_processed_batch = 0
num_variants_processed = 0
dosages_batch = np.empty((args.chunk_size, len(reader.samples)), dtype=np.float32)
if args.region:
reader = reader(args.region)
for record in reader:
# If using refpanel, first add required fields
# In that case, only process records in the refpanel
Expand Down

0 comments on commit 38d2254

Please sign in to comment.