hoodini-viz 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +235 -0
- package/dist/3Dmol-kbF_8Uf0.js +24405 -0
- package/dist/data-grid-overlay-editor-CkLt9bIu.js +107 -0
- package/dist/hoodini-viz.css +1 -0
- package/dist/hoodini-viz.js +16 -0
- package/dist/hoodini-viz.umd.js +5520 -0
- package/dist/hoodini-viz_logo_github.svg +66 -0
- package/dist/hoodini_logo.svg +1 -0
- package/dist/hoodini_logo_github.svg +1 -0
- package/dist/index-5wgHRgye.js +1862 -0
- package/dist/index-CLh4oIT4.js +66712 -0
- package/dist/index-vKkdtwHX.js +4388 -0
- package/dist/number-overlay-editor-Drdx4096.js +597 -0
- package/dist/pako.esm-jpEgvmtz.js +1766 -0
- package/dist/vite.svg +1 -0
- package/package.json +118 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 pentamorfico
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="src/assets/hoodini-viz_logo_github.svg" alt="Hoodini Logo" width="450"/>
|
|
4
|
+
|
|
5
|
+
### GPU-powered visualization for comparative genomics
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/hoodini-viz)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
[](https://react.dev/)
|
|
11
|
+
|
|
12
|
+
[**๐ฎ Live Demo**](https://storage.hoodini.bio/hoodini-demo.html) ยท [**๐ฆ npm**](https://www.npmjs.com/package/hoodini-viz) ยท [**๐ Docs**](#usage)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## ๐งฌ What is this?
|
|
19
|
+
|
|
20
|
+
**Hoodini-viz** is a React library for interactive visualization of comparative genomics data at scale.
|
|
21
|
+
|
|
22
|
+
It displays **phylogenetic trees** alongside **aligned gene neighborhood tracks**, connecting homologous proteins across genomes with curved Bรฉzier links colored by cluster or identity. Syntenic regions are highlighted with nucleotide-level alignments rendered as translucent polygons between tracks.
|
|
23
|
+
|
|
24
|
+
Each gene is drawn as a directional arrow showing strand orientation, with **protein domains** overlaid as colored boxes. Click any gene to view its metadata, predict its **3D protein structure** on-demand, or explore **ncRNA secondary structures** with an embedded interactive viewer.
|
|
25
|
+
|
|
26
|
+
A **virtualized data table** lets you browse and filter millions of genes, domains, and links. All visual parameters (colors, dimensions, opacities, scales) are adjustable in real-time through the sidebar controls.
|
|
27
|
+
|
|
28
|
+
<br/>
|
|
29
|
+
|
|
30
|
+
<div align="center">
|
|
31
|
+
|
|
32
|
+
| ๐ **Scales** | โก **Interactive** | ๐จ **Customizable** | ๐ฌ **Structures** | ๐ **Export** |
|
|
33
|
+
|:---:|:---:|:---:|:---:|:---:|
|
|
34
|
+
| 100k+ genes | Zoom, pan, click | 50+ palettes | ESMFold/Boltz2 | SVG ready |
|
|
35
|
+
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<div align="center">
|
|
41
|
+
<img src="src/assets/hoodini-viz-export - 2026-01-14T051133.869.svg" alt="Example visualization" width="85%"/>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<br/>
|
|
45
|
+
|
|
46
|
+
> [!TIP]
|
|
47
|
+
> **Looking to visualize your own genomes?** Use [**Hoodini**](https://github.com/pentamorfico/hoodini) โ the comparative genomics toolkit that fetches assemblies from NCBI, extracts gene neighborhoods, runs protein/nucleotide comparisons, annotates defense systems, builds trees, and generates ready-to-use visualizations. This library is the visualization engine that powers Hoodini's output.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## ๐ฆ Install
|
|
52
|
+
|
|
53
|
+
<table>
|
|
54
|
+
<tr>
|
|
55
|
+
<td width="50%">
|
|
56
|
+
|
|
57
|
+
**npm / yarn / pnpm**
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install hoodini-viz
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
</td>
|
|
64
|
+
<td width="50%">
|
|
65
|
+
|
|
66
|
+
**CDN**
|
|
67
|
+
|
|
68
|
+
```html
|
|
69
|
+
<script src="https://unpkg.com/hoodini-viz"></script>
|
|
70
|
+
<link href="https://unpkg.com/hoodini-viz/dist/hoodini-viz.css" rel="stylesheet">
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
</td>
|
|
74
|
+
</tr>
|
|
75
|
+
</table>
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## ๐ Usage
|
|
80
|
+
|
|
81
|
+
<details open>
|
|
82
|
+
<summary><strong>Full Dashboard</strong> โ includes sidebar, data loading, controls</summary>
|
|
83
|
+
|
|
84
|
+
<br/>
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
import { HoodiniDashboard } from 'hoodini-viz';
|
|
88
|
+
import 'hoodini-viz/style.css';
|
|
89
|
+
|
|
90
|
+
function App() {
|
|
91
|
+
return (
|
|
92
|
+
<HoodiniDashboard
|
|
93
|
+
dataPaths={{
|
|
94
|
+
gffParquet: '/data/genes.parquet',
|
|
95
|
+
hoodsParquet: '/data/hoods.parquet',
|
|
96
|
+
newick: '/data/tree.nwk',
|
|
97
|
+
proteinLinksParquet: '/data/links.parquet',
|
|
98
|
+
}}
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
</details>
|
|
105
|
+
|
|
106
|
+
<details>
|
|
107
|
+
<summary><strong>Core Component</strong> โ bring your own UI and data loading</summary>
|
|
108
|
+
|
|
109
|
+
<br/>
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
import { HoodiniViz } from 'hoodini-viz';
|
|
113
|
+
|
|
114
|
+
<HoodiniViz
|
|
115
|
+
newickStr={newick}
|
|
116
|
+
gffFeatures={genes}
|
|
117
|
+
proteinLinks={links}
|
|
118
|
+
domainsByGene={domains}
|
|
119
|
+
hoods={hoods}
|
|
120
|
+
showTreeLayer={true}
|
|
121
|
+
showGeneLayer={true}
|
|
122
|
+
showProteinLinkLayer={true}
|
|
123
|
+
/>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
</details>
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## ๐ Data Formats
|
|
131
|
+
|
|
132
|
+
> [!NOTE]
|
|
133
|
+
> Parquet files load **3-10x faster** than TSV. Convert with `python scripts/convert_to_parquet.py`
|
|
134
|
+
|
|
135
|
+
| File | Format | Description |
|
|
136
|
+
|:-----|:------:|:------------|
|
|
137
|
+
| `genes` | `.parquet` `.tsv` | GFF3-style gene annotations |
|
|
138
|
+
| `hoods` | `.parquet` `.tsv` | Genomic windows to display |
|
|
139
|
+
| `tree` | `.nwk` | Newick phylogenetic tree |
|
|
140
|
+
| `links` | `.parquet` `.tsv` | Protein homology relationships |
|
|
141
|
+
| `domains` | `.parquet` `.tsv` | Protein domain annotations *(optional)* |
|
|
142
|
+
|
|
143
|
+
<details>
|
|
144
|
+
<summary>๐ <strong>View detailed format specifications</strong></summary>
|
|
145
|
+
|
|
146
|
+
<br/>
|
|
147
|
+
|
|
148
|
+
**genes** โ Standard GFF3 with `ID`, `Name`, `product` in attributes
|
|
149
|
+
**hoods** โ Columns: `hood_id`, `seqid`, `start`, `end`, `align_gene` (optional)
|
|
150
|
+
**links** โ Columns: `gene1`, `gene2`, `identity`
|
|
151
|
+
**domains** โ Columns: `gene_id`, `domain_name`, `start`, `end`, `source`
|
|
152
|
+
|
|
153
|
+
</details>
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## โจ Features
|
|
158
|
+
|
|
159
|
+
<table>
|
|
160
|
+
<tr>
|
|
161
|
+
<td width="33%" valign="top">
|
|
162
|
+
|
|
163
|
+
### ๐ฏ Visualization
|
|
164
|
+
- WebGL/GPU rendering
|
|
165
|
+
- Phylogenetic tree display
|
|
166
|
+
- Gene neighborhood tracks
|
|
167
|
+
- Protein & nucleotide links
|
|
168
|
+
- Domain annotations
|
|
169
|
+
- ncRNA secondary structures
|
|
170
|
+
|
|
171
|
+
</td>
|
|
172
|
+
<td width="33%" valign="top">
|
|
173
|
+
|
|
174
|
+
### ๐๏ธ Interaction
|
|
175
|
+
- Smooth zoom & pan
|
|
176
|
+
- Click to select genes
|
|
177
|
+
- Flip track orientation
|
|
178
|
+
- Shift genomic windows
|
|
179
|
+
- Align by gene cluster
|
|
180
|
+
- Hover tooltips
|
|
181
|
+
|
|
182
|
+
</td>
|
|
183
|
+
<td width="33%" valign="top">
|
|
184
|
+
|
|
185
|
+
### ๐ง Tools
|
|
186
|
+
- Virtualized data table
|
|
187
|
+
- 50+ color palettes
|
|
188
|
+
- Structure prediction
|
|
189
|
+
- Real-time customization
|
|
190
|
+
- SVG/PNG export
|
|
191
|
+
|
|
192
|
+
</td>
|
|
193
|
+
</tr>
|
|
194
|
+
</table>
|
|
195
|
+
|
|
196
|
+
<details>
|
|
197
|
+
<summary>๐ <strong>Feature details</strong></summary>
|
|
198
|
+
|
|
199
|
+
<br/>
|
|
200
|
+
|
|
201
|
+
| Feature | Description |
|
|
202
|
+
|:--------|:------------|
|
|
203
|
+
| **Protein links** | Curved Bรฉzier connections showing homology between proteins across tracks |
|
|
204
|
+
| **Nucleotide links** | Polygonal overlays displaying synteny blocks between genomic regions |
|
|
205
|
+
| **ncRNA structures** | Interactive 2D secondary structure viewer for non-coding RNAs (NAView layout) |
|
|
206
|
+
| **Data table** | Virtualized grid browser for genes, domains, links, and metadata โ handles millions of rows |
|
|
207
|
+
| **3D structures** | On-demand protein structure prediction via ESMFold (โค400aa) or Boltz2 |
|
|
208
|
+
|
|
209
|
+
</details>
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## ๐ ๏ธ Development
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
npm run dev # ๐ฅ Dev server at localhost:5173
|
|
217
|
+
npm run build # ๐ฆ Build library
|
|
218
|
+
npm run build:html # ๐ Self-contained HTML
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## ๐ License
|
|
224
|
+
|
|
225
|
+
[MIT](LICENSE) ยฉ 2026
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
<div align="center">
|
|
230
|
+
|
|
231
|
+
**[โฌ Back to top](#)**
|
|
232
|
+
|
|
233
|
+
Made with ๐ฆ by [pentamorfico](https://github.com/pentamorfico)
|
|
234
|
+
|
|
235
|
+
</div>
|