Skip to content

Commit

Permalink
try to execute all of make_dosages.py in its dir
Browse files Browse the repository at this point in the history
  • Loading branch information
aryarm authored Oct 31, 2023
1 parent ab73fbc commit 1fdf8e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trtools/testsupport/sample_vcfs/associaTR/make_dosages.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

import pathlib
import random
import pathlib

import cyvcf2
import numpy as np
Expand Down Expand Up @@ -91,11 +91,11 @@
'tabix -f many_samples_biallelic_dosages.vcf.gz '
'"'
)
sp.run(cmd, shell = True, check=True)
sp.run(cmd, shell = True, check=True, cwd=str(SCRIPT_DIR))

# multiallelic

vcf = cyvcf2.VCF('many_samples_multiallelic.vcf.gz')
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:
Expand Down Expand Up @@ -142,5 +142,5 @@
'tabix -f many_samples_multiallelic_dosages.vcf.gz '
'"'
)
sp.run(cmd, shell = True, check=True)
sp.run(cmd, shell = True, check=True, cwd=str(SCRIPT_DIR))

0 comments on commit 1fdf8e5

Please sign in to comment.