Skip to content

Commit

Permalink
docs: coderabbit suggestions, mkdocs error
Browse files Browse the repository at this point in the history
  • Loading branch information
emmcauley committed Nov 27, 2024
1 parent e2d71aa commit 86db19f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 3 additions & 5 deletions prymer/api/variant_lookup.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions tests/api/test_variant_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 86db19f

Please sign in to comment.