Command line tools
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
$ npm install -g @jbrowse/cli
A CLI tool called jbrowse should then be available in the path. You can test
your installation with
$ jbrowse --version
It is also possible to do one-off executions using npx, e.g.
npx @jbrowse/cli create myfolder
It is likely preferable in most cases to install the tools globally with
npm install @jbrowse/cli -g however
jbrowse create
jbrowse add-assembly
jbrowse add-track
jbrowse text-index
jbrowse admin-server
jbrowse upgrade
jbrowse make-pif
jbrowse sort-gff
jbrowse sort-bed
jbrowse add-connection
jbrowse add-track-json
jbrowse remove-track
jbrowse set-default-session