react-msaview-cli 5.4.1 → 5.6.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 +114 -16
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -3,7 +3,9 @@
3
3
  Command-line tools for [react-msaview](../) (JBrowseMSA), including batch
4
4
  InterProScan processing for multiple sequence alignments.
5
5
 
6
- Uses [msa-parsers](../msa-parsers/) for file format support.
6
+ Uses
7
+ [msa-parsers](https://github.com/GMOD/JBrowseMSA/tree/main/packages/msa-parsers)
8
+ for file format support.
7
9
 
8
10
  ## Installation
9
11
 
@@ -45,7 +47,7 @@ REST API one at a time. `--local`, `--docker`, and `--singularity` instead run
45
47
  InterProScan on the whole alignment locally, which is much faster for large
46
48
  datasets.
47
49
 
48
- #### Supported MSA Formats
50
+ #### Supported MSA formats
49
51
 
50
52
  The CLI automatically detects the input format:
51
53
 
@@ -55,7 +57,7 @@ The CLI automatically detects the input format:
55
57
  - **A3M** (`.a3m`) - AlphaFold/ColabFold format
56
58
  - **EMF** (`.emf`) - Ensembl Multi Format
57
59
 
58
- #### Available InterProScan Programs
60
+ #### Available InterProScan programs
59
61
 
60
62
  When using `--programs`, you can specify any combination of:
61
63
 
@@ -73,21 +75,117 @@ When using `--programs`, you can specify any combination of:
73
75
  - `PIRSF` - PIR SuperFamily
74
76
  - `MobiDBLite` - Disorder prediction
75
77
 
78
+ ### interpro
79
+
80
+ Build a domain GFF from InterPro's **precomputed** matches for UniProtKB
81
+ accessions, instead of submitting sequences to a live InterProScan job. Every
82
+ UniProtKB sequence already has InterPro matches computed and served by the EBI
83
+ InterPro API, so for inputs that are real UniProt accessions this is instant,
84
+ deterministic, and version-pinnable — no email or rate-limited job submission.
85
+ Prefer this over `interproscan` whenever your rows are UniProt accessions.
86
+
87
+ ```bash
88
+ react-msaview-cli interpro <accessions.tsv> [options]
89
+ ```
90
+
91
+ The input is one accession per line, optionally followed by a tab- or
92
+ space-separated row label; lines starting with `#` are ignored. The output GFF
93
+ is byte-for-byte compatible with the `interproscan` command.
94
+
95
+ #### Options
96
+
97
+ | Option | Description | Default |
98
+ | --------------------- | -------------------------- | ------------- |
99
+ | `-o, --output <file>` | Output GFF file path | `domains.gff` |
100
+ | `--database <name>` | InterPro member db to read | `pfam` |
101
+
102
+ ```bash
103
+ react-msaview-cli interpro accessions.tsv -o domains.gff
104
+ react-msaview-cli interpro accessions.tsv -o domains.gff --database cdd
105
+ ```
106
+
107
+ ### genestructure
108
+
109
+ Build a **gene-structure GFF** for a coding-sequence alignment from a RefSeq
110
+ transcript, overlaid in react-msaview the same way InterProScan domains are. The
111
+ exon model is fetched from the NCBI Datasets v2 API; each species' Nth exon is
112
+ named `exon-N`, so a given exon is the same color in every row and the exon
113
+ architecture reads straight down the alignment.
114
+
115
+ ```bash
116
+ react-msaview-cli genestructure <input-msa> --gene <symbol> --ref <rowname> [options]
117
+ ```
118
+
119
+ The exon boundaries of the chosen transcript are mapped onto the reference row's
120
+ columns, then projected into every other row's own ungapped coordinates — so an
121
+ exon that picks up a frameshifting indel in one lineage gets shorter on exactly
122
+ that row while staying column-aligned with the rest. The reference row must be
123
+ the transcript's coding sequence (the CLI warns if its length doesn't match).
124
+
125
+ #### Options
126
+
127
+ | Option | Description | Default |
128
+ | --------------------- | --------------------------------------------- | ------------------- |
129
+ | `--gene <symbol>` | Gene symbol to look up in RefSeq (e.g. `F12`) | |
130
+ | `--taxon <name\|id>` | Taxon for `--gene` | `human` |
131
+ | `--gene-id <id>` | NCBI GeneID, instead of `--gene` | |
132
+ | `--transcript <acc>` | Specific transcript accession | MANE/RefSeq Select |
133
+ | `--ref <rowname>` | Reference row = the transcript's CDS | first row |
134
+ | `-o, --output <file>` | Output GFF file path | `genestructure.gff` |
135
+
136
+ ```bash
137
+ # F12 coding alignment -> 14-exon overlay (MANE Select transcript, human row)
138
+ react-msaview-cli genestructure f12-cds.stock --gene F12 --ref human -o exons.gff
139
+
140
+ # pin a specific transcript
141
+ react-msaview-cli genestructure aln.fa --transcript NM_000505.4 --ref human
142
+ ```
143
+
144
+ ### export-svg
145
+
146
+ Render an alignment (with an optional tree and domain overlay) straight to a
147
+ standalone SVG — no browser required. This is what the R package shells out to
148
+ for vector export.
149
+
150
+ ```bash
151
+ react-msaview-cli export-svg --msa <file> [options]
152
+ ```
153
+
154
+ #### Options
155
+
156
+ | Option | Description | Default |
157
+ | ------------------------ | --------------------------------------- | --------------- |
158
+ | `--msa <file>` | MSA file (FASTA, Stockholm, or Clustal) | _required_ |
159
+ | `--tree <file>` | Newick tree file | |
160
+ | `--gff <file>` | InterProScan domain GFF file | |
161
+ | `-o, --output <file>` | Output SVG file path | `alignment.svg` |
162
+ | `--color-scheme <name>` | Color scheme | `maeditor` |
163
+ | `--width <px>` | Canvas width in pixels | `1200` |
164
+ | `--height <px>` | Canvas height in pixels | `600` |
165
+ | `--tree-area-width <px>` | Tree panel width in pixels | |
166
+
167
+ ```bash
168
+ react-msaview-cli export-svg --msa alignment.fasta -o alignment.svg
169
+ react-msaview-cli export-svg --msa alignment.fasta --tree tree.nwk -o alignment.svg
170
+ react-msaview-cli export-svg --msa alignment.fasta --gff domains.gff \
171
+ --color-scheme clustalx_protein_dynamic -o alignment.svg
172
+ ```
173
+
76
174
  ## Examples
