@jbrowse/cli 5.0.0-beta.8 → 5.0.0-beta.9

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 CHANGED
@@ -13,7 +13,7 @@ or by using a script file.
13
13
 
14
14
  A simple script that does not use @jbrowse/cli at all may just look like this
15
15
 
16
- ```
16
+ ```js
17
17
  const config = JSON.parse(fs.readFileSync('config.json', 'utf8'))
18
18
  // do something with config.tracks, config.assemblies, etc.
19
19
  fs.writeFileSync('config.json', JSON.stringify(config, null, 2))
@@ -43,7 +43,7 @@ npx @jbrowse/cli create myfolder
43
43
  It is likely preferable in most cases to install the tools globally with
44
44
  `npm install @jbrowse/cli -g` however
45
45
 
46
- ```
46
+ ```text
47
47
 
48
48
  JBrowse CLI
49
49
 
@@ -78,7 +78,7 @@ Use "jbrowse <command> --help" for more information about a command.
78
78
 
79
79
  ## jbrowse create
80
80
 
81
- ```
81
+ ```text
82
82
  Downloads and installs the latest JBrowse 2 release
83
83
 
84
84
  Usage: jbrowse create [localPath] [options]
@@ -123,7 +123,7 @@ $ jbrowse create --listVersions
123
123
 
124
124
  ## jbrowse add-assembly
125
125
 
126
- ```
126
+ ```text
127
127
  Add an assembly to a JBrowse 2 configuration
128
128
 
129
129
  Usage: jbrowse add-assembly <sequence> [options]
@@ -242,7 +242,7 @@ $ jbrowse add-assembly GRCh38.fa --load copy --config '{"sequence":{"formatAbout
242
242
 
243
243
  ## jbrowse add-track
244
244
 
245
- ```
245
+ ```text
246
246
  Add a track to a JBrowse 2 configuration
247
247
 
248
248
  Usage: jbrowse add-track <track> [options]
@@ -354,8 +354,7 @@ VcfTabixAdapter and SplitVcfTabixAdapter.
354
354
  For pairwise synteny adapters (PAF/Delta/Chain) --assemblyNames is query,target
355
355
  — the reverse of the minimap2/nucmer input order. For the multi-genome PAF
356
356
  adapters (MultiGenomePAFAdapter, MultiGenomeIndexedPAFAdapter) it is instead the
357
- full list of assemblies the file covers, in any order, since one multi-genome
358
- file backs every pair.
357
+ full list of assemblies the file covers, in any order.
359
358
 
360
359
  Examples:
361
360
 
@@ -393,7 +392,7 @@ $ jbrowse add-track https://mywebsite.com/genes.gff3.gz --density https://mywebs
393
392
 
394
393
  ## jbrowse validate
395
394
 
396
- ```
395
+ ```text
397
396
  Check a JBrowse configuration for errors, including the ones JBrowse itself
398
397
  accepts silently
399
398
 
@@ -414,16 +413,25 @@ nothing. That is what this command is mainly for.
414
413
 
415
414
  Two levels are reported:
416
415
 
417
- error JBrowse accepts it and silently does the wrong thing — an unknown
418
- slot, a key a defaultSession view or display does not declare, a
419
- track naming an assembly the config never defines, a defaultSession
420
- naming a trackId that does not exist, a duplicate trackId. Exits 1.
416
+ error JBrowse silently does the wrong thing, or refuses to load it — an
417
+ unknown slot, a key a defaultSession view or display does not
418
+ declare, a track naming an assembly the config never defines, a
419
+ defaultSession naming a trackId that does not exist, a duplicate
420
+ trackId. Exits 1.
421
421
 
422
422
  warning JBrowse will complain by itself on load, or handles it — a type name
423
423
  the core plugins do not register (expected if one of your plugins
424
424
  registers it), or a legacy key a migration rewrites, such as a view
425
425
  nesting its settings under "init". Never fails the run.
426
426
 
