From 1fdf8e5cb445469e3eab26d5956efe1c8b5d8802 Mon Sep 17 00:00:00 2001 From: Arya Massarat <23412689+aryarm@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:40:50 -0700 Subject: [PATCH] try to execute all of make_dosages.py in its dir --- trtools/testsupport/sample_vcfs/associaTR/make_dosages.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trtools/testsupport/sample_vcfs/associaTR/make_dosages.py b/trtools/testsupport/sample_vcfs/associaTR/make_dosages.py index d9f0c181..a53233f1 100755 --- a/trtools/testsupport/sample_vcfs/associaTR/make_dosages.py +++ b/trtools/testsupport/sample_vcfs/associaTR/make_dosages.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import pathlib import random +import pathlib import cyvcf2 import numpy as np @@ -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: @@ -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))