Command-line reference#
Twenty-three commands, one binary — two of them, cassette and build, have
sub-verbs; cassette has seven.
mhcmatch --help lists two more: vector and deslip, deprecated aliases named once at the
end of the cassette table and spelled currently everywhere else.
This page groups the commands by what you are trying to do; every command also has
mhcmatch <command> --help.
Important
Pass ``–peptides FILE``, never loop the shell. The expensive part of most commands is setup a per-peptide invocation re-pays every time: the presentation and affinity calibrators ~5 s, the binder calibrator ~45 s. One process over a list is the difference between seconds per peptide and thousands per second.
The calibrators survive the process — they are cached under $MHCMATCH_CALIBRATION_CACHE,
so they are paid once per machine rather than once per run. Peptide origin search needs nothing
staged: it builds one seqtree.TextIndex per proteome in 0.7 s, answering every length
and every substitution radius from that one build (Staging reference data: the four tiers of bootstrap).
--threads N controls native searches in source, mimics, genes, neoag,
mimicry and rank annotations. It defaults to one; zero opts into the available CPU
allocation. Scoring stays serial. Within an outer workflow, use one native thread per task.
Machine-readable output#
Every command whose result is a table takes --out FILE and writes tab-separated values with a
header row; progress and provenance go to stderr behind #.
--peptides is read two ways, and the difference is not cosmetic. complement, mimics and
source take a bare list, one peptide per line. neoag and mimicry take a TSV with a
header, because they carry every non-peptide column of that file through into their output —
so the column naming the peptide has to be identifiable, and it may be spelled peptide or
epitope. Handing them a bare list fails with no `peptide` / `epitope` column. scan, logo and expression
print an aligned, human-readable form by default and switch to TSV under --out or --tsv —
the aligned form of expression writes median 0.33 and IQR 0.1-0.9 inside cells, which
reads well and parses badly, and the aligned form of logo keeps only the top three residues per
position where the TSV carries the whole PWM.
This is the interface the figures of the mhcmatch paper are built on: each one’s underlying table is produced by a script that drives these commands, so a reader with the package installed regenerates the table rather than trusting it.
Routine tasks#
your question |
command |
|---|---|
Which peptides in this FASTA are presented? |
|
Which allele presents this peptide? |
|
Is it a binder at all, as one number? |
|
What is the IC50, and how does it compare with the wild type? |
|
Which windows of this protein are presented? |
|
Will a T cell recognise it? |
|
Turn a donor’s HLA typing file into an allele list |
|
Rank a donor’s neoantigen candidates end to end |
|
Re-rank my candidate table, keeping every column I sent |
|
What model is doing the ranking, and how well does it hold out? |
|
Why did this candidate rank where it did? |
|
Has this, or something within 1-2 substitutions, already been tested? |
|
What self / viral / bacterial peptide does it resemble? |
|
Does that resemblance raise or lower the risk, and through which channel? |
|
Where in the proteome does it come from? |
|
Which gene does this candidate come from? |
|
Has this peptide been seen expressed in the tumour, and is its gene on in normal tissue? |
|
Which k of this donor’s candidates should the cassette carry? |
|
What is this cassette worth, against one from another donor of another size? |
|
Where does this patient sit in a cohort I already have outcomes for? |
|
Build a vaccine cassette from ranked candidates |
|
…and a map of it a viewer can draw |
|
What does this allele’s motif look like? |
|
What is the full MHC-II ligand around this core? |
|
Two commands people expect to be one#
predict is the presentation axis — is this presented at all, the NetMHCpan %Rank_EL
analogue. restriction is the specificity axis — which allele presents it. They answer
different questions and a peptide can top one and not the other: NLVPMVATV is unambiguously
HLA-A*02:01-restricted, yet bands mid-pack against A*02:01’s own ligands.
The full reference, in three pages
The routine cases above cover most sessions; these are the rest of the reference.