← Về thư mục
skills/pathogen-variant-surveillance/scripts/lapis_client.py
- LapisError · class · L121-L122 — class LapisError(RuntimeError)
- _encode · function · L128-L138 — def _encode(params: dict[str, Any]) -> str
- _error_detail · function · L141-L157 — def _error_detail(body: bytes) -> str
- request · function · L160-L183 — def request(base_url: str, path: str, params: dict[str, Any] | None = None) -> Any
- resolve_base_url · function · L186-L199 — def resolve_base_url(instance: str | None, base_url: str | None) -> str
- describe_instance · function · L205-L226 — def describe_instance(base_url: str) -> dict
- data_version · function · L229-L231 — def data_version(base_url: str) -> str
- aggregated · function · L234-L245 — def aggregated( base_url: str, filters: dict[str, Any], fields: Sequence[str] = () ) -> list[dict]
- count · function · L248-L251 — def count(base_url: str, filters: dict[str, Any]) -> int
- mutations · function · L254-L271 — def mutations( base_url: str, filters: dict[str, Any], *, amino_acid: bool = True, min_proportion: float = 0.05, ) -> list[dict]
- lineage_definition · function · L274-L280 — def lineage_definition(base_url: str, column: str) -> dict
- _fetch_text · function · L289-L298 — def _fetch_text(url: str) -> str
- pango_provenance · function · L301-L311 — def pango_provenance() -> str
- fetch_pango_aliases · function · L314-L322 — def fetch_pango_aliases() -> dict[str, Any]
- fetch_lineage_notes · function · L325-L345 — def fetch_lineage_notes() -> dict[str, dict[str, str]]
- supports_range · function · L351-L357 — def supports_range(schema: dict, field: str) -> bool
- range_keys · function · L360-L362 — def range_keys(field: str) -> tuple[str, str]
- pick_date_field · function · L365-L394 — def pick_date_field(schema: dict, role: str = "collection", preferred: str | None = None) -> str
- looks_like_lineage · function · L397-L412 — def looks_like_lineage(name: str) -> bool
- lineage_field_candidates · function · L415-L436 — def lineage_field_candidates(schema: dict) -> list[tuple[str, bool]]
- sort_key · function · L427-L433 — def sort_key(name: str) -> tuple
- pick_lineage_field · function · L439-L456 — def pick_lineage_field(schema: dict, preferred: str | None = None) -> tuple[str, bool]
- lineage_filter · function · L459-L476 — def lineage_filter(value: str, has_index: bool, include_sublineages: bool) -> str
- wilson_interval · function · L479-L492 — def wilson_interval(successes: int, total: int, z: float = Z_95) -> tuple[float, float]
- iso_week_start · function · L495-L507 — def iso_week_start(value: str) -> str | None
- bin_weekly · function · L510-L521 — def bin_weekly(rows: Iterable[dict], date_key: str) -> tuple[dict[str, int], int]
- week_range · function · L524-L532 — def week_range(start: str, end: str) -> list[str]
- flag_low_coverage · function · L535-L553 — def flag_low_coverage(weekly_totals: dict[str, int], fraction: float = 0.4) -> dict[str, bool]
- logit_slope · function · L556-L624 — def logit_slope( points: Sequence[tuple[float, int, int]], *, min_successes: int = 5, min_nonzero_weeks: int = 3, ) -> dict[str, float] | None
- unalias · function · L627-L638 — def unalias(name: str, aliases: dict[str, Any]) -> str
- unalias_full · function · L641-L649 — def unalias_full(name: str, aliases: dict[str, Any], limit: int = 20) -> str
- recombinant_parents · function · L652-L662 — def recombinant_parents(name: str, aliases: dict[str, Any]) -> list[str]
- parent_chain · function · L665-L677 — def parent_chain(name: str, definition: dict, limit: int = 60) -> list[str]
- children_map · function · L680-L691 — def children_map(definition: dict) -> dict[str, list[str]]
- descendants · function · L694-L711 — def descendants( name: str, definition: dict, children: dict[str, list[str]] | None = None ) -> list[str]
- top_values · function · L714-L724 — def top_values(rows: Sequence[dict], field: str, limit: int) -> list[str]
- sanitize · function · L732-L751 — def sanitize(value: object, limit: int = 400) -> str
- format_table · function · L754-L765 — def format_table(rows: Sequence[dict], columns: Sequence[str]) -> str
- emit · function · L768-L776 — def emit(rows: Sequence[dict], columns: Sequence[str], fmt: str) -> str