INNER CODE UNIT · Python

_resolve_mode_name

TimoLassmann/kalign · python-kalign/__init__.py:119

def _resolve_mode_name(mode):
    """Normalize mode name to one of the C-library presets."""
    if mode is None:
        return "default"
    lower = mode.lower()
    if lower not in _PRESET_MODES:
        raise ValueError(
            f"Invalid mode: {mode!r}. Must be one of: 'fast', 'default', 'recall', 'accurate'"
        )
    return lower


def _conf_to_pp(conf: float) -> str:
    """Convert a confidence value [0..1] to HMMER-style PP character."""
    if conf >= 0.95:
        return "*"
    return str(int(conf * 10))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…