---
title: Command line tools
id: cli
toplevel: true
---
This document covers the CLI tools. Note: for @jbrowse/img static export tool,
see https://www.npmjs.com/package/@jbrowse/img
Note: the @jbrowse/cli may not do all types of operations, some use cases may
best be handled by creating your own tools to manipulate a config.json by hand
or by using a script file.
A simple script that does not use @jbrowse/cli at all may just look like this
```
const config = JSON.parse(fs.readFileSync('config.json', 'utf8'))
// do something with config.tracks, config.assemblies, etc.
fs.writeFileSync('config.json', JSON.stringify(config, null, 2))
```
## Installation
The command line tools can be installed globally using `npm` as follows
```sh-session
$ npm install -g @jbrowse/cli
```
A CLI tool called `jbrowse` should then be available in the path. You can test
your installation with
```sh-session
$ jbrowse --version
```
It is also possible to do one-off executions using npx, e.g.
```sh-session
npx @jbrowse/cli create myfolder
```
It is likely preferable in most cases to install the tools globally with
`npm install @jbrowse/cli -g` however
## Commands
<!-- commands -->
- [`jbrowse add-assembly SEQUENCE`](#jbrowse-add-assembly-sequence)
- [`jbrowse add-connection CONNECTIONURLORPATH`](#jbrowse-add-connection-connectionurlorpath)
- [`jbrowse add-track TRACK`](#jbrowse-add-track-track)
- [`jbrowse add-track-json TRACK`](#jbrowse-add-track-json-track)
- [`jbrowse admin-server`](#jbrowse-admin-server)
- [`jbrowse create LOCALPATH`](#jbrowse-create-localpath)
- [`jbrowse help [COMMAND]`](#jbrowse-help-command)
- [`jbrowse remove-track TRACK`](#jbrowse-remove-track-track)
- [`jbrowse set-default-session`](#jbrowse-set-default-session)
- [`jbrowse text-index`](#jbrowse-text-index)
- [`jbrowse upgrade [LOCALPATH]`](#jbrowse-upgrade-localpath)
## `jbrowse add-assembly SEQUENCE`
Add an assembly to a JBrowse 2 configuration
```
USAGE
$ jbrowse add-assembly SEQUENCE
ARGUMENTS
SEQUENCE
sequence file or URL
If TYPE is indexedFasta or bgzipFasta, the index file defaults to <location>.fai
and can be optionally specified with --faiLocation
If TYPE is bgzipFasta, the gzip index file defaults to <location>.gzi and can be
optionally specified with --gziLocation
OPTIONS
-a, --alias=alias
An alias for the assembly name (e.g. "hg38" if the name of the assembly is "GRCh38");
can be specified multiple times
-f, --force
Equivalent to `--skipCheck --overwrite`
-h, --help
show CLI help
-l, --load=copy|symlink|move|inPlace
Required flag when using a local file. Choose how to manage the data directory. Copy, symlink, or move the data
directory to the JBrowse directory. Or use inPlace to modify the config without doing any file operations
-n, --name=name
Name of the assembly; if not specified, will be guessed using the sequence file name
-t, --type=indexedFasta|bgzipFasta|twoBit|chromSizes|custom
type of sequence, by default inferred from sequence file
indexedFasta An index FASTA (e.g. .fa or .fasta) file;
can optionally specify --faiLocation
bgzipFasta A block-gzipped and indexed FASTA (e.g. .fa.gz or .fasta.gz) file;
can optionally specify --faiLocation and/or --gziLocation
twoBit A twoBit (e.g. .2bit) file
chromSizes A chromosome sizes (e.g. .chrom.sizes) file
custom Either a JSON file location or inline JSON that defines a custom
sequence adapter; must provide --name if using inline JSON
--displayName=displayName
The display name to specify for the assembly, e.g. "Homo sapiens (hg38)" while the name can be a shorter identifier
like "hg38"
--faiLocation=faiLocation
[default: <fastaLocation>.fai] FASTA index file or URL
--gziLocation=gziLocation
[default: <fastaLocation>.gzi] FASTA gzip index file or URL
--out=out
synonym for target
--overwrite
Overwrite existing assembly if one with the same name exists
--refNameAliases=refNameAliases
Reference sequence name aliases file or URL; assumed to be a tab-separated aliases
file unless --refNameAliasesType is specified
--refNameAliasesType=aliases|custom
Type of aliases defined by --refNameAliases; if "custom", --refNameAliases is either
a JSON file location or inline JSON that defines a custom sequence adapter
--refNameColors=refNameColors
A comma-separated list of color strings for the reference sequence names; will cycle
through colors if there are fewer colors than sequences
--skipCheck
Don't check whether or not the sequence file or URL exists or if you are in a JBrowse directory
--target=target
path to config file in JB2 installation directory to write out to.
Creates ./config.json if nonexistent
EXAMPLES
# add assembly to installation in current directory. assumes .fai file also exists, and copies GRCh38.fa and
GRCh38.fa.fai to current directory
$ jbrowse add-assembly GRCh38.fa --load copy
# add assembly to a specific jb2 installation path using --out, and copies the .fa and .fa.fai file to /path/to/jb2
$ jbrowse add-assembly GRCh38.fa --out /path/to/jb2/ --load copy
# force indexedFasta for add-assembly without relying on file extension
$ jbrowse add-assembly GRCh38.xyz --type indexedFasta --load copy
# add displayName for an assembly
$ jbrowse add-assembly myFile.fa.gz --name hg38 --displayName "Homo sapiens (hg38)"
# use chrom.sizes file for assembly instead of a fasta file
$ jbrowse add-assembly GRCh38.chrom.sizes --load inPlace
# add assembly from preconfigured json file, expert option
$ jbrowse add-assembly GRCh38.config.json --load copy
# add assembly from a 2bit file, also note pointing direct to a URL so no --load flag needed
$ jbrowse add-assembly https://example.com/data/sample.2bit
# add a bgzip indexed fasta inferred by fa.gz extension. assumes .fa.gz.gzi and .fa.gz.fai files also exists
$ jbrowse add-assembly myfile.fa.gz --load copy
```
_See code:
[src/commands/add-assembly.ts](https://github.com/GMOD/jbrowse-components/blob/v2.4.2/products/jbrowse-cli/src/commands/add-assembly.ts)_
## `jbrowse add-connection CONNECTIONURLORPATH`
Add a connection to a JBrowse 2 configuration
```
USAGE
$ jbrowse add-connection CONNECTIONURLORPATH
ARGUMENTS
CONNECTIONURLORPATH URL of data directory
For hub file, usually called hub.txt
For JBrowse 1, location of JB1 data directory similar to http://mysite.com/jbrowse/data/
OPTIONS
-a, --assemblyName=assemblyName Assembly name of the connection If none, will default to the assembly in your config
file
-c, --config=config Any extra config settings to add to connection in JSON object format, such as
'{"uri":"url":"https://sample.com"}, "locationType": "UriLocation"}'
-f, --force Equivalent to `--skipCheck --overwrite`
-h, --help show CLI help
-n, --name=name Name of the connection. Defaults to connectionId if not provided
-t, --type=type type of connection, ex. JBrowse1Connection, UCSCTrackHubConnection, custom
--connectionId=connectionId Id for the connection that must be unique to JBrowse. Defaults to
'connectionType-assemblyName-currentTime'
--out=out synonym for target
--overwrite Overwrites any existing connections if same connection id
--skipCheck Don't check whether or not the data directory URL exists or if you are in a JBrowse
directory
--target=target path to config file in JB2 installation directory to write out to.
EXAMPLES
$ jbrows
没有合适的资源?快使用搜索试试~ 我知道了~
JBrowse2的Monorepo包含JB2产品(网络、桌面、嵌入式),以及核心包和插件.zip
共2000个文件
ts:773个
tsx:446个
json:361个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 101 浏览量
2023-04-21
10:37:04
上传
评论
收藏 35.55MB ZIP 举报
温馨提示
JBrowse2的Monorepo包含JB2产品(网络、桌面、嵌入式),以及核心包和插件。要自定义行为,最好编写一个内部插件和或
资源推荐
资源详情
资源评论
收起资源包目录
JBrowse2的Monorepo包含JB2产品(网络、桌面、嵌入式),以及核心包和插件.zip (2000个子文件)
volvox.2bit 14KB
volvox.2bit 14KB
volvox.2bit 14KB
volvox.2bit 14KB
volvox.2bit 14KB
simple.2bit 167B
volvox.2bit 40B
simple.aliases 34B
grape.peach.anchors 550KB
volvox_inv_indels.anchors 0B
pacbio_chr3_chr6.bam.bai 117KB
extended_cigar.bam.bai 784B
volvox-simple-inv.bam.bai 552B
paired_rnaseq.bam.bai 256B
volvox-sorted.bam.bai 248B
volvox-sv.bam.bai 240B
volvox-sorted.bam.bai 224B
volvox-sorted-altname.bam.bai 224B
spliced.bam.bai 200B
volvox-long-reads-sv.bam.bai 144B
volvox-long-reads.fastq.sorted.bam.bai 128B
volvox-long-reads.fastq.sorted.bam.bai 128B
volvox-rnasim.bam.bai 128B
volvox-simple-inv-paired.bam.bai 128B
bwa-meth.sorted.subselect.downsample.bam.bai 120B
volvox-rg.bam.bai 104B
MM-multi-volvox.bam.bai 96B
volvox-samspec.bam.bai 96B
MM-double-volvox.bam.bai 96B
MM-orient-volvox.bam.bai 96B
MM-chebi-volvox.bam.bai 96B
tiny.bam.bai 96B
volvox-sorted.bam.bai 50B
volvox-rg.bam.bai 46B
simple.bai 0B
simple.bam.bai 0B
volvox-simple-inv.bam 1.48MB
volvox-sorted.bam 386KB
volvox-sorted-altname.bam 386KB
volvox-sorted.bam 386KB
volvox-simple-inv-paired.bam 167KB
pacbio_chr3_chr6.bam 152KB
spliced.bam 136KB
volvox-sv.bam 130KB
bwa-meth.sorted.subselect.downsample.bam 107KB
extended_cigar.bam 50KB
volvox-long-reads-sv.bam 41KB
volvox-long-reads.fastq.sorted.bam 36KB
volvox-long-reads.fastq.sorted.bam 36KB
paired_rnaseq.bam 30KB
volvox-rg.bam 15KB
volvox-rnasim.bam 10KB
tiny.bam 915B
MM-double-volvox.bam 425B
volvox-samspec.bam 380B
MM-orient-volvox.bam 378B
MM-multi-volvox.bam 361B
MM-chebi-volvox.bam 334B
volvox-sorted.bam 46B
volvox-rg.bam 42B
simple.bam 0B
volvox.bb 26KB
volvox.bb 26KB
volvox.bb 38B
volvox.sort.with.header.bed 2KB
volvox.sort.bed 2KB
volvox.sort.bed 2KB
gwas.bed 806B
foo.bed 402B
volvox-bed12.bed 391B
volvox-bed12.bed 391B
volvox-autosql.bed 263B
peach.bed 0B
grape.bed 0B
reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.bam.sniffles1kb_auto_l8_s5_noalt.bedpe 81KB
reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.bam.sniffles1kb_auto_l8_s5_noalt.bedpe 81KB
pe.pos_sorted.pesr.bedpe 53KB
v4.cram.bw 246KB
v1.cram.bw 246KB
v3.cram.bw 245KB
v2.cram.bw 245KB
volvox.bw 209KB
volvox.bw 209KB
volvox-sorted.bam.coverage.bw 209KB
volvox_microarray.bw 98KB
volvox_microarray_dropbox.bw 98KB
volvox.bw 98KB
volvox_microarray_posneg_frac.bw 35KB
volvox_sine.bw 27KB
volvox_microarray_posneg.bw 26KB
volvox_microarray.altname.bw 26KB
volvox_microarray_negative.bw 26KB
volvox_microarray_contigA.bw 26KB
volvox-sorted.bam.coverage.bw 58B
volvox_inv_indels.chain 0B
run.cmd 31B
volvox-long-reads.fastq.sorted.bam.conf 351B
volvox-long-reads.fastq.sorted.bam.conf 351B
volvox-bed12.bed.gz.conf 172B
deep_sequencing.cram.crai 90B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 高光谱数据集(.mat.csv)-科研学术
- 基于JavaScript和CSS的母婴之家网页设计源码 - myzj
- WX小程序源码无后台京东白条
- WX小程序源码无后台简易计算器
- 基于SpringBoot和Vue的Fastcms前后端分离CMS系统设计源码 - fastcms
- WX小程序源码无后台会议精灵
- 基于Java和Javascript的工程建设综合管理系统材料管理模块设计源码 - material
- c51_2_2.c
- 凡客vancl商城的商品分类-产品搜索-产品详情-评论的抓取php程序压缩包
- ASCII American Standard Code for Information Interchange
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功