77
175
 
78
- ### Using EBI API (recommended for small datasets)
176
+ ### Using the EBI API (recommended for small datasets)
79
177
 
80
178
  ```bash
81
- # Basic usage - runs Pfam analysis
179
+ # Basic usage - runs the default PfamA + CDD analysis
82
180
  react-msaview-cli interproscan alignment.fasta -o domains.gff --email your@email.com
83
181
 
84
182
  # Multiple programs
85
183
  react-msaview-cli interproscan alignment.fasta -o domains.gff \
86
- --programs Pfam,SMART,Gene3D \
184
+ --programs PfamA,SMART,Gene3D \
87
185
  --email your@email.com
88
186
  ```
89
187
 
90
- ### Using Local InterProScan
188
+ ### Using local InterProScan
91
189
 
92
190
  For large datasets or frequent usage, install InterProScan locally:
93
191
 
@@ -103,7 +201,7 @@ react-msaview-cli interproscan alignment.fasta -o domains.gff \
103
201
  # With specific programs
104
202
  react-msaview-cli interproscan alignment.fasta -o domains.gff \
105
203
  --local \
106
- --programs Pfam,SMART
204
+ --programs PfamA,SMART
107
205
  ```
108
206
 
109
207
  ### Using Docker
@@ -131,7 +229,7 @@ react-msaview-cli interproscan alignment.fasta -o domains.gff \
131
229
  --singularity-image /path/to/interproscan.sif
132
230
  ```
133
231
 
134
- ### Different Input Formats
232
+ ### Different input formats
135
233
 
