-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,45 @@ | ||
from pathlib import Path | ||
|
||
import cyvcf2 | ||
import pytest | ||
|
||
from pandas_genomics import io | ||
|
||
data_dir = Path(__file__).parent.parent / "data" | ||
DATA_DIR = Path(__file__).parent.parent / "data" | ||
VCF_DIR = Path(cyvcf2.__file__) / "tests" | ||
|
||
|
||
@pytest.mark.slow | ||
@pytest.fixture | ||
def plink_small(): | ||
bed_file = data_dir / "plink" / "plink_test_small.bed" | ||
bed_file = DATA_DIR / "plink" / "plink_test_small.bed" | ||
result = io.from_plink(bed_file) | ||
return result | ||
|
||
|
||
@pytest.mark.slow | ||
@pytest.fixture | ||
def plink_medium(): | ||
bed_file = data_dir / "plink" / "plink_test_medium.bed" | ||
bed_file = DATA_DIR / "plink" / "plink_test_medium.bed" | ||
result = io.from_plink(bed_file) | ||
return result | ||
|
||
|
||
@pytest.fixture | ||
def plink_small_20(): | ||
bed_file = data_dir / "plink" / "plink_test_small.bed" | ||
bed_file = DATA_DIR / "plink" / "plink_test_small.bed" | ||
result = io.from_plink(bed_file, max_variants=20) | ||
return result | ||
|
||
|
||
@pytest.fixture | ||
def plink_small_20_swap(): | ||
bed_file = data_dir / "plink" / "plink_test_small.bed" | ||
bed_file = DATA_DIR / "plink" / "plink_test_small.bed" | ||
result = io.from_plink(bed_file, max_variants=20, swap_alleles=True) | ||
return result | ||
|
||
@pytest.fixture | ||
def vcf_test(): | ||
vcf_filename = VCF_DIR / "test.vcf.gz" | ||
result = io.from_vcf(vcf_filename) | ||
return result |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
def test_loaded(vcf_test): | ||
"""Validate the dataset""" | ||
# TODO: Add more assertions | ||
assert vcf_test.shape == (150, 3020) |