Skip to content

Commit

Permalink
check if input index file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
LindoNkambule committed Feb 14, 2024
1 parent d4507bd commit 6329cc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gwaspy/phasing/shapeit5_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ def concatenate_rare_chunks(
chrom_vcf = batch.read_input_group(**{'vcf': input_path,
'index': input_idx})

if not hfs.exists(input_idx):
raise SystemExit('GWASpy requires the input file to be indexed (.tbi or .csi). Found none, exiting')

vcf_size = round(size(vcf_path))

if reference_path:
Expand Down

0 comments on commit 6329cc1

Please sign in to comment.