Skip to content

Commit

Permalink
initialize reference inside function so it can be accessible when run…
Browse files Browse the repository at this point in the history
…ning pca via a python script
  • Loading branch information
LindoNkambule committed Jan 27, 2025
1 parent c0634c0 commit 2de61ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gwaspy/pca/pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def pca(
if not out_dir:
raise Exception('\nOutput directory where files will be saved is not specified')

hl.default_reference(new_default_reference=reference)

if pca_type == 'project':
print('\nRunning PCA using projection method')

Expand Down Expand Up @@ -85,8 +87,6 @@ def main():
if not args.prob:
print(f'No prob value specified, {args.prob} will be used')

hl.default_reference(new_default_reference=args.reference)

pca(ref_dirname=args.ref_dirname, ref_basename=args.ref_basename, ref_info=args.ref_info, reference=args.reference,
pca_type=args.pca_type, input_type=args.input_type, data_dirname=args.data_dirname,
data_basename=args.data_basename, maf=args.maf, hwe=args.hwe, call_rate=args.geno, ld_cor=args.ld_cor,
Expand Down

0 comments on commit 2de61ab

Please sign in to comment.