136
234
  ```bash
137
235
  # Clustal format
@@ -159,7 +257,7 @@ Writing output to domains.gff...
159
257
  Done!
160
258
  ```
161
259
 
162
- ## Output Format
260
+ ## Output format
163
261
 
164
262
  The output is standard GFF3, with one `protein_match` line per domain hit.
165
263
  `start`/`end` are 1-based positions in the **ungapped** sequence (gaps are
@@ -173,7 +271,7 @@ seq1 InterProScan protein_match 200 350 . . . Name=PF00002;signature_desc=7tm_2;
173
271
  seq2 InterProScan protein_match 5 120 . . . Name=PF00001;signature_desc=7tm_1;description=7 transmembrane receptor (rhodopsin family)
174
272
  ```
175
273
 
176
- ## Loading Results in react-msaview
274
+ ## Loading results in react-msaview
177
275
 
178
276
  After generating the GFF file, you can load it in react-msaview:
179
277
 
@@ -194,13 +292,13 @@ From R, pass the file (or string) as the `gff` argument:
194
292
  msaview(msa = "alignment.fasta", gff = "domains.gff")
195
293
  ```
196
294
 
197
- The domains render as labelled boxes over the matching rows:
295
+ The domains render as labeled boxes over the matching rows:
198
296
 
199
297
  ![InterProScan domains rendered over an alignment](../../docs/media/example-domains.svg)
200
298
 
201
299
  ## Troubleshooting
202
300
 
203
- ### EBI API Timeout
301
+ ### EBI API timeout
204
302
 
205
303
  If you get timeout errors with the EBI API:
206
304
 
@@ -208,7 +306,7 @@ If you get timeout errors with the EBI API:
208
306
  - Check your internet connection
209
307
  - For large datasets, a local/container backend is much faster than the API
210
308
 
211
- ### Local InterProScan Not Found
309
+ ### Local InterProScan not found
212
310
 
213
311
  ```
214
312
  Error: Failed to run Local: spawn interproscan.sh ENOENT. Is interproscan.sh installed and on PATH?
@@ -220,13 +318,13 @@ Make sure InterProScan is installed and specify the full path:
220
318
  --interproscan-path /full/path/to/interproscan-5.xx/interproscan.sh
221
319
  ```
222
320
 
223
- ### No Results in Output
321
+ ### No results in output
224
322
 
225
323
  - Check that your sequences are protein sequences (not nucleotide)
226
324
  - Try different programs (some may not have hits for your sequences)
227
325
  - Verify the input file is valid MSA format
228
326
 
229
- ## API Rate Limits
327
+ ## API rate limits
230
328
 
231
329
  The EBI InterProScan API has usage limits:
232
330
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-msaview-cli",
3
- "version": "5.4.1",
3
+ "version": "5.6.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -15,21 +15,21 @@
15
15
  "dist"
16
16
  ],
17
17
  "devDependencies": {
18
- "@types/jsdom": "^21.1.7",
19
- "@types/node": "^25.9.4"
18
+ "@types/jsdom": "^28.0.3",
19
+ "@types/node": "^26.1.1"
20
20
  },
21
21
  "dependencies": {
22
22
  "@emotion/react": "^11.14.0",
23
23
  "@emotion/styled": "^11.14.1",
24
- "@jbrowse/core": "^4.3.0",
25
- "@mui/material": "^7.3.11",
26
- "jsdom": "^26.1.0",
24
+ "@jbrowse/core": "file:../../vendor-jbrowse/jbrowse-core.tgz",
25
+ "@mui/material": "^9.2.0",
26
+ "jsdom": "^29.1.1",
27
27
  "mobx": "^6.16.1",
28
28
  "mobx-react": "^9.2.2",
29
29
  "react": "^19.2.7",
30
30
  "react-dom": "^19.2.7",
31
- "msa-parsers": "5.4.1",
32
- "react-msaview": "5.4.1"
31
+ "msa-parsers": "5.6.0",
32
+ "react-msaview": "5.6.0"
33
33
  },
34
34
  "scripts": {
35
35
  "clean": "node --eval \"fs.rmSync('dist',{recursive:true,force:true})\" --input-type=module",