4. Detect MMRD or POLE
Classify each tumor as MMRD, POLE or MMRP from its point mutations and microsatellite indels.
Before you begin, you need the package installed, a MAF or VCFs with indels, the repeat-locus files.
A tumor whose mismatch repair has failed accumulates mutations at a high rate, with its own substitution spectrum and with small insertions and deletions at microsatellites; a tumor whose POLE exonuclease domain is mutated accumulates substitutions at an even higher rate, with its own spectrum and few indels. predict_mmrd_ppd() predicts, per tumor, MMRD (mismatch-repair deficient), POLE or MMRP (mismatch-repair proficient) from its point mutations and its microsatellite indels. The shipped models were trained against microsatellite-instability calls that MSIsensor and MANTIS made on sequencing data, so an MMRD call predicts what such a caller would say; it is not an immunohistochemistry or PCR result (what a call means). A signature or HRD is a different call:
- Does a tumor carry a mutational signature? Any signature of the catalog: SBS3, APOBEC, SBS8, SBS18, UV, …
run(soi="APOBEC")2. Detect a signature - Is a tumor homologous-recombination deficient?
run(soi="HRD", segments=…)3. Detect HRD - Is mismatch repair deficient, or POLE mutated?
predict_mmrd_ppd()this guide
Get the example file
The microsatellite counts need the repeat-locus files: sigma2 data fetch --all downloads them only for a GitHub account the maintainers have given access while the SigMA2 repository is private, and the same six files can be downloaded from the public SigMA (R) repository.
Caution Without the files,
predict_mmrd_ppd()does not stop: it scores every tumor as if it had no microsatellite indels and prints nothing at the default verbosity. Check thatnmsi_insandnmsi_delare in the output before you use a call.
curl -LO https://raw.githubusercontent.com/parklab/SigMA/master/inst/extdata/examples/test_mutations_50sample.maf
Run the classifier
import sigma2 as sg2
mm = sg2.predict_mmrd_ppd(
input="test_mutations_50sample.maf",
ref_genome="hg19",
tumor_type="breast",
seq_type="msk",
)
mm.df[[
"total_snvs",
"nins",
"ndel",
"nmsi_ins",
"nmsi_del",
"MMRD_category",
"MMRD_prob",
"POLE_prob",
"MMRP_prob",
]].sort_values("MMRD_prob", ascending=False).head(3)
| Parameter | Description | Default |
|---|---|---|
| inputpath, list of paths, folder or DataFrame | The mutations with their indels: a MAF or VCF path, or a matrix with nins, ndel, nmsi_ins and nmsi_del columns. | Required |
| ref_genomestr or path | The build of the coordinates (hg19, hg38, GRCh37, GRCh38) or a FASTA path. | 'hg19' |
| tumor_typestr | A tumor type of the vocabulary (msi and pole are signature sets, not tumor types); the point-mutation features need its signature set. | Required |
| seq_typestr | The platform: a model exists for msk, tcga_mc3, seqcap, fo and op. | Required |
total_snvs nins ndel nmsi_ins nmsi_del MMRD_category MMRD_prob POLE_prob MMRP_prob
P-0007087-T01-IM5 43 2.0 8.0 1.0 8.0 MMRD 0.999076 0.000050 0.000874
P-0004555-T01-IM5 104 1.0 10.0 1.0 8.0 MMRP 0.362673 0.001093 0.636234
P-0008709-T01-IM5 18 3.0 1.0 3.0 0.0 MMRP 0.072480 0.000129 0.927391
Provide the inputs
-
A MAF or VCF, so indels can be counted. A matrix works only with
nins,ndel,nmsi_insandnmsi_delcolumns, or withindels=. Without them:OutputMMRD/POLE needs indel counts; missing ['nins', 'nmsi_ins', 'nmsi_del']. Give a VCF/MAF input (indels are counted from it), indels=, or nins/ndel/nmsi_ins/nmsi_del columns in the matrix (sigma2.indel_features). -
The repeat-locus BED files, which tell a microsatellite indel from any other.
sigma2 data fetch --allinstalls them, or the public SigMA (R) repository provides them. They are hg19: for hg38 calls, pass hg38 loci withbeds=or lift the indels. Without either, the microsatellite counts are left empty and the calls are made without them, with a message only atverbose=1or above. -
tumor_typeandseq_type. The models are per platform (msk,tcga_mc3,seqcap,fo,op; nowgs), and the point-mutation features need the tumor type's signature set, so a cohort of several tumor types is classified one tumor type at a time. Themsktraining counted esophagogastric cancers asstomach.
catalog, soi and mva are set by the function (SigMA v1's catalog and features); you do not pass them.
Read the call
MMRD_category is the most probable of the three classes. A per-class cutoff set at a 1% false-positive rate in cross-validation is also required, but at its values it never overrules the most probable class. Tumors below the SNV floor are left out of the table; Unclassified comes only from the legacy model, on a platform without a cutoff row.
Note Read
MMRD_category, not a threshold of your own on one probability: the second panel above has an MMRD probability of 0.36 and isMMRP, becauseMMRPis more probable. If your tumors have an MSI test result (an MSIsensor score, PCR or immunohistochemistry), that is the measurement the classifier predicts; use it where you have it.
Note The panel called
MMRDhere, P-0007087, was in this model's training set, labeledMMRP: MSK's clinical MSIsensor call for it was stable (score 0.33). The call is the model's prediction from the spectrum and the indels, and here it disagrees with the clinical caller. Thirty-nine of the fifty example panels were training panels of themskmodel, so the outputs on this page show the interface, not how the model performs on new tumors.
Note In training, a tumor with both microsatellite instability and a pathogenic POLE exonuclease-domain hotspot was labeled
MMRD. León-Castillo et al. (2020) found that endometrial carcinomas with both behave like POLE-ultramutated tumors, so anMMRDcall does not exclude a pathogenic POLE mutation: check the POLE genotype (what a call means).
| Column | Meaning | Stable |
|---|---|---|
MMRD_category | MMRD, POLE, MMRP; Unclassified from the legacy model only | yes |
MMRD_prob, POLE_prob, MMRP_prob | class probabilities; the scale differs between SigMA2's models and the legacy ones | names yes, scale no |
nins, ndel, nmsi_ins, nmsi_del | insertions, deletions, and those at microsatellite loci | yes |
max_clust, subtype_1 … subtype_4, max_subtype | SigMA v1's MSI and POLE cluster subtypes (A to J, La, Lb, Ma, Mb, POLE); informational, independent of the classifier | informational |
mm.df["MMRD_category"].value_counts()
MMRD_category
MMRP 37
MMRD 1
The spectrum of the panel called MMRD, drawn by the package, and the exposures the run gave the signatures the classifier reads: 23 of its 43 SNVs are T>C, and signatures 21 and 26, two of the signatures associated with defective mismatch repair (what a call means), take the largest exposures:
from sigma2 import plot as sp
called = mm.df[mm.df["MMRD_category"] == "MMRD"].index[0]
sp.sbs(
mm.df.loc[[called]].iloc[:, :96],
title=f"{called}: MMRD, {int(mm.df.loc[called, 'total_snvs'])} SNVs",
path="mmrd.svg",
)
mm.df.loc[called].filter(like="exp_sig").astype(float).round(1)
exp_sig10 0.0
exp_sig10a 0.0
exp_sig10b 0.0
exp_sig14 0.0
exp_sig15 0.0
exp_sig20 4.4
exp_sig21 23.2
exp_sig26 13.6
exp_sig54 0.0
exp_sig6 0.0
Name: P-0007087-T01-IM5, dtype: float64
Choose the model
model= | Platforms | Notes |
|---|---|---|
"auto" | msk, tcga_mc3, seqcap, fo, op | SigMA2's models, one per platform |
"legacy" | msk, tcga_mc3 | SigMA v1's multinomials; also Unclassified when the platform has no cutoff row |
mm_v1 = sg2.predict_mmrd_ppd(
input="test_mutations_50sample.maf",
ref_genome="hg19",
tumor_type="breast",
seq_type="msk",
model="legacy",
)
mm_v1.df["MMRD_category"].value_counts()
Optional: inside an HRD run
run(soi="HRD") runs this classifier first when indel counts exist, with the platform's model, and labels MMRD and POLE tumors as such in hrd_call; their pass_mva, pass_mva_strict and confidence are NA, because a hypermutated tumor's Signature 3 features mean something else, while HRD_mva and hrd_score keep a score that does not apply to them. Without the repeat-locus files the step is skipped with no message: the table has no MMRD_category column, and MMRD and POLE tumors receive HRD calls. Detect HRD.
Optional: from the command line
There is no sigma2 mmrd command. MMRD/POLE is the Python call above, or a column of sigma2 hrd score.
Reference: the two pseudo tumor types
The vocabulary lists msi and pole. They name the signature sets the decomposition basis is extended with (msi, msi_extra, pole); they are not values for tumor_type.