427
+ A LinearMarkDisplay loads whenever its keys and value types are right and says
428
+ what it cannot draw in a corner notice rather than refusing the track. This
429
+ command runs the display's own rule list over every "marks" list in the file: an
430
+ error where a mark draws nothing, never draws or a step cannot run, and a
431
+ warning where a slot waits unread or the marks draw in an arrangement the author
432
+ may not have meant. With --json each finding carries the stable "rule" id of the
433
+ rule that made it.
434
+
427
435
  Types registered by plugins are not known to this command, so they come through
428
436
  as warnings rather than errors.
429
437
 
@@ -450,7 +458,7 @@ $ jbrowse validate config.json --json
450
458
 
451
459
  ## jbrowse text-index
452
460
 
453
- ```
461
+ ```text
454
462
  Make a text-indexing file for any given track(s).
455
463
 
456
464
  Usage: jbrowse text-index [options]
@@ -560,7 +568,7 @@ $ jbrowse text-index --file myfile.gff3.gz --file myfile.vcfgz --out indexes
560
568
 
561
569
  ## jbrowse admin-server
562
570
 
563
- ```
571
+ ```text
564
572
  Start up a small admin server for JBrowse configuration
565
573
 
566
574
  Usage: jbrowse admin-server [options]
@@ -607,7 +615,7 @@ $ jbrowse admin-server --host 0.0.0.0
607
615
 
608
616
  ## jbrowse upgrade
609
617
 
610
- ```
618
+ ```text
611
619
  Upgrades JBrowse 2 to latest version
612
620
 
613
621
  Usage: jbrowse upgrade [localPath] [options]
@@ -655,7 +663,7 @@ $ jbrowse upgrade --nightly
655
663
 
656
664
  ## jbrowse make-pif
657
665
 
658
- ```
666
+ ```text
659
667
  creates pairwise indexed PAF (PIF), with bgzip and tabix
660
668
 
661
669
  Usage: jbrowse make-pif <file> [options]
@@ -716,7 +724,7 @@ $ jbrowse make-pif input.paf --threads 8
716
724
 
717
725
  ## jbrowse make-density
718
726
 
719
- ```
727
+ ```text
720
728
  Counts feature starts per bin into a bigWig, the density sidecar a track draws
721
729
  where the region is too large to fetch its features
722
730
 
@@ -772,7 +780,7 @@ $ jbrowse make-density genes.gff3.gz --assembly hg38.fa --bin 10000 --out genes.
772
780
 
773
781
  ## jbrowse sort-gff
774
782
 
775
- ```
783
+ ```text
776
784
  Sort a GFF or GTF for tabix — the two share a refname/start column layout. It is
777
785
  `sort -k1,1 -k4,4n` with LC_ALL=C and a tab separator, plus every line starting
778
786
  with # kept at the top rather than sorted into the data. Takes a file, or the
@@ -800,7 +808,7 @@ $ tabix -p gff sorted.gtf.gz
800
808
 
801
809
  ## jbrowse sort-bed
802
810
 
803
- ```
811
+ ```text
804
812
  Sort a BED file for tabix. It is `sort -k1,1 -k2,2n` with LC_ALL=C and a tab
805
813
  separator, plus every line starting with # kept at the top rather than sorted
806
814
  into the data. Takes a file, or the same data on stdin
@@ -822,7 +830,7 @@ $ tabix sorted.bed.gz
822
830
 
823
831
  ## jbrowse add-connection
824
832
 
825
- ```
833
+ ```text
826
834
  Add a connection to a JBrowse 2 configuration
827
835
 
828
836
  Usage: jbrowse add-connection <connectionUrlOrPath> [options]
@@ -878,7 +886,7 @@ $ jbrowse add-connection https://mysite.com/path/to/hub.txt --connectionId newId
878
886
 
879
887
  ## jbrowse add-track-json
880
888
 
881
- ```
889
+ ```text
882
890
  Add a track configuration directly from a JSON hunk to the JBrowse 2
883
891
  configuration
884
892
 
@@ -921,7 +929,7 @@ $ jbrowse add-track-json track.json --out /path/to/jb2/
921
929
 
922
930
  ## jbrowse remove-track
923
931
 
924
- ```
932
+ ```text
925
933
  Remove a track configuration from a JBrowse 2 configuration. Be aware that this
926
934
  can cause crashes in saved sessions that refer to this track!
927
935
 
@@ -950,7 +958,7 @@ $ jbrowse remove-track my_track_id --target /path/to/jb2/config.json
950
958
 
951
959
  ## jbrowse set-default-session
952
960
 
953
- ```
961
+ ```text
954
962
  Set a default session with views and tracks
955
963
 
956
964
  Usage: jbrowse set-default-session [options]
@@ -29,10 +29,8 @@ export function buildTrackConfig({ trackType, trackId, name, assemblyNames, cate
29
29
  // nothing was supplied, so the track omits displayDefaults entirely.
30
30
  //
31
31
  // Takes `trackType` so it can refuse a key none of that track's displays
32
- // declares. `--color` on an alignments track is the reachable case — that
33
- // display declares `colorBy`, expandTrackConfigShorthand drops the unmatched
34
- // key with a console warning, and the command otherwise wrote the dead setting
35
- // and exited 0.
32
+ // declares: expandTrackConfigShorthand drops an unmatched key with a console
33
+ // warning, and the command otherwise wrote the dead setting and exited 0.
36
34
  export function mergeDisplayDefaults({ configObj, color, height, displayDefaults, trackType, }) {
37
35
  const fromJson = displayDefaults
38
36
  ? parseJsonFlag(displayDefaults, '--displayDefaults')
@@ -148,8 +148,7 @@ export async function run(args) {
148
148
  'For pairwise synteny adapters (PAF/Delta/Chain) --assemblyNames is ' +
149
149
  'query,target — the reverse of the minimap2/nucmer input order. For the ' +
150
150
  'multi-genome PAF adapters (MultiGenomePAFAdapter, MultiGenomeIndexedPAFAdapter) it is ' +
151
- 'instead the full list of assemblies the file covers, in any order, since ' +
152
- 'one multi-genome file backs every pair.';
151
+ 'instead the full list of assemblies the file covers, in any order.';
153
152
  const examples = [
154
153
  '# copy /path/to/my.bam and /path/to/my.bam.bai to current directory and adds track to config.json',
155
154
  '$ jbrowse add-track /path/to/my.bam --load copy',
@@ -140,7 +140,7 @@ export async function run(args) {
140
140
  'the fine tier and doubles the file for nothing. Rebuild with --no-coarse, ' +
141
141
  'or align with a CIGAR (minimap2 -c) so low zooms have something cheaper to read.');
142
142
  }
143
- // An all-vs-all PAF that does not state every pair indexes perfectly well and
143
+ // A multi-genome PAF that does not state every pair indexes perfectly well and
144
144
  // then draws an empty synteny band for each pair the aligner never emitted,
145
145
  // which reads as "no homology here" rather than as "never computed". This is
146
146
  // the moment someone is looking at the file, and the census it needs was
@@ -163,7 +163,7 @@ export async function run(args) {
163
163
  `(MAF) rather than a stack of pairwise bands.`);
164
164
  }
165
165
  const nextCommand = samples.size > 0
166
- ? 'Next, add it as an all-vs-all synteny track (PanSN names detected):\n' +
166
+ ? 'Next, add it as a multi-genome synteny track (PanSN names detected):\n' +
167
167
  ` jbrowse add-track ${outputFile} --adapterType MultiGenomeIndexedPAFAdapter -a ${[...samples].sort().join(',')} --load copy`
168
168
  : 'Next, add it as a synteny track (set -a to your query,target assembly names):\n' +
169
169
  ` jbrowse add-track ${outputFile} -a query,target --load copy`;