Skip to content

Commit 1629f9e

Browse files
committed
refactor: rename VcfExporter to SnpVcfExporter
1 parent 3a9acbb commit 1629f9e

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

malariagen_data/anoph/to_vcf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222

2323

24-
class VcfExporter(
24+
class SnpVcfExporter(
2525
AnophelesSnpData,
2626
):
2727
def __init__(

malariagen_data/anopheles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from .anoph.sample_metadata import AnophelesSampleMetadata
3636
from .anoph.snp_data import AnophelesSnpData
3737
from .anoph.to_plink import PlinkConverter
38-
from .anoph.to_vcf import VcfExporter
38+
from .anoph.to_vcf import SnpVcfExporter
3939
from .anoph.g123 import AnophelesG123Analysis
4040
from .anoph.fst import AnophelesFstAnalysis
4141
from .anoph.h12 import AnophelesH12Analysis
@@ -88,7 +88,7 @@ class AnophelesDataResource(
8888
AnophelesDistanceAnalysis,
8989
AnophelesPca,
9090
PlinkConverter,
91-
VcfExporter,
91+
SnpVcfExporter,
9292
AnophelesIgv,
9393
AnophelesKaryotypeAnalysis,
9494
AnophelesAimData,

tests/anoph/test_vcf_exporter.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
from malariagen_data import af1 as _af1
99
from malariagen_data import ag3 as _ag3
1010

11-
from malariagen_data.anoph.to_vcf import VcfExporter
11+
from malariagen_data.anoph.to_vcf import SnpVcfExporter
1212

1313

1414
@pytest.fixture
1515
def ag3_sim_api(ag3_sim_fixture):
16-
return VcfExporter(
16+
return SnpVcfExporter(
1717
url=ag3_sim_fixture.url,
1818
public_url=ag3_sim_fixture.url,
1919
config_path=_ag3.CONFIG_PATH,
@@ -40,7 +40,7 @@ def ag3_sim_api(ag3_sim_fixture):
4040

4141
@pytest.fixture
4242
def af1_sim_api(af1_sim_fixture):
43-
return VcfExporter(
43+
return SnpVcfExporter(
4444
url=af1_sim_fixture.url,
4545
public_url=af1_sim_fixture.url,
4646
config_path=_af1.CONFIG_PATH,
@@ -65,7 +65,7 @@ def case_af1_sim(af1_sim_fixture, af1_sim_api):
6565

6666

6767
@parametrize_with_cases("fixture,api", cases=".")
68-
def test_vcf_exporter(fixture, api: VcfExporter, tmp_path):
68+
def test_vcf_exporter(fixture, api: SnpVcfExporter, tmp_path):
6969
region = random.choice(api.contigs)
7070
all_sample_sets = api.sample_sets()["sample_set"].to_list()
7171
sample_sets = random.sample(all_sample_sets, min(2, len(all_sample_sets)))
@@ -120,7 +120,7 @@ def test_vcf_exporter(fixture, api: VcfExporter, tmp_path):
120120

121121

122122
@parametrize_with_cases("fixture,api", cases=".")
123-
def test_vcf_exporter_overwrite(fixture, api: VcfExporter, tmp_path):
123+
def test_vcf_exporter_overwrite(fixture, api: SnpVcfExporter, tmp_path):
124124
region = api.contigs[0]
125125
output_path = str(tmp_path / "test.vcf")
126126

@@ -137,7 +137,7 @@ def test_vcf_exporter_overwrite(fixture, api: VcfExporter, tmp_path):
137137

138138

139139
@parametrize_with_cases("fixture,api", cases=".")
140-
def test_vcf_exporter_gzip(fixture, api: VcfExporter, tmp_path):
140+
def test_vcf_exporter_gzip(fixture, api: SnpVcfExporter, tmp_path):
141141
region = api.contigs[0]
142142
output_path = str(tmp_path / "test.vcf.gz")
143143

@@ -151,7 +151,7 @@ def test_vcf_exporter_gzip(fixture, api: VcfExporter, tmp_path):
151151

152152

153153
@parametrize_with_cases("fixture,api", cases=".")
154-
def test_vcf_exporter_fields(fixture, api: VcfExporter, tmp_path):
154+
def test_vcf_exporter_fields(fixture, api: SnpVcfExporter, tmp_path):
155155
region = api.contigs[0]
156156

157157
# Test with additional FORMAT fields.
@@ -184,7 +184,7 @@ def test_vcf_exporter_fields(fixture, api: VcfExporter, tmp_path):
184184

185185

186186
@parametrize_with_cases("fixture,api", cases=".")
187-
def test_vcf_exporter_fields_gt_required(fixture, api: VcfExporter, tmp_path):
187+
def test_vcf_exporter_fields_gt_required(fixture, api: SnpVcfExporter, tmp_path):
188188
region = api.contigs[0]
189189
output_path = str(tmp_path / "test_no_gt.vcf")
190190

0 commit comments

Comments
 (0)