@jbrowse/cli 5.0.0-beta.1 → 5.0.0-beta.2
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 +98 -16
- package/bundle/index.js +82 -74
- package/dist/commands/add-track-utils/adapter-utils.js +49 -0
- package/dist/commands/add-track.js +26 -3
- package/dist/commands/make-density/density-generator.js +180 -0
- package/dist/commands/make-density/index.js +139 -0
- package/dist/commands/make-pif/index.js +54 -24
- package/dist/commands/make-pif/pif-generator.js +105 -133
- package/dist/commands/shared/density.js +12 -0
- package/dist/commands/validate/configManifest.generated.js +379 -8
- package/dist/commands/validate/index.js +5 -5
- package/dist/commands/validate/validateConfig.js +97 -32
- package/dist/index.js +5 -0
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/commands/make-pif/cigar-utils.js +0 -67
package/README.md
CHANGED
|
@@ -59,6 +59,7 @@ COMMANDS
|
|
|
59
59
|
admin-server Start up a small admin server for JBrowse configuration
|
|
60
60
|
upgrade Upgrades JBrowse 2 to latest version
|
|
61
61
|
make-pif Creates pairwise indexed PAF (PIF), with bgzip and tabix
|
|
62
|
+
make-density Counts feature starts per bin into a bigWig density sidecar, with bedGraphToBigWig
|
|
62
63
|
sort-gff Sort a GFF/GTF for tabix: sort -k1,1 -k4,4n, header kept on top
|
|
63
64
|
sort-bed Sort a BED for tabix: sort -k1,1 -k2,2n, header kept on top
|
|
64
65
|
add-connection Add a connection to a JBrowse 2 configuration
|
|
@@ -310,6 +311,11 @@ Options:
|
|
|
310
311
|
|
|
311
312
|
--bed2 Used only for mcscan anchors/simpleAnchors types
|
|
312
313
|
|
|
314
|
+
--density Path or URL of a features-per-bin bigWig (jbrowse
|
|
315
|
+
make-density) to attach as the adapter's
|
|
316
|
+
densityAdapter. A local <file>.density.bw beside
|
|
317
|
+
the track file is attached without this flag
|
|
318
|
+
|
|
313
319
|
Notes:
|
|
314
320
|
|
|
315
321
|
--load controls how the data file is placed relative to config.json: copy, move,
|
|
@@ -337,6 +343,14 @@ or a .json file with an array of BigWig locations or subadapter objects (each
|
|
|
337
343
|
carrying its own name/color/group). With --load, local list entries are copied
|
|
338
344
|
like any other track file.
|
|
339
345
|
|
|
346
|
+
--density attaches a features-per-bin bigWig (jbrowse make-density) as the
|
|
347
|
+
adapter's densityAdapter, the band a display draws where the region is too large
|
|
348
|
+
to fetch features. A local <file>.density.bw beside the track file is attached
|
|
349
|
+
without the flag; a URL cannot be probed, so a remote sidecar needs it. The
|
|
350
|
+
adapters carrying the slot are BamAdapter, CramAdapter, HtsgetBamAdapter,
|
|
351
|
+
Gff3TabixAdapter, GtfTabixAdapter, BedTabixAdapter, BigBedAdapter,
|
|
352
|
+
VcfTabixAdapter and SplitVcfTabixAdapter.
|
|
353
|
+
|
|
340
354
|
For pairwise synteny adapters (PAF/Delta/Chain) --assemblyNames is query,target
|
|
341
355
|
— the reverse of the minimap2/nucmer input order. For the all-vs-all adapters
|
|
342
356
|
(AllVsAllPAFAdapter, AllVsAllIndexedPAFAdapter) it is instead the full list of
|
|
@@ -371,6 +385,9 @@ $ jbrowse add-track --multiwig a.bw,b.bw,c.bw --load copy --name "Coverage"
|
|
|
371
385
|
|
|
372
386
|
# ...or from a sources.json carrying per-row name/color for each BigWig
|
|
373
387
|
$ jbrowse add-track --multiwig sources.json --name "CATlas ATAC"
|
|
388
|
+
|
|
389
|
+
# attach a remote density sidecar (a local genes.gff3.density.bw needs no flag)
|
|
390
|
+
$ jbrowse add-track https://mywebsite.com/genes.gff3.gz --density https://mywebsite.com/genes.gff3.density.bw
|
|
374
391
|
```
|
|
375
392
|
|
|
376
393
|
|
|
@@ -398,14 +415,14 @@ nothing. That is what this command is mainly for.
|
|
|
398
415
|
Two levels are reported:
|
|
399
416
|
|
|
400
417
|
error JBrowse accepts it and silently does the wrong thing — an unknown
|
|
401
|
-
slot, a
|
|
402
|
-
|
|
403
|
-
trackId. Exits 1.
|
|
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.
|
|
404
421
|
|
|
405
422
|
warning JBrowse will complain by itself on load, or handles it — a type name
|
|
406
423
|
the core plugins do not register (expected if one of your plugins
|
|
407
|
-
registers it), or a legacy key a migration rewrites
|
|
408
|
-
the run.
|
|
424
|
+
registers it), or a legacy key a migration rewrites, such as a view
|
|
425
|
+
nesting its settings under "init". Never fails the run.
|
|
409
426
|
|
|
410
427
|
Types registered by plugins are not known to this command, so they come through
|
|
411
428
|
as warnings rather than errors.
|
|
@@ -637,16 +654,22 @@ Options:
|
|
|
637
654
|
|
|
638
655
|
--csi Create a CSI index for the PIF file instead of TBI
|
|
639
656
|
|
|
640
|
-
--coarse
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
657
|
+
--coarse Accuracy bound (bp) of the coarse tier. A coarse
|
|
658
|
+
row replaces its CIGAR with a coarse CIGAR (cr:Z:)
|
|
659
|
+
that keeps every indel longer than half this length
|
|
660
|
+
and folds the rest into runs, each run staying
|
|
661
|
+
within this many bp of the real alignment. Defaults
|
|
662
|
+
to 10000. The coarse tier (prefix T/Q) is emitted
|
|
663
|
+
alongside the per-row CIGAR fine tier by default so
|
|
664
|
+
whole-genome synteny views can auto-switch to it;
|
|
665
|
+
pass --no-coarse to omit it.
|
|
666
|
+
|
|
667
|
+
--no-coarse Do not emit the coarse tier; write only the per-row
|
|
668
|
+
CIGAR fine tier.
|
|
647
669
|
|
|
648
|
-
--
|
|
649
|
-
|
|
670
|
+
--threads Compression threads for bgzip. Defaults to 4. Raise
|
|
671
|
+
it on a machine with cores to spare, or set 1 to
|
|
672
|
+
leave the rest of the machine alone.
|
|
650
673
|
|
|
651
674
|
Notes:
|
|
652
675
|
|
|
@@ -666,11 +689,70 @@ $ jbrowse make-pif input.paf --out output.pif.gz
|
|
|
666
689
|
# use a CSI index for assemblies with chromosomes longer than ~512 Mb
|
|
667
690
|
$ jbrowse make-pif input.paf --csi
|
|
668
691
|
|
|
669
|
-
#
|
|
670
|
-
$ jbrowse make-pif input.paf --coarse
|
|
692
|
+
# a looser coarse tier: runs within 50kb of the alignment, indels over 25kb kept
|
|
693
|
+
$ jbrowse make-pif input.paf --coarse 50000
|
|
671
694
|
|
|
672
695
|
# emit only the per-row CIGAR fine tier, skipping the coarse tier
|
|
673
696
|
$ jbrowse make-pif input.paf --no-coarse
|
|
697
|
+
|
|
698
|
+
# give bgzip more (or fewer) compression threads than the default 4
|
|
699
|
+
$ jbrowse make-pif input.paf --threads 8
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
## jbrowse make-density
|
|
704
|
+
|
|
705
|
+
```
|
|
706
|
+
Counts feature starts per bin into a bigWig, the density sidecar a track draws
|
|
707
|
+
where the region is too large to fetch its features
|
|
708
|
+
|
|
709
|
+
Usage: jbrowse make-density <file> [options]
|
|
710
|
+
|
|
711
|
+
Options:
|
|
712
|
+
-h, --help Show help
|
|
713
|
+
|
|
714
|
+
--bin Width of each bin, in bp [default: 1000]
|
|
715
|
+
|
|
716
|
+
--chrom-sizes Two-column reference name and length table for the
|
|
717
|
+
assembly the file is on
|
|
718
|
+
|
|
719
|
+
--assembly FASTA of the assembly the file is on; its .fai
|
|
720
|
+
supplies the reference lengths, in place of
|
|
721
|
+
--chrom-sizes
|
|
722
|
+
|
|
723
|
+
--out Where to write the bigWig. Defaults to
|
|
724
|
+
<file>.density.bw beside the input, which is where
|
|
725
|
+
add-track looks for it
|
|
726
|
+
|
|
727
|
+
Notes:
|
|
728
|
+
|
|
729
|
+
The sidecar is attached to a track through its adapter's densityAdapter slot,
|
|
730
|
+
which BamAdapter, CramAdapter, HtsgetBamAdapter, Gff3TabixAdapter,
|
|
731
|
+
GtfTabixAdapter, BedTabixAdapter, BigBedAdapter, VcfTabixAdapter and
|
|
732
|
+
SplitVcfTabixAdapter declare. add-track attaches it on its own when the default
|
|
733
|
+
<file>.density.bw sits beside the track file, so building it before adding the
|
|
734
|
+
track is all it takes; --density attaches one by path or URL.
|
|
735
|
+
|
|
736
|
+
GFF3 counts only top-level features — a line whose attributes carry no Parent= —
|
|
737
|
+
so a gene is one count rather than one per exon. GTF, BED and VCF have no parent
|
|
738
|
+
link to follow, so every record counts.
|
|
739
|
+
|
|
740
|
+
BAM and CRAM are out of scope: read depth is not feature density, and the tools
|
|
741
|
+
that compute it already write bigWig. Point add-track --density at what they
|
|
742
|
+
produce.
|
|
743
|
+
|
|
744
|
+
Requires bedGraphToBigWig (UCSC) on the PATH.
|
|
745
|
+
|
|
746
|
+
Examples:
|
|
747
|
+
|
|
748
|
+
# writes genes.gff3.density.bw beside the input, in 1kb bins
|
|
749
|
+
$ jbrowse make-density genes.gff3.gz --chrom-sizes hg38.chrom.sizes
|
|
750
|
+
|
|
751
|
+
# take the reference lengths from the assembly FASTA index instead
|
|
752
|
+
$ jbrowse make-density variants.vcf.gz --assembly hg38.fa
|
|
753
|
+
|
|
754
|
+
# coarser bins, and a name of your own
|
|
755
|
+
$ jbrowse make-density genes.gff3.gz --assembly hg38.fa --bin 10000 --out genes.10kb.bw
|
|
674
756
|
```
|
|
675
757
|
|
|
676
758
|
|