react-msaview-cli 6.1.0 → 6.2.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.
Files changed (2) hide show
  1. package/README.md +225 -210
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,79 +1,144 @@
1
1
  # react-msaview-cli
2
2
 
3
- Command-line tools for [react-msaview](../) (JBrowseMSA), including batch
4
- InterProScan processing for multiple sequence alignments.
3
+ Annotate a multiple sequence alignment and render it to a publication figure,
4
+ from the command line, with no browser in the loop.
5
5
 
6
- Uses
7
- [msa-parsers](https://github.com/GMOD/JBrowseMSA/tree/main/packages/msa-parsers)
8
- for file format support.
6
+ Two things live here, and they compose:
7
+
8
+ - **Annotate** — build a domain or exon GFF for an alignment, from InterPro's
9
+ precomputed matches (`interpro`), a live InterProScan run (`interproscan`), or
10
+ a RefSeq transcript's exon model (`genestructure`).
11
+ - **Render** — draw the alignment, its tree, and those annotations to a
12
+ standalone SVG (`export-svg`). This is the same renderer the web viewer uses,
13
+ driven headlessly, so the figure matches what the app shows.
14
+
15
+ ## Prerequisites
9
16
 
10
- ## Installation
17
+ - NodeJS v22+
18
+
19
+ Nothing else for `export-svg` and `interpro`. `interproscan` needs a backend to
20
+ scan with — the EBI web API (the default, no install), or Docker, Singularity,
21
+ or a local InterProScan (see [interproscan](#interproscan)).
22
+
23
+ ## Setup
24
+
25
+ ```bash
26
+ npm install -g react-msaview-cli
27
+ ```
28
+
29
+ From a clone of the monorepo instead:
11
30
 
12
31
  ```bash
13
- # From the monorepo root
14
32
  pnpm install
15
33
  pnpm --filter react-msaview-cli build
34
+ ```
35
+
36
+ ## Quickstart
16
37
 
17
- # Or install globally (after publishing)
18
- pnpm add -g react-msaview-cli
38
+ An Src-family kinase alignment with its tree and Pfam domains, rendered in two
39
+ commands. The first asks InterPro for the domains of each row; the second draws
40
+ the figure.
41
+
42
+ ```bash
43
+ react-msaview-cli interpro accessions.tsv -o domains.gff
44
+
45
+ react-msaview-cli export-svg --msa kinases.aln --tree kinases.nwk \
46
+ --gff domains.gff --col-width 1.6 --row-height 14 --tree-area-width 200 \
47
+ -o kinases.svg
19
48
  ```
20
49
 
21
- ## Commands
50
+ ![Src-family kinases: tree, SH3/SH2/kinase domain architecture, and the color key](../../docs/media/cli-domains.png)
22
51
 
23
- ### interproscan
52
+ The domain architecture reads straight down the alignment — SH3, then SH2, then
53
+ the catalytic domain — because every row is drawn in the alignment's own column
54
+ space. The key on the right is generated from the domains actually present.
24
55
 
25
- Run InterProScan on all sequences in an MSA file and output results as GFF3.
56
+ Every figure on this page is `export-svg` output, drawn from the Src-kinase and
57
+ GPCR examples in
58
+ [packages/examples](https://github.com/GMOD/JBrowseMSA/tree/main/packages/examples/src/examples/exampleData.ts).
59
+
60
+ ## Rendering figures
26
61
 
27
62
  ```bash
28
- react-msaview-cli interproscan <input-msa> [options]
63
+ react-msaview-cli export-svg --msa <file> [options]
29
64
  ```
30
65
 
31
- #### Options
66
+ | Option | Description | Default |
67
+ | ------------------------ | -------------------------------------------- | --------------- |
68
+ | `--msa <file>` | MSA file (FASTA, Stockholm, Clustal, A3M) | _required_ |
69
+ | `--tree <file>` | Newick tree file | |
70
+ | `--gff <file>` | Domain or exon GFF (from the commands below) | |
71
+ | `-o, --output <file>` | Output SVG file path | `alignment.svg` |
72
+ | `--color-scheme <name>` | Color scheme | `maeditor` |
73
+ | `--col-width <px>` | Width of one alignment column | `12` |
74
+ | `--row-height <px>` | Height of one alignment row | `16` |
75
+ | `--width <px>` | Viewport width, which sets the tree area | `1200` |
76
+ | `--height <px>` | Viewport height | `600` |
77
+ | `--tree-area-width <px>` | Tree panel width in pixels | |
78
+
79
+ ### Sizing the figure
80
+
81
+ `export-svg` always draws the **entire** alignment, so the output is as wide as
82
+ the alignment is long — `--width` and `--height` size the viewport the model
83
+ lays out in, not the figure. What scales the figure is `--col-width` and
84
+ `--row-height`:
32
85
 
33
- | Option | Description | Default |
34
- | ---------------------------- | ------------------------------------------------------ | --------------------------------------- |
35
- | `-o, --output <file>` | Output GFF file path | `domains.gff` |
36
- | `--local` | Use a local InterProScan installation instead of EBI | `false` |
37
- | `--docker` | Run InterProScan via the `interpro/interproscan` image | `false` |
38
- | `--singularity` | Run InterProScan via a Singularity/Apptainer container | `false` |
39
- | `--singularity-image <img>` | Singularity image to use | `docker://interpro/interproscan:latest` |
40
- | `--interproscan-path <path>` | Path to local interproscan.sh | `interproscan.sh` |
41
- | `--programs <list>` | Comma-separated list of InterProScan programs | `PfamA,CDD` |
42
- | `--email <email>` | Email for EBI API (used only for EBI API runs) | `user@example.com` |
43
- | `-h, --help` | Show help message | |
86
+ ```bash
87
+ ## a 90-column alignment at the default 12px columns: letters are legible
88
+ react-msaview-cli export-svg --msa gpcrs.fa -o gpcrs.svg
89
+ ```
44
90
 
45
- By default (no backend flag) the CLI submits sequences to the EBI InterProScan
46
- REST API one at a time. `--local`, `--docker`, and `--singularity` instead run
47
- InterProScan on the whole alignment locally, which is much faster for large
48
- datasets.
91
+ ![Four GPCR rows with residue letters and a Pfam domain box](../../docs/media/cli-letters.png)
92
+
93
+ ```bash
94
+ ## an 856-column alignment at 1.4px columns: an overview, no letters
95
+ react-msaview-cli export-svg --msa kinases.aln --tree kinases.nwk \
96
+ --col-width 1.4 --row-height 16 --tree-area-width 280 -o overview.svg
97
+ ```
49
98
 
50
- #### Supported MSA formats
99
+ ![The same kinase family drawn as a colored overview beside its tree](../../docs/media/cli-quickstart.png)
51
100
 
52
- The CLI automatically detects the input format:
101
+ Residue letters draw only where there is room for them — columns at least 5px
102
+ wide and wider than half the row height, rows at least 8px tall — which is the
103
+ same rule the app applies as you zoom out. Below that you get the colored
104
+ overview above, and for a whole-alignment figure that is usually what you want:
105
+ the conserved blocks and the gaps are the signal at that scale, and the letters
106
+ would be unreadable ink.
53
107
 
54
- - **FASTA** (`.fasta`, `.fa`, `.faa`)
55
- - **Clustal** (`.clustal`, `.aln`)
56
- - **Stockholm** (`.sto`, `.stockholm`)
57
- - **A3M** (`.a3m`) - AlphaFold/ColabFold format
58
- - **EMF** (`.emf`) - Ensembl Multi Format
59
-
60
- #### Available InterProScan programs
61
-
62
- When using `--programs`, you can specify any combination of:
63
-
64
- - `PfamA` - Protein families (part of the `PfamA,CDD` default)
65
- - `SMART` - Simple Modular Architecture Research Tool
66
- - `SUPERFAMILY` - Structural and functional annotation
67
- - `Gene3D` - Structural domain assignments
68
- - `CDD` - Conserved Domain Database
69
- - `PANTHER` - Protein Analysis Through Evolutionary Relationships
70
- - `TIGRFAM` - TIGR protein families
71
- - `Hamap` - High-quality Automated Annotation of Microbial Proteomes
72
- - `ProSiteProfiles` - PROSITE profiles
73
- - `ProSitePatterns` - PROSITE patterns
74
- - `PRINTS` - Protein fingerprints
75
- - `PIRSF` - PIR SuperFamily
76
- - `MobiDBLite` - Disorder prediction
108
+ ### Color schemes
109
+
110
+ ```bash
111
+ react-msaview-cli export-svg --msa gpcrs.fa \
112
+ --color-scheme clustalx_protein_dynamic -o gpcrs.svg
113
+ ```
114
+
115
+ ![The same GPCR rows under the ClustalX scheme](../../docs/media/cli-clustalx.png)
116
+
117
+ `maeditor` (the default), `clustal`, `clustalx_protein`, `lesk`, `flower`,
118
+ `cinema`, and the `jalview_*` family (`jalview_zappo`, `jalview_taylor`,
119
+ `jalview_hydrophobicity`, `jalview_buried`, `jalview_prophelix`,
120
+ `jalview_propstrand`, `jalview_propturn`) color each residue by identity. The
121
+ two `_dynamic` schemes `clustalx_protein_dynamic` and
122
+ `percent_identity_dynamic` color by what the column actually contains, so
123
+ conservation shows up as color rather than as something you have to read off.
124
+ `nucleotide`, `clustalx_dna`, `jbrowse_dna` and `rainbow_dna` are for DNA;
125
+ `none` turns background color off.
126
+
127
+ ### Output
128
+
129
+ The SVG is pure vector: every cell is its own rectangle, so it scales without
130
+ limit but grows with the alignment. A 10-row by 856-column figure is about
131
+ 700KB. Converting to PNG or PDF for a journal:
132
+
133
+ ```bash
134
+ rsvg-convert -w 2000 alignment.svg -o alignment.png
135
+ inkscape alignment.svg --export-filename=alignment.pdf
136
+ ```
137
+
138
+ Exports are reproducible — the same input gives the same bytes, so a figure can
139
+ be regenerated in CI and diffed.
140
+
141
+ ## Annotating
77
142
 
78
143
  ### interpro
79
144
 
@@ -92,8 +157,6 @@ The input is one accession per line, optionally followed by a tab- or
92
157
  space-separated row label; lines starting with `#` are ignored. The output GFF
93
158
  is byte-for-byte compatible with the `interproscan` command.
94
159
 
95
- #### Options
96
-
97
160
  | Option | Description | Default |
98
161
  | --------------------- | --------------------------------- | ------------- |
99
162
  | `-o, --output <file>` | Output GFF file path | `domains.gff` |
@@ -121,145 +184,128 @@ are automatic with backoff, and if the API is still unreachable the accessions
121
184
  already fetched stay cached, so re-running picks up where it stopped instead of
122
185
  asking EBI for all of them again.
123
186
 
124
- ### genestructure
187
+ ### interproscan
125
188
 
126
- Build a **gene-structure GFF** for a coding-sequence alignment from a RefSeq
127
- transcript, overlaid in react-msaview the same way InterProScan domains are. The
128
- exon model is fetched from the NCBI Datasets v2 API; each species' Nth exon is
129
- named `exon-N`, so a given exon is the same color in every row and the exon
130
- architecture reads straight down the alignment.
189
+ Run InterProScan on all sequences in an MSA file and output results as GFF3. Use
190
+ this when the rows are not UniProt accessions a de novo assembly, predicted
191
+ proteins, anything InterPro has not already scanned.
131
192
 
132
193
  ```bash
133
- react-msaview-cli genestructure <input-msa> --gene <symbol> --ref <rowname> [options]
194
+ react-msaview-cli interproscan <input-msa> [options]
134
195
  ```
135
196
 
136
- The exon boundaries of the chosen transcript are mapped onto the reference row's
137
- columns, then projected into every other row's own ungapped coordinates — so an
138
- exon that picks up a frameshifting indel in one lineage gets shorter on exactly
139
- that row while staying column-aligned with the rest. The reference row must be
140
- the transcript's coding sequence (the CLI warns if its length doesn't match).
197
+ | Option | Description | Default |
198
+ | ---------------------------- | ------------------------------------------------------ | --------------------------------------- |
199
+ | `-o, --output <file>` | Output GFF file path | `domains.gff` |
200
+ | `--local` | Use a local InterProScan installation instead of EBI | `false` |
201
+ | `--docker` | Run InterProScan via the `interpro/interproscan` image | `false` |
202
+ | `--singularity` | Run InterProScan via a Singularity/Apptainer container | `false` |
203
+ | `--singularity-image <img>` | Singularity image to use | `docker://interpro/interproscan:latest` |
204
+ | `--interproscan-path <path>` | Path to local interproscan.sh | `interproscan.sh` |
205
+ | `--programs <list>` | Comma-separated list of InterProScan programs | `PfamA,CDD` |
206
+ | `--email <email>` | Email for EBI API (used only for EBI API runs) | `user@example.com` |
141
207
 
142
- #### Options
208
+ By default (no backend flag) the CLI submits sequences to the EBI InterProScan
209
+ REST API one at a time. `--local`, `--docker`, and `--singularity` instead run
210
+ InterProScan on the whole alignment locally, which is much faster for large
211
+ datasets.
143
212
 
144
- | Option | Description | Default |
145
- | --------------------- | --------------------------------------------- | ------------------- |
146
- | `--gene <symbol>` | Gene symbol to look up in RefSeq (e.g. `F12`) | |
147
- | `--taxon <name\|id>` | Taxon for `--gene` | `human` |
148
- | `--gene-id <id>` | NCBI GeneID, instead of `--gene` | |
149
- | `--transcript <acc>` | Specific transcript accession | MANE/RefSeq Select |
150
- | `--ref <rowname>` | Reference row = the transcript's CDS | first row |
151
- | `-o, --output <file>` | Output GFF file path | `genestructure.gff` |
213
+ #### Choosing a backend
152
214
 
153
215
  ```bash
154
- # F12 coding alignment -> 14-exon overlay (MANE Select transcript, human row)
155
- react-msaview-cli genestructure f12-cds.stock --gene F12 --ref human -o exons.gff
216
+ ## EBI web API no install, but one sequential submission per sequence
217
+ react-msaview-cli interproscan alignment.fasta -o domains.gff --email you@example.com
156
218
 
157
- # pin a specific transcript
158
- react-msaview-cli genestructure aln.fa --transcript NM_000505.4 --ref human
159
- ```
160
-
161
- ### export-svg
219
+ ## Docker no InterProScan install, whole alignment in one run
220
+ react-msaview-cli interproscan alignment.fasta -o domains.gff --docker
162
221
 
163
- Render an alignment (with an optional tree and domain overlay) straight to a
164
- standalone SVG no browser required. This is what the R package shells out to
165
- for vector export.
222
+ ## a local install
223
+ react-msaview-cli interproscan alignment.fasta -o domains.gff \
224
+ --local --interproscan-path /opt/interproscan/interproscan.sh
166
225
 
167
- ```bash
168
- react-msaview-cli export-svg --msa <file> [options]
226
+ ## Singularity/Apptainer, for HPC clusters without Docker
227
+ react-msaview-cli interproscan alignment.fasta -o domains.gff \
228
+ --singularity --singularity-image /path/to/interproscan.sif
169
229
  ```
170
230
 
171
- #### Options
172
-
173
- | Option | Description | Default |
174
- | ------------------------ | --------------------------------------- | --------------- |
175
- | `--msa <file>` | MSA file (FASTA, Stockholm, or Clustal) | _required_ |
176
- | `--tree <file>` | Newick tree file | |
177
- | `--gff <file>` | InterProScan domain GFF file | |
178
- | `-o, --output <file>` | Output SVG file path | `alignment.svg` |
179
- | `--color-scheme <name>` | Color scheme | `maeditor` |
180
- | `--width <px>` | Canvas width in pixels | `1200` |
181
- | `--height <px>` | Canvas height in pixels | `600` |
182
- | `--tree-area-width <px>` | Tree panel width in pixels | |
231
+ Docker mounts a temp directory into the `interpro/interproscan` container, runs
232
+ the scan on the whole alignment at once, and reads the JSON back out.
183
233
 
184
- ```bash
185
- react-msaview-cli export-svg --msa alignment.fasta -o alignment.svg
186
- react-msaview-cli export-svg --msa alignment.fasta --tree tree.nwk -o alignment.svg
187
- react-msaview-cli export-svg --msa alignment.fasta --gff domains.gff \
188
- --color-scheme clustalx_protein_dynamic -o alignment.svg
189
- ```
234
+ The EBI API has usage limits: sequences go one at a time, sequentially, to avoid
235
+ overwhelming the server. Past about 100 sequences, use a local or container
236
+ backend.
190
237
 
191
- ## Examples
238
+ #### InterProScan programs
192
239
 
193
- ### Using the EBI API (recommended for small datasets)
240
+ `--programs` takes any combination of `PfamA` (in the default), `CDD` (in the
241
+ default), `SMART`, `SUPERFAMILY`, `Gene3D`, `PANTHER`, `TIGRFAM`, `Hamap`,
242
+ `ProSiteProfiles`, `ProSitePatterns`, `PRINTS`, `PIRSF`, and `MobiDBLite`.
194
243
 
195
244
  ```bash
196
- # Basic usage - runs the default PfamA + CDD analysis
197
- react-msaview-cli interproscan alignment.fasta -o domains.gff --email your@email.com
198
-
199
- # Multiple programs
200
245
  react-msaview-cli interproscan alignment.fasta -o domains.gff \
201
- --programs PfamA,SMART,Gene3D \
202
- --email your@email.com
246
+ --programs PfamA,SMART,Gene3D --email you@example.com
203
247
  ```
204
248
 
205
- ### Using local InterProScan
249
+ ### genestructure
206
250
 
207
- For large datasets or frequent usage, install InterProScan locally:
251
+ Build a **gene-structure GFF** for a coding-sequence alignment from a RefSeq
252
+ transcript, overlaid the same way InterProScan domains are. The exon model is
253
+ fetched from the NCBI Datasets v2 API; each species' Nth exon is named `exon-N`,
254
+ so a given exon is the same color in every row and the exon architecture reads
255
+ straight down the alignment.
208
256
 
209
257
  ```bash
210
- # With interproscan.sh in PATH
211
- react-msaview-cli interproscan alignment.fasta -o domains.gff --local
212
-
213
- # With custom path
214
- react-msaview-cli interproscan alignment.fasta -o domains.gff \
215
- --local \
216
- --interproscan-path /opt/interproscan/interproscan.sh
217
-
218
- # With specific programs
219
- react-msaview-cli interproscan alignment.fasta -o domains.gff \
220
- --local \
221
- --programs PfamA,SMART
258
+ react-msaview-cli genestructure <input-msa> --gene <symbol> --ref <rowname> [options]
222
259
  ```
223
260
 
224
- ### Using Docker
261
+ The exon boundaries of the chosen transcript are mapped onto the reference row's
262
+ columns, then projected into every other row's own ungapped coordinates — so an
263
+ exon that picks up a frameshifting indel in one lineage gets shorter on exactly
264
+ that row while staying column-aligned with the rest. The reference row must be
265
+ the transcript's coding sequence (the CLI warns if its length doesn't match).
225
266
 
226
- No local InterProScan install needed — just Docker:
267
+ | Option | Description | Default |
268
+ | --------------------- | --------------------------------------------- | ------------------- |
269
+ | `--gene <symbol>` | Gene symbol to look up in RefSeq (e.g. `F12`) | |
270
+ | `--taxon <name\|id>` | Taxon for `--gene` | `human` |
271
+ | `--gene-id <id>` | NCBI GeneID, instead of `--gene` | |
272
+ | `--transcript <acc>` | Specific transcript accession | MANE/RefSeq Select |
273
+ | `--ref <rowname>` | Reference row = the transcript's CDS | first row |
274
+ | `-o, --output <file>` | Output GFF file path | `genestructure.gff` |
227
275
 
228
276
  ```bash
229
- react-msaview-cli interproscan alignment.fasta -o domains.gff --docker
230
- ```
231
-
232
- This mounts a temp directory into the `interpro/interproscan` container, runs
233
- the scan on the whole alignment at once, and reads the JSON back out.
277
+ ## F12 coding alignment -> 14-exon overlay (MANE Select transcript, human row)
278
+ react-msaview-cli genestructure f12-cds.stock --gene F12 --ref human -o exons.gff
234
279
 
235
- ### Using Singularity / Apptainer
280
+ ## pin a specific transcript
281
+ react-msaview-cli genestructure aln.fa --transcript NM_000505.4 --ref human
282
+ ```
236
283
 
237
- On HPC clusters where Docker is unavailable:
284
+ ## Input formats
238
285
 
239
- ```bash
240
- # Pull from Docker Hub (requires network)
241
- react-msaview-cli interproscan alignment.fasta -o domains.gff --singularity
286
+ The CLI detects the MSA format from the file:
242
287
 
243
- # Or use a pre-pulled .sif image
244
- react-msaview-cli interproscan alignment.fasta -o domains.gff \
245
- --singularity \
246
- --singularity-image /path/to/interproscan.sif
247
- ```
248
-
249
- ### Different input formats
288
+ - **FASTA** (`.fasta`, `.fa`, `.faa`)
289
+ - **Clustal** (`.clustal`, `.aln`)
290
+ - **Stockholm** (`.sto`, `.stockholm`)
291
+ - **A3M** (`.a3m`) — AlphaFold/ColabFold
292
+ - **EMF** (`.emf`) — Ensembl Multi Format
250
293
 
251
- ```bash
252
- # Clustal format
253
- react-msaview-cli interproscan alignment.clustal -o domains.gff
294
+ ## Annotation output format
254
295
 
255
- # Stockholm format
256
- react-msaview-cli interproscan PF00001.stockholm -o domains.gff
296
+ The annotation commands write standard GFF3, one `protein_match` line per hit.
297
+ `start`/`end` are 1-based positions in the **ungapped** sequence (gaps are
298
+ stripped before scanning), and the attributes carry the signature accession,
299
+ name, and description:
257
300
 
258
- # A3M format (from ColabFold/AlphaFold)
259
- react-msaview-cli interproscan colabfold.a3m -o domains.gff
301
+ ```gff
302
+ ##gff-version 3
303
+ seq1 InterProScan protein_match 10 150 . . . Name=PF00001;signature_desc=7tm_1;description=7 transmembrane receptor (rhodopsin family)
304
+ seq1 InterProScan protein_match 200 350 . . . Name=PF00002;signature_desc=7tm_2;description=7 transmembrane receptor (Secretin family)
305
+ seq2 InterProScan protein_match 5 120 . . . Name=PF00001;signature_desc=7tm_1;description=7 transmembrane receptor (rhodopsin family)
260
306
  ```
261
307
 
262
- ## Worked example
308
+ A worked run:
263
309
 
264
310
  ```console
265
311
  $ react-msaview-cli interproscan gpcrs.fasta -o domains.gff --docker
@@ -274,85 +320,54 @@ Writing output to domains.gff...
274
320
  Done!
275
321
  ```
276
322
 
277
- ## Output format
323
+ ## Using the GFF elsewhere
278
324
 
279
- The output is standard GFF3, with one `protein_match` line per domain hit.
280
- `start`/`end` are 1-based positions in the **ungapped** sequence (gaps are
281
- stripped before scanning), and the attributes carry the signature accession,
282
- name, and description:
283
-
284
- ```gff
285
- ##gff-version 3
286
- seq1 InterProScan protein_match 10 150 . . . Name=PF00001;signature_desc=7tm_1;description=7 transmembrane receptor (rhodopsin family)
287
- seq1 InterProScan protein_match 200 350 . . . Name=PF00002;signature_desc=7tm_2;description=7 transmembrane receptor (Secretin family)
288
- seq2 InterProScan protein_match 5 120 . . . Name=PF00001;signature_desc=7tm_1;description=7 transmembrane receptor (rhodopsin family)
289
- ```
290
-
291
- ## Loading results in react-msaview
292
-
293
- After generating the GFF file, you can load it in react-msaview:
325
+ The same file the CLI writes loads into every other front end.
294
326
 
295
- - Open your MSA file in react-msaview
296
- - Select the generated GFF file in the import form's **Annotation GFF file or
297
- URL** field
298
- - Domains appear as colored boxes on the alignment
327
+ In the web viewer, select it in the import form's **Annotation GFF file or URL**
328
+ field. (The **Annotations > Open InterProScan results...** menu item takes
329
+ InterProScan JSON rather than GFF, so use the import form for the file generated
330
+ above.)
299
331
 
300
- The **Annotations > Open InterProScan results...** menu item takes InterProScan
301
- JSON rather than GFF, so use the import form for the file generated above.
302
-
303
- In the React component, pass it inline as the `gff` prop (see the "Protein
304
- domains" example in `packages/examples`):
332
+ In the React component, pass it inline as the `gff` prop:
305
333
 
306
334
  ```jsx
307
335
  <MSAViewer msa={msaText} gff={domainsGff} />
308
336
  ```
309
337
 
310
- From R, pass the file (or string) as the `gff` argument:
338
+ From R:
311
339
 
312
340
  ```r
313
341
  msaview(msa = "alignment.fasta", gff = "domains.gff")
314
342
  ```
315
343
 
316
- The domains render as labeled boxes over the matching rows:
317
-
318
- ![InterProScan domains rendered over an alignment](../../docs/media/example-domains.svg)
319
-
320
344
  ## Troubleshooting
321
345
 
322
- ### EBI API timeout
323
-
324
- If you get timeout errors with the EBI API:
325
-
326
- - Use `--local`, `--docker`, or `--singularity` to run InterProScan yourself
327
- - Check your internet connection
328
- - For large datasets, a local/container backend is much faster than the API
346
+ **EBI API timeout.** Use `--local`, `--docker`, or `--singularity` to run
347
+ InterProScan yourself. For large datasets those are much faster than the API
348
+ regardless.
329
349
 
330
- ### Local InterProScan not found
350
+ **Local InterProScan not found.**
331
351
 
332
352
  ```
333
353
  Error: Failed to run Local: spawn interproscan.sh ENOENT. Is interproscan.sh installed and on PATH?
334
354
  ```
335
355
 
336
- Make sure InterProScan is installed and specify the full path:
356
+ Give the full path:
357
+ `--interproscan-path /full/path/to/interproscan-5.xx/interproscan.sh`
337
358
 
338
- ```bash
339
- --interproscan-path /full/path/to/interproscan-5.xx/interproscan.sh
340
- ```
341
-
342
- ### No results in output
359
+ **No results in the output.** Check that the sequences are protein, not
360
+ nucleotide; try other `--programs`; verify the input parses as one of the
361
+ formats above.
343
362
 
344
- - Check that your sequences are protein sequences (not nucleotide)
345
- - Try different programs (some may not have hits for your sequences)
346
- - Verify the input file is valid MSA format
363
+ **The exported figure is enormous.** `export-svg` draws the whole alignment at
364
+ `--col-width` per column. Drop `--col-width` until it fits below ~8px the
365
+ residue letters stop drawing, which is most of the file size.
347
366
 
348
- ## API rate limits
367
+ ## Uses
349
368
 
350
- The EBI InterProScan API has usage limits:
351
-
352
- - Sequences are submitted one at a time, sequentially, to avoid overwhelming the
353
- server
354
- - For large datasets (>100 sequences), use `--local`, `--docker`, or
355
- `--singularity` instead
369
+ [msa-parsers](https://github.com/GMOD/JBrowseMSA/tree/main/packages/msa-parsers)
370
+ for file format support, and [react-msaview](../lib) for rendering.
356
371
 
357
372
  ## License
358
373
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-msaview-cli",
3
- "version": "6.1.0",
3
+ "version": "6.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -28,8 +28,8 @@
28
28
  "mobx-react": "^10.0.0",
29
29
  "react": "^19.2.8",
30
30
  "react-dom": "^19.2.8",
31
- "msa-parsers": "6.1.0",
32
- "react-msaview": "6.1.0"
31
+ "msa-parsers": "6.2.0",
32
+ "react-msaview": "6.2.0"
33
33
  },
34
34
  "scripts": {
35
35
  "clean": "node --eval \"fs.rmSync('dist',{recursive:true,force:true})\" --input-type=module",