File size: 12,710 Bytes
a6af7a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<div class="summary">
<h2>🤖 NTv3 in Claude Code</h2>
<p>The NTv3 Claude Skill provides a natural-language interface to NTv3 models and genomic analysis tools. It combines model outputs with external genomic data and annotations to support analysis and interpretation of genomic regions.</p><p>Current analyses include functional-track prediction, saliency (gradient-based attribution), single-nucleotide variant comparison and gene annotation, with further interpretation methods and tools planned as the skill develops.</p>
<p>Give the agent a gene or region and the analysis you want to run. It asks for any missing details, prepares an analysis plan and waits for your approval before running it.</p>
</div>
<div class="grid">
<div class="card" style="grid-column: span 12;">
<h2>🧭 How it works</h2>
<p>The agent retrieves the reference sequence, runs the selected analyses and gathers relevant external data. Results are assembled into a locus-level report with an interactive genome browser, delivered as a Claude artifact. A Python script supports rerunning the analysis, and an optional notebook provides access to the saved results.</p><p style="margin-top: 12px;">An evidence audit checks references to analysis files and literature and screens report claims for predefined forms of overstatement. Its decisions are recorded alongside the results.</p>
<a href="assets/skill_workflow_v6b.png" rel="noopener noreferrer" target="_blank"><img alt="NTv3 skill workflow: the natural-language request 'Predict K562 CAGE and DNase at HBE1 and show which bases drive the prediction', the LLM agent that clarifies inputs and resolves a plan, user approval, then NTv3 track prediction, gradient attribution and single-variant comparison with public ENCODE and UCSC context, an evidence audit, and a locus-level report published as a Claude artifact" src="assets/skill_workflow_v6b.png" style="max-width: 100%; margin-top: 20px; border-radius: 12px;"/></a>
</div>
<div class="card" style="grid-column: span 12;">
<h2>🖥️ Example: the HBE1 locus in K562</h2>
<style>
      /* Skill-run transcript (matches supp figure v10a, panel b). Scoped to .skill-chat. */
      .skill-chat {
        margin-top: 12px;
        padding: 14px 16px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: rgba(125, 211, 252, 0.06);
        font-size: 14px;
        line-height: 1.55;
        color: var(--text);
        display: grid;
        grid-template-columns: 4.6em minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 10px;
        overflow-wrap: anywhere;
      }
      .skill-chat .who { color: var(--muted); font-weight: 600; }
      .skill-chat .turn { min-width: 0; }
      .skill-chat .pair { display: inline-block; max-width: 100%; margin-right: 0.35em; }
      .skill-chat .sep { color: var(--muted); margin-left: 0.15em; }
      .skill-chat .q { font-weight: 600; }
      .skill-chat .key { color: var(--muted); }
      .skill-chat .plan {
        padding: 8px 10px;
        border: 1px solid rgba(125, 211, 252, 0.35);
        border-radius: 10px;
        background: rgba(0, 0, 0, 0.18);
      }
      .skill-chat .arrow { color: var(--muted); margin: 0 0.35em; }
      .skill-prompt pre, .skill-prompt code[class*="language-"] { white-space: pre-wrap; overflow-wrap: anywhere; }
      @media (max-width: 520px) {
        .skill-chat { font-size: 13px; padding: 12px; column-gap: 8px; grid-template-columns: 3.9em minmax(0, 1fr); }
      }
    </style>
<div aria-label="Skill run transcript" class="skill-chat" role="group">
<div class="who">User</div>
<div class="turn">Predict K562 CAGE and DNase at <em>HBE1</em> and show which bases drive the prediction.</div>
<div class="who">Agent</div>
<div class="turn">
<span class="pair"><span class="q">Species?</span> human <span class="sep">·</span></span>
<span class="pair"><span class="q">Assembly?</span> hg38 <span class="sep">·</span></span>
<span class="pair"><span class="q">Tracks?</span> CAGE, DNase <span class="sep">·</span></span>
<span class="pair"><span class="q">Window length?</span> 131,072 bp <span class="sep">·</span></span>
<span class="pair"><span class="q">Browser lanes?</span> GENCODE (knownGene), ClinVar (clinvarMain)</span>
</div>
<div class="who">Plan</div>
<div class="turn plan">
<span class="pair"><span class="key">Window</span> chr11:5,204,408–5,335,480 (131,072 bp, GPU, centered on the <em>HBE1</em> TSS)</span><br/>
<span class="pair"><span class="key">Prediction region</span> 49,152 bp <span class="sep">·</span></span>
<span class="pair"><span class="key">Tracks</span> CAGE CNhs11250_P; DNase ENCSR921NMD</span><br/>
<span class="pair"><span class="key">Measured signal</span> ENCODE ENCSR921NMD (DNase) <span class="sep">·</span></span>
<span class="pair"><span class="key">Attribution</span> CAGE <span class="sep">·</span></span>
<span class="pair"><span class="key">Evidence audit</span> on</span>
</div>
<div class="who">User</div>
<div class="turn">
<strong>Approve</strong><span class="arrow">→</span><span class="who">Agent</span> 
        lookup → predict + saliency → evidence audit → locus-level report (Claude artifact)
      </div>
