react-msaview-cli 6.1.1 → 6.2.1
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/README.md +225 -210
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,79 +1,144 @@
|
|
|
1
1
|
# react-msaview-cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
for
|
|
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
|
-
|
|
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
|
-
|
|
18
|
-
|
|
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
|
-
|
|
50
|
+

|
|
22
51
|
|
|
23
|
-
|
|
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
|
-
|
|
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
|
|
63
|
+
react-msaview-cli export-svg --msa <file> [options]
|
|
29
64
|
```
|
|
30
65
|
|
|
31
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
91
|
+

|
|
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
|
-
|
|
99
|
+

|
|
51
100
|
|
|
52
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
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
|
+

|
|
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
|
-
###
|
|
187
|
+
### interproscan
|
|
125
188
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
|
194
|
+
react-msaview-cli interproscan <input-msa> [options]
|
|
134
195
|
```
|
|
135
196
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
155
|
-
react-msaview-cli
|
|
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
|
-
|
|
158
|
-
react-msaview-cli
|
|
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
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
168
|
-
react-msaview-cli
|
|
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
|
-
|
|
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
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
238
|
+
#### InterProScan programs
|
|
192
239
|
|
|
193
|
-
|
|
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
|
-
###
|
|
249
|
+
### genestructure
|
|
206
250
|
|
|
207
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
280
|
+
## pin a specific transcript
|
|
281
|
+
react-msaview-cli genestructure aln.fa --transcript NM_000505.4 --ref human
|
|
282
|
+
```
|
|
236
283
|
|
|
237
|
-
|
|
284
|
+
## Input formats
|
|
238
285
|
|
|
239
|
-
|
|
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
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
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
|
-
|
|
252
|
-
# Clustal format
|
|
253
|
-
react-msaview-cli interproscan alignment.clustal -o domains.gff
|
|
294
|
+
## Annotation output format
|
|
254
295
|
|
|
255
|
-
|
|
256
|
-
|
|
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
|
-
|
|
259
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
323
|
+
## Using the GFF elsewhere
|
|
278
324
|
|
|
279
|
-
The
|
|
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
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-

|
|
319
|
-
|
|
320
344
|
## Troubleshooting
|
|
321
345
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
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
|
-
|
|
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
|
-
|
|
356
|
+
Give the full path:
|
|
357
|
+
`--interproscan-path /full/path/to/interproscan-5.xx/interproscan.sh`
|
|
337
358
|
|
|
338
|
-
|
|
339
|
-
|
|
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
|
-
|
|
345
|
-
-
|
|
346
|
-
|
|
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
|
-
##
|
|
367
|
+
## Uses
|
|
349
368
|
|
|
350
|
-
|
|
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.
|
|
3
|
+
"version": "6.2.1",
|
|
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.
|
|
32
|
-
"react-msaview": "6.
|
|
31
|
+
"msa-parsers": "6.2.1",
|
|
32
|
+
"react-msaview": "6.2.1"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"clean": "node --eval \"fs.rmSync('dist',{recursive:true,force:true})\" --input-type=module",
|