Skip to content

Commit

Permalink
ensure the current directory is used for all output from make_dosages
Browse files Browse the repository at this point in the history
  • Loading branch information
aryarm authored Oct 31, 2023
1 parent 1fdf8e5 commit 09289ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trtools/testsupport/sample_vcfs/associaTR/make_dosages.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
vcf = cyvcf2.VCF(str(SCRIPT_DIR / 'many_samples_biallelic.vcf.gz'))
samples = vcf.samples

with open('gp_dosages.tsv', 'w') as gp_out, open('ap1_dosages.tsv', 'w') as ap1_out, open('ap2_dosages.tsv', 'w') as ap2_out:
with open(str(SCRIPT_DIR / 'gp_dosages.tsv'), 'w') as gp_out, open(str(SCRIPT_DIR / 'ap1_dosages.tsv'), 'w') as ap1_out, open(str(SCRIPT_DIR / 'ap2_dosages.tsv'), 'w') as ap2_out:
for var in vcf:
gp_out.write('{}\t{}\t{}'.format(var.CHROM, var.POS, var.POS))
ap1_out.write('{}\t{}\t{}'.format(var.CHROM, var.POS, var.POS))
Expand Down Expand Up @@ -98,7 +98,7 @@
vcf = cyvcf2.VCF(str(SCRIPT_DIR / 'many_samples_multiallelic.vcf.gz'))
samples = vcf.samples

with open('ap1_multi_dosages.tsv', 'w') as ap1_out, open('ap2_multi_dosages.tsv', 'w') as ap2_out:
with open(str(SCRIPT_DIR / 'ap1_multi_dosages.tsv'), 'w') as ap1_out, open(str(SCRIPT_DIR / 'ap2_multi_dosages.tsv'), 'w') as ap2_out:
for var in vcf:
ap1_out.write('{}\t{}\t{}'.format(var.CHROM, var.POS, var.POS))
ap2_out.write('{}\t{}\t{}'.format(var.CHROM, var.POS, var.POS))
Expand Down

0 comments on commit 09289ea

Please sign in to comment.