</div>
<p style="margin-top: 14px;">Here, the skill uses NTv3_tracks to predict CAGE and DNase signal in K562 cells around <em>HBE1</em>. The 131,072-bp input is centered on the transcription start site; predictions cover the central 49,152 bp, including the β-globin locus control region.</p>
<p style="margin-top: 10px;">The report brings together predicted CAGE and DNase tracks, measured DNase signal from ENCODE (ENCSR921NMD), and GENCODE and ClinVar annotations. CAGE attributions are shown below the signal tracks. Each lane has its own scale, so compare peak shapes rather than heights. The <em>HBE1</em> TSS line and the HS1–HS5 labels of the locus control region were added for this figure.</p>
<a href="assets/skill_report_hbe1_cagesal_top_hs.png" rel="noopener noreferrer" target="_blank"><img alt="NTv3 skill report browser for HBE1 in K562 over the 49,152 bp predicted crop, with its controls row, range line and ideogram: GENCODE and ClinVar lanes, the NTv3 predicted CAGE track, the measured and predicted DNase tracks, and the CAGE saliency, with the HBE1 TSS and HS1 to HS5 marked" src="assets/skill_report_hbe1_cagesal_top_hs.png" style="max-width: 100%; margin-top: 20px; border-radius: 12px;"/></a>
<p style="margin-top: 16px;">Zooming in on HS4 shows the CAGE attributions at base resolution. Letter heights show the gradient × input of each base for the mean predicted CAGE over the 49,152-bp prediction region. The GATA- and AP-1-like boxes were added for this figure.</p>
<a href="assets/skill_report_hbe1_hs4_saliency_cage_r848.png" rel="noopener noreferrer" target="_blank"><img alt="HS4, chr11:5,288,225-5,288,345 (120 bp), Saliency · CAGE lane: the saliency letters show a GATA site pair and an AP-1 site" src="assets/skill_report_hbe1_hs4_saliency_cage_r848.png" style="max-width: 100%; margin-top: 20px; border-radius: 12px; background: #fff;"/></a>
<p style="margin-top: 6px; font-size: 13px;">HS4 · chr11:5,288,225–5,288,345 (hg38) · CAGE attribution</p>
</div>
<div class="card" style="grid-column: span 12;">
<h2>🎯 Current capabilities</h2>
<table class="capability-grid">
<thead>
<tr>
<th>Analysis</th>
<th>What the skill does</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Predict</strong></td>
<td>Predict functional tracks for a gene or genomic region, with the species and tracks selected for the analysis.</td>
</tr>
<tr>
<td><strong>Saliency</strong></td>
<td>Show which bases drive a selected prediction, as gradient × input at base resolution.</td>
</tr>
<tr>
<td><strong>Compare</strong></td>
<td>Predict each allele of a single-nucleotide variant and report the change in each selected track (alternative − reference).</td>
</tr>
<tr>
<td><strong>Annotate</strong></td>
<td>Predict gene structures for a FASTA, or for the 1 Mb around a Predict run, with the clade-specific NTv3 annotation models.</td>
</tr>
<tr>
<td><strong>Explain</strong></td>
<td>Show which model, window, crop and head produced each number, read from the run's saved files.</td>
</tr>
</tbody>
</table>
<p style="margin-top: 12px;"><strong>Scope:</strong> human (hg38) and mouse (mm10) for Predict, Saliency and Compare; any mammal, plant or insect FASTA for Annotate.</p>
<div class="notice">The <strong>Home</strong> tab describes the models and provides notebooks for running the analyses directly.</div>
</div>
<div class="card" style="grid-column: span 12;">
<h2>🚀 Run the skill</h2>
<p>The skill requires Claude Code, Python 3.11 with uv, and network access to UCSC, ENCODE and Hugging Face. Install it from the <a href="https://github.com/instadeepai/nucleotide-transformer" rel="noopener noreferrer" target="_blank">NTv3 repository</a> (its README has the details):</p>
<div class="code"><pre><code class="language-bash">git clone https://github.com/instadeepai/nucleotide-transformer.git
cd nucleotide-transformer
"$(uv python find 3.11)" -m venv .venv
.venv/bin/pip install -e .      # on a GPU host: .venv/bin/pip install -e '.[gpu]'
uv sync --project ntv3_skills --python 3.11 --frozen
ntv3_skills/.venv/bin/ntv3 doctor</code></pre></div>
<p style="margin-top: 12px;"><code>ntv3 doctor</code> finds the Python that runs the model and says whether it sees a GPU; the skill picks the device from it.</p>
<div class="notice"><strong>GPU or CPU:</strong> with the <code>gpu</code> install on a GPU host, the skill uses the GPU for everything: windows up to 1,048,576 bp, such as the 131,072-bp example above, and Annotate (about 25 GB of GPU memory per 1 Mb window). On a laptop CPU, Predict, Saliency and Compare also run; from 16,384 bp the plan warns that it is slow and needs a lot of memory. On either device, Saliency above 131,072 bp comes with a warning that it may run out of memory.</div>
<p style="margin-top: 12px;">Open Claude Code in the repository directory and try a request that runs on any laptop:</p>
<div class="code skill-prompt"><pre><code class="language-text">/ntv3 HBE1 at chr11 5266144 5270240 on hg38 in K562. Predict K562 CAGE with a 4,096 bp window and the GENCODE and ClinVar lanes.</code></pre></div>
<p style="margin-top: 12px;">The agent asks for any missing details and presents the analysis plan for approval. Once approved, NTv3_tracks predicts K562 CAGE over the central 1,536 bp of the window, at the 3′ end of <em>HBE1</em>, next to the measured ENCODE CAGE signal. Running Annotate on the 1 Mb around this run adds the NTv3 gene model, which matches the three coding exons of <em>HBE1</em> in GENCODE:</p>
<a href="assets/skill_report_hbe1_4kb_annotation.png" rel="noopener noreferrer" target="_blank"><img alt="NTv3 skill report browser for the 4,096 bp HBE1 window in K562: GENCODE V50, the NTv3 annotation lane with a three-exon minus-strand gene model matching HBE1, ClinVar, the measured CAGE signal and the NTv3 predicted CAGE track" src="assets/skill_report_hbe1_4kb_annotation.png" style="max-width: 100%; margin-top: 16px; border-radius: 12px; background: #fff;"/></a>
<p style="margin-top: 6px; font-size: 13px;">Report browser for the request above, after Annotate with the mammals model · chr11:5,266,144–5,270,240 (hg38). Thin GENCODE blocks are UTRs; NTv3 predicts coding exons only.</p>
<p style="margin-top: 16px;">More requests to try:</p>
<div class="code skill-prompt"><pre><code class="language-text"># Saliency
/ntv3 Predict K562 CAGE at HBE1 with a 4,096 bp window and show which bases drive it.
# Compare (rs334, the HBB sickle-cell variant)
/ntv3 Compare chr11 5227002 T A on hg38 in K562: CAGE with a 4,096 bp window.
# The 131 kb example above (GPU)
/ntv3 Predict K562 CAGE and DNase at HBE1 with a 131,072 bp window and show which bases drive the prediction.
# Annotate a genome (GPU)
/ntv3 Annotate /path/to/genome.fa with the mammals model.
# Annotate the 1 Mb around a Predict run (GPU)
/ntv3 Annotate the 1 Mb around my HBE1 run.</code></pre></div>
<p style="margin-top: 12px;">The skill's tools write only to <code>results/</code> in the repository and upload nothing; the report reaches you as a Claude artifact, and every model download is listed in the plan you approve.</p>
<h2 style="margin-top: 20px;">🔗 Links</h2>
<ul><li>Analysis notebooks: <strong>Home</strong> tab</li><li><a href="https://github.com/instadeepai/nucleotide-transformer" rel="noopener noreferrer" target="_blank">NTv3 model code (GitHub)</a></li><li><a href="https://huggingface.co/collections/InstaDeepAI/ntv3" rel="noopener noreferrer" target="_blank">NTv3 model collection</a></li></ul>
</div>
</div>