diff --git a/prymer/api/variant_lookup.py b/prymer/api/variant_lookup.py index ce4944c..588f148 100644 --- a/prymer/api/variant_lookup.py +++ b/prymer/api/variant_lookup.py @@ -1,10 +1,9 @@ """ # Variant Lookup Class and Methods -This module contains the abstract class -[`VariantLookup`][prymer.api.variant_lookup.VariantLookup] to facilitate retrieval of -variants that overlap a given genomic coordinate range. Concrete implementations must implement the -[`query()`][prymer.api.variant_lookup.VariantLookup.query] method for retrieving variants +This module contains the class [`VariantLookup`][prymer.api.variant_lookup.VariantLookup] to +facilitate retrieval of variants that overlap a given genomic coordinate range. +The [`query()`][`prymer.api.variant_lookup.VariantLookup.query`] method is used to retrieve variants that overlap the given range. [`VariantLookup`][prymer.api.variant_lookup.VariantLookup] needs a list of VCF files to be queried, @@ -345,7 +344,6 @@ def query( maf: Optional[float] = None, include_missing_mafs: bool = None, ) -> list[SimpleVariant]: - maf = maf if maf is not None else self.min_maf include_missing_mafs = ( include_missing_mafs if include_missing_mafs is not None else self.include_missing_mafs diff --git a/tests/api/test_variant_lookup.py b/tests/api/test_variant_lookup.py index 0f6d38f..6c4e370 100644 --- a/tests/api/test_variant_lookup.py +++ b/tests/api/test_variant_lookup.py @@ -19,7 +19,6 @@ from prymer.api.variant_lookup import VariantType from prymer.api.variant_lookup import _DiskBasedLookup from prymer.api.variant_lookup import _InMemoryLookup -from prymer.api.variant_lookup import _VariantLookup from prymer.api.variant_lookup import calc_maf_from_filter @@ -380,7 +379,7 @@ def get_simple_variant_approx_by_id(*variant_id: str) -> list[SimpleVariant]: def variant_overlap_detector_query( - detector: VariantLookup | _VariantLookup, + detector: VariantLookup, refname: str, start: int, end: int, @@ -537,8 +536,8 @@ def test_calc_maf_from_gt_only() -> None: def test_variant_overlap_detector_query(vcf_path: Path) -> None: """Test `VariantOverlapDetector.query()` positional filtering.""" - variant_overlap_detector = _InMemoryLookup( - vcf_paths=[vcf_path], min_maf=0.0, include_missing_mafs=True + variant_overlap_detector = VariantLookup( + vcf_paths=[vcf_path], min_maf=0.0, include_missing_mafs=True, cached=True ) # query for all variants