INNER CODE UNIT · Python

generate

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

def generate(
    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."),
    n: int = typer.Option(100, "--number", "-n", help="Number of sequences to generate."),
    seed: Optional[int] = typer.Option(None, help="Random seed for reproducible draws."),
    productive: bool = typer.Option(False, help="Only keep in-frame, stop-free (productive) rearrangements."),
    out: Optional[Path] = typer.Option(None, "--out", "-o", help="Output TSV (default: stdout)."),
) -> None:
    """Sample recombined sequences from a model — like ``olga-generate_sequences``.

    Emits ``junction_nt, junction_aa, v_call, d_call, d2_call, j_call, productive`` (``d2_call`` is the
    tandem D on the learned D-bearing loci; null otherwise).
    """
    from vdjtools.model.generate import generate as _generate

    m = _load_model(model, source, model_path)
    _write(_generate(m, n, seed=seed, productive_only=productive), out)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…