Skip to content

Commit

Permalink
Use number of samples to estimate disk space for merging imputed files
Browse files Browse the repository at this point in the history
  • Loading branch information
LindoNkambule committed Jun 10, 2024
1 parent 79d8693 commit 9989a8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gwaspy/imputation/impute5_impute.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def impute5_imputation(
input_path: str = None,
reference_path: str = None,
output_filename: str = None,
n_samples: int = None,
n_panel_samples: int = 4091,
output_path: str = None):

def imputation(
Expand Down Expand Up @@ -161,13 +163,14 @@ def concatenate_imputed_chunks(
]

# Concatenate imputed chunks
disk_size = int(round(10.0 + 3.0 * vcf_size + ((1.0 + 2.0 * n_samples/n_panel_samples) * ref_size)))
concatenate_imputed_chunks(
b=batch,
chunks_list=imputed_chunks,
output_vcf_name=output_filename,
chrom=f'chr{i}',
out_dir=output_path,
storage=round(vcf_size + ref_size + 10)
storage=disk_size
)

batch.run()

0 comments on commit 9989a8f

Please sign in to comment.