INNER CODE UNIT · Python
_attained
antigenomics/vdjtools · python/vdjtools/cli/__init__.py:627
def _attained(df):
"""Per-locus attained coverage for one already-read sample. Module level so a pool can pickle."""
from vdjtools.signature.signature import attained_coverage
return attained_coverage(df)
def _parse_components(spec: Optional[str]):
"""``None``, an int count, or a float variance fraction -- whichever the string spells."""
if spec is None:
return None
try:
return int(spec) if "." not in spec else float(spec)
except ValueError:
_err(f"--components must be an integer count or a fraction in (0, 1); got {spec!r}")
def _resolve_corpus(name: str):