INNER CODE UNIT · Python

pgen

antigenomics/vdjtools · python/vdjtools/cli/__init__.py:155

def pgen(
    input: Path = typer.Argument(..., help="Table (TSV) or list of CDR3 sequences."),
    model: Optional[str] = typer.Option(None, "--model", "-m", help="Built-in locus: TRA TRB TRG TRD IGH IGK IGL."),
    source: str = typer.Option("olga", help="Built-in model set: olga | learned."),
    model_path: Optional[Path] = typer.Option(None, help="Load a custom model directory instead of a built-in."),
    column: Optional[str] = typer.Option(None, "--column", "-c", help="Sequence column (default: auto-detect / first)."),
    v_col: Optional[str] = typer.Option(None, "--v-col", help="V-allele column to condition on (default: marginalize)."),
    j_col: Optional[str] = typer.Option(None, "--j-col", help="J-allele column to condition on (default: marginalize)."),
    seq_type: str = typer.Option("auto", "--type", help="auto | aa | nt."),
    mismatches: int = typer.Option(0, help="Amino-acid Hamming ball: 0 exact, 1 sums all single-substitution neighbours."),
    no_header: bool = typer.Option(False, "--no-header", help="Input is a bare sequence list (no header row)."),
    out: Optional[Path] = typer.Option(None, "--out", "-o", help="Output TSV (default: stdout)."),
) -> None:
    """Compute generation probability (Pgen) for CDR3 sequences — like ``olga-compute_pgen``.

    Appends a ``pgen`` column. V/J are marginalized unless ``--v-col``/``--j-col`` are given.
    Nucleotide vs amino-acid is auto-detected per sequence; amino-acid input can also sum the
    Hamming-distance-1 ball with ``--mismatches 1`` (fast, native).

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…