Spaces:
Sleeping
Score each example on a fold that held out its chromosome
Browse filesThe demo ran everything on fold 0, whose test set is empty, so it scores
any chromosome including ones it trained on. INS (chr11), TYK2 (chr19) and
ACTB (chr7) are all in fold 0's training set. The tool warns about this at
runtime, but the warning is buried in the log.
Re-running each gene on a fold that excluded its chromosome (TYK2 on 3,
INS and ACTB on 4) shows the leakage is worth about +/-0.06: canonical
starts score 0.889-0.985 held out versus 0.944-0.965 on fold 0. So the
model does generalise on canonical starts, which is fair to report.
The headline finding survives and is now defensible. On fold 3, with
chr19 never seen, the validated TYK2 uORF at position 186 scores 0.000038
against 0.984922 for the canonical start in the same transcript, roughly
26,000x. At the default cutoff the model now proposes only the three
annotated starts and nothing non-canonical at all.
Updates the README numbers, adds a section on choosing a fold, and spells
out the per-example folds in the UI so the next person does not repeat it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@@ -35,28 +35,38 @@ package default cutoff:
|
|
| 35 |
| stage | n |
|
| 36 |
| --- | ---: |
|
| 37 |
| Transcripts submitted | 3 |
|
| 38 |
-
| Initiation sites (score ≥ 0.03) |
|
| 39 |
-
| Non-canonical |
|
| 40 |
| Microproteins (< 100 aa) | 0 |
|
| 41 |
-
| Peptides scored |
|
| 42 |
-
| Strong binders (percentile ≤ 0.5) |
|
| 43 |
| **…and not in a canonical CDS** | **0** |
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
```
|
| 55 |
TYK2@214[uORF] NYIETLQPSF HLA-A*24:02 strong %ile 0.013
|
|
|
|
|
|
|
| 56 |
TYK2@214[uORF] MRNYIETL HLA-B*39:06 strong %ile 0.209
|
|
|
|
| 57 |
```
|
| 58 |
|
| 59 |
-
|
|
|
|
| 60 |
|
| 61 |
It is also **not** the uORF described in the literature. Walters et al.
|
| 62 |
([doi:10.2337/db24-0527](https://doi.org/10.2337/db24-0527)) characterise an
|
|
@@ -68,14 +78,14 @@ ORF, out of frame with both the TYK2 CDS and their uORF.
|
|
| 68 |
Asked about the validated one directly, the model gives:
|
| 69 |
|
| 70 |
```
|
| 71 |
-
TYK2 per-nucleotide initiation probability
|
| 72 |
-
@186 published uORF (validated) 0.
|
| 73 |
-
@214 our 36 aa ORF 0.
|
| 74 |
-
@378 canonical CDS 0.
|
| 75 |
|
| 76 |
All six upstream ATGs in the 378 nt leader:
|
| 77 |
-
{154:
|
| 78 |
-
214: 0.
|
| 79 |
```
|
| 80 |
|
| 81 |
So the model misses the upstream ORF known to be real, and the candidates it
|
|
@@ -99,6 +109,29 @@ All MANE Select, full cDNA with UTRs, fetched from Ensembl GRCh38. Headers
|
|
| 99 |
carry `5UTR=<n>nt CDS=<n>nt` tags, which is how ORF typing works without a GTF.
|
| 100 |
Annotate your own sequences the same way to get uORF/intORF/N-ext calls.
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
## Verified facts about TIS Transformer
|
| 103 |
|
| 104 |
Checked by running it, not inferred from docs:
|
|
|
|
| 35 |
| stage | n |
|
| 36 |
| --- | ---: |
|
| 37 |
| Transcripts submitted | 3 |
|
| 38 |
+
| Initiation sites (score ≥ 0.03) | 3 |
|
| 39 |
+
| Non-canonical | 0 |
|
| 40 |
| Microproteins (< 100 aa) | 0 |
|
| 41 |
+
| Peptides scored | 6,586 |
|
| 42 |
+
| Strong binders (percentile ≤ 0.5) | 165 |
|
| 43 |
| **…and not in a canonical CDS** | **0** |
|
| 44 |
|
| 45 |
+
At the default cutoff the model proposes three initiation sites and all three
|
| 46 |
+
are the annotated starts. Nothing non-canonical clears the threshold at all,
|
| 47 |
+
so every one of the 165 strong binders is a canonical self peptide. The
|
| 48 |
+
pipeline produces **zero novel epitope candidates** — not because it is
|
| 49 |
+
broken, but because a model trained on annotated CDS starts finds annotated
|
| 50 |
+
CDS starts, and those give you canonical proteins.
|
| 51 |
|
| 52 |
+
Each gene is scored by the fold that excluded its chromosome from training
|
| 53 |
+
(TYK2 → fold 3, INS and ACTB → fold 4), so these are generalisation scores,
|
| 54 |
+
not recall of training material. See **Choosing a fold** below.
|
| 55 |
+
|
| 56 |
+
Drop the cutoff 60× (to 0.0005) and five novel candidates appear, all from
|
| 57 |
+
two overlapping upstream ORFs in the 5′UTR of **TYK2**, presented on
|
| 58 |
+
**HLA-A\*24:02**, **HLA-B\*39:06** and **HLA-A\*02:01**:
|
| 59 |
|
| 60 |
```
|
| 61 |
TYK2@214[uORF] NYIETLQPSF HLA-A*24:02 strong %ile 0.013
|
| 62 |
+
TYK2@205[uORF] NYIETLQPSF HLA-A*24:02 strong %ile 0.013
|
| 63 |
+
TYK2@205[uORF] MRNYIETL HLA-B*39:06 strong %ile 0.108
|
| 64 |
TYK2@214[uORF] MRNYIETL HLA-B*39:06 strong %ile 0.209
|
| 65 |
+
TYK2@205[uORF] NMRNYIETL HLA-A*02:01 strong %ile 0.220
|
| 66 |
```
|
| 67 |
|
| 68 |
+
Those ORFs scored **0.0077** and **0.0033**, far below any defensible
|
| 69 |
+
threshold.
|
| 70 |
|
| 71 |
It is also **not** the uORF described in the literature. Walters et al.
|
| 72 |
([doi:10.2337/db24-0527](https://doi.org/10.2337/db24-0527)) characterise an
|
|
|
|
| 78 |
Asked about the validated one directly, the model gives:
|
| 79 |
|
| 80 |
```
|
| 81 |
+
TYK2 per-nucleotide initiation probability (fold 3, chr19 held out)
|
| 82 |
+
@186 published uORF (validated) 0.000038
|
| 83 |
+
@214 our 36 aa ORF 0.007686
|
| 84 |
+
@378 canonical CDS 0.984922 ~26,000x higher
|
| 85 |
|
| 86 |
All six upstream ATGs in the 378 nt leader:
|
| 87 |
+
{154: 0.000387, 186: 0.000038, 205: 0.003272,
|
| 88 |
+
214: 0.007686, 251: 0.000004, 283: 0.000272}
|
| 89 |
```
|
| 90 |
|
| 91 |
So the model misses the upstream ORF known to be real, and the candidates it
|
|
|
|
| 109 |
carry `5UTR=<n>nt CDS=<n>nt` tags, which is how ORF typing works without a GTF.
|
| 110 |
Annotate your own sequences the same way to get uORF/intORF/N-ext calls.
|
| 111 |
|
| 112 |
+
## Choosing a fold
|
| 113 |
+
|
| 114 |
+
The model ships as five versions, each trained with certain chromosomes held
|
| 115 |
+
out. Running a sequence on a fold that was trained on its chromosome inflates
|
| 116 |
+
the score, because the model has seen that locus. The tool prints a warning
|
| 117 |
+
when this happens, and it is easy to miss in the log noise.
|
| 118 |
+
|
| 119 |
+
For the bundled examples:
|
| 120 |
+
|
| 121 |
+
| gene | chromosome | fold to use |
|
| 122 |
+
| --- | --- | --- |
|
| 123 |
+
| TYK2 | 19 | 3 |
|
| 124 |
+
| INS | 11 | 4 |
|
| 125 |
+
| ACTB | 7 | 4 |
|
| 126 |
+
|
| 127 |
+
Fold 0 has an empty test set, so it is the catch-all and will happily score a
|
| 128 |
+
chromosome it trained on. It is the default and is usually the wrong choice
|
| 129 |
+
for a careful comparison.
|
| 130 |
+
|
| 131 |
+
Leakage is worth roughly ±0.06 here: the canonical starts score 0.889–0.985
|
| 132 |
+
on their held-out folds versus 0.944–0.965 on fold 0. The headline finding is
|
| 133 |
+
unaffected, and the validated TYK2 uORF stays near zero either way.
|
| 134 |
+
|
| 135 |
## Verified facts about TIS Transformer
|
| 136 |
|
| 137 |
Checked by running it, not inferred from docs:
|
|
@@ -296,8 +296,14 @@ with gr.Blocks(title="Translatome to epitope") as demo:
|
|
| 296 |
with gr.Column(scale=2):
|
| 297 |
with gr.Accordion("Initiation site prediction", open=True):
|
| 298 |
model = gr.Radio(["human", "mouse"], value="human", label="Model")
|
| 299 |
-
fold = gr.Dropdown(
|
| 300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
cutoff = gr.Slider(
|
| 302 |
0.0005, 1.0, value=pipeline.DEFAULT_PROB_CUTOFF, step=0.0005,
|
| 303 |
label="TIS score cutoff",
|
|
|
|
| 296 |
with gr.Column(scale=2):
|
| 297 |
with gr.Accordion("Initiation site prediction", open=True):
|
| 298 |
model = gr.Radio(["human", "mouse"], value="human", label="Model")
|
| 299 |
+
fold = gr.Dropdown(
|
| 300 |
+
[0, 1, 2, 3, 4], value=0, label="Fold",
|
| 301 |
+
info="Each fold held out different chromosomes during "
|
| 302 |
+
"training. Pick one that did NOT train on your "
|
| 303 |
+
"sequence's chromosome, or the score is inflated. "
|
| 304 |
+
"For the examples: TYK2 → 3, INS and ACTB → 4. "
|
| 305 |
+
"Fold 0 is the catch-all and will score anything.",
|
| 306 |
+
)
|
| 307 |
cutoff = gr.Slider(
|
| 308 |
0.0005, 1.0, value=pipeline.DEFAULT_PROB_CUTOFF, step=0.0005,
|
| 309 |
label="TIS score cutoff",
|