Socket
Book a DemoInstallSign in
Socket

@jbrowse/cli

Package Overview
Dependencies
Maintainers
6
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jbrowse/cli - npm Package Compare versions

Comparing version

to
1.0.1

11

lib/base.js

@@ -124,6 +124,5 @@ "use strict";

const versions = _c.value;
const jb2webreleases = versions.filter(release => release.tag_name.startsWith('@jbrowse/web'));
// if a release was just uploaded, or an erroneous build was made
// then it might have no build asset
const nonprereleases = jb2webreleases
const nonprereleases = versions
.filter(release => release.prerelease === false)

@@ -148,3 +147,3 @@ .filter(release => release.assets && release.assets.length > 0);

return tslib_1.__asyncGenerator(this, arguments, function* fetchVersions_1() {
let page = 0;
let page = 1;
let result;

@@ -156,8 +155,8 @@ do {

// eslint-disable-next-line no-await-in-loop
result = yield tslib_1.__await(response.json());
yield yield tslib_1.__await(result);
result = (yield tslib_1.__await(response.json()));
yield yield tslib_1.__await(result.filter(release => release.tag_name.startsWith('@jbrowse/web')));
page++;
}
else {
throw new Error(`${result.statusText}`);
throw new Error(`${response.statusText}`);
}

@@ -164,0 +163,0 @@ } while (result && result.length > 0);

@@ -5,5 +5,6 @@ "use strict";

const command_1 = require("@oclif/command");
const fs_1 = tslib_1.__importStar(require("fs"));
const fs_1 = tslib_1.__importDefault(require("fs"));
const path_1 = tslib_1.__importDefault(require("path"));
const base_1 = tslib_1.__importDefault(require("../base"));
const fsPromises = fs_1.default.promises;
function isValidJSON(string) {

@@ -191,3 +192,3 @@ try {

const output = runFlags.target || runFlags.out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
const isDir = (await fsPromises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;

@@ -322,3 +323,3 @@ const { sequence: argsSequence } = runArgs;

return undefined;
return fs_1.promises.copyFile(filePath, path_1.default.join(path_1.default.dirname(destination), path_1.default.basename(filePath)));
return fsPromises.copyFile(filePath, path_1.default.join(path_1.default.dirname(destination), path_1.default.basename(filePath)));
}));

@@ -331,3 +332,3 @@ return true;

return undefined;
return fs_1.promises.symlink(filePath, path_1.default.join(path_1.default.dirname(destination), path_1.default.basename(filePath)));
return fsPromises.symlink(filePath, path_1.default.join(path_1.default.dirname(destination), path_1.default.basename(filePath)));
}));

@@ -340,3 +341,3 @@ return true;

return undefined;
return fs_1.promises.rename(filePath, path_1.default.join(path_1.default.dirname(destination), path_1.default.basename(filePath)));
return fsPromises.rename(filePath, path_1.default.join(path_1.default.dirname(destination), path_1.default.basename(filePath)));
}));

@@ -343,0 +344,0 @@ return true;

@@ -6,6 +6,7 @@ "use strict";

const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
const fs_1 = require("fs");
const fs_1 = tslib_1.__importDefault(require("fs"));
const path_1 = tslib_1.__importDefault(require("path"));
const json_parse_better_errors_1 = tslib_1.__importDefault(require("json-parse-better-errors"));
const base_1 = tslib_1.__importDefault(require("../base"));
const fsPromises = fs_1.default.promises;
class AddConnection extends base_1.default {

@@ -15,3 +16,3 @@ async run() {

const output = runFlags.target || runFlags.out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
const isDir = (await fsPromises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;

@@ -18,0 +19,0 @@ const { connectionUrlOrPath: argsPath } = runArgs;

@@ -6,6 +6,7 @@ "use strict";

const command_1 = require("@oclif/command");
const fs_1 = tslib_1.__importStar(require("fs"));
const fs_1 = tslib_1.__importDefault(require("fs"));
const path_1 = tslib_1.__importDefault(require("path"));
const json_parse_better_errors_1 = tslib_1.__importDefault(require("json-parse-better-errors"));
const base_1 = tslib_1.__importDefault(require("../base"));
const fsPromises = fs_1.default.promises;
class AddTrack extends base_1.default {

@@ -17,3 +18,3 @@ async run() {

const output = target || out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
const isDir = (await fsPromises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;

@@ -34,2 +35,6 @@ let { type, trackId, name, assemblyNames } = runFlags;

const adapter = this.guessAdapter(isUrl(location) ? location : path_1.default.join(subDir, path_1.default.basename(location)), protocol, !index || isUrl(index) ? index : path_1.default.join(subDir, path_1.default.basename(index)));
if (adapter.type === 'PAFAdapter') {
// @ts-ignore
adapter.assemblyNames = assemblyNames.split(',').map(a => a.trim());
}
if (isUrl(location) && load) {

@@ -115,3 +120,3 @@ this.error('The --load flag is used for local files only, but a URL was provided', { exit: 100 });

const dataLocation = path_1.default.join(configDirectory, subDir, path_1.default.basename(filePath));
return fs_1.promises.copyFile(filePath, dataLocation);
return fsPromises.copyFile(filePath, dataLocation);
}));

@@ -126,3 +131,3 @@ break;

const dataLocation = path_1.default.join(configDirectory, subDir, path_1.default.basename(filePath));
return fs_1.promises.symlink(filePath, dataLocation);
return fsPromises.symlink(filePath, dataLocation);
}));

@@ -137,3 +142,3 @@ break;

const dataLocation = path_1.default.join(configDirectory, subDir, path_1.default.basename(filePath));
return fs_1.promises.rename(filePath, dataLocation);
return fsPromises.rename(filePath, dataLocation);
}));

@@ -392,3 +397,3 @@ break;

return {
type: 'PafAdapter',
type: 'PAFAdapter',
pafLocation: makeLocation(fileName),

@@ -411,3 +416,3 @@ };

HicAdapter: 'HicTrack',
PafAdapter: 'LinearSyntenyTrack',
PAFAdapter: 'SyntenyTrack',
};

@@ -414,0 +419,0 @@ return known[adapterType] || 'FeatureTrack';

@@ -5,3 +5,3 @@ "use strict";

const command_1 = require("@oclif/command");
const fs_1 = tslib_1.__importStar(require("fs"));
const fs_1 = tslib_1.__importDefault(require("fs"));
const crypto_1 = tslib_1.__importDefault(require("crypto"));

@@ -14,2 +14,3 @@ const boxen_1 = tslib_1.__importDefault(require("boxen"));

const base_1 = tslib_1.__importDefault(require("../base"));
const fsPromises = fs_1.default.promises;
function isValidPort(port) {

@@ -26,3 +27,3 @@ return port > 0 && port < 65535;

const output = runFlags.target || runFlags.out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
const isDir = (await fsPromises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;

@@ -56,3 +57,2 @@ // check if the config file exists, if none exists write default

}
// @ts-ignore
const app = express_1.default();

@@ -59,0 +59,0 @@ app.use(express_1.default.static('.'));

@@ -6,6 +6,7 @@ "use strict";

const command_1 = require("@oclif/command");
const fs_1 = require("fs");
const fs_1 = tslib_1.__importDefault(require("fs"));
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
const unzipper_1 = tslib_1.__importDefault(require("unzipper"));
const base_1 = tslib_1.__importDefault(require("../base"));
const fsPromises = fs_1.default.promises;
class Create extends base_1.default {

@@ -23,3 +24,3 @@ async run() {

// mkdir will do nothing if dir exists
await fs_1.promises.mkdir(argsPath, { recursive: true });
await fsPromises.mkdir(argsPath, { recursive: true });
if (!force) {

@@ -44,3 +45,3 @@ await this.checkPath(argsPath);

async checkPath(userPath) {
const allFiles = await fs_1.promises.readdir(userPath);
const allFiles = await fsPromises.readdir(userPath);
if (allFiles.length > 0) {

@@ -47,0 +48,0 @@ this.error(`${userPath} This directory has existing files and could cause conflicts with create. Please choose another directory or use the force flag to overwrite existing files`, { exit: 120 });

@@ -5,5 +5,6 @@ "use strict";

const command_1 = require("@oclif/command");
const fs_1 = require("fs");
const fs_1 = tslib_1.__importDefault(require("fs"));
const json_parse_better_errors_1 = tslib_1.__importDefault(require("json-parse-better-errors"));
const base_1 = tslib_1.__importDefault(require("../base"));
const fsPromises = fs_1.default.promises;
class SetDefaultSession extends base_1.default {

@@ -15,3 +16,3 @@ async run() {

const output = runFlags.target || runFlags.out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
const isDir = (await fsPromises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;

@@ -75,3 +76,3 @@ const configContents = await this.readJsonFile(this.target);

try {
defaultSessionJson = await fs_1.promises.readFile(defaultSessionFile, {
defaultSessionJson = await fsPromises.readFile(defaultSessionFile, {
encoding: 'utf8',

@@ -78,0 +79,0 @@ });

@@ -1,1 +0,1 @@

{"version":"1.0.0","commands":{"add-assembly":{"id":"add-assembly","description":"Add an assembly to a JBrowse 2 configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse add-assembly GRCh38.fa --load copy","$ jbrowse add-assembly GRCh38.fasta.with.custom.extension.xyz --type indexedFasta --load move","$ jbrowse add-assembly myFile.fa.gz --name GRCh38 --alias hg38 --load inPlace","$ jbrowse add-assembly GRCh38.chrom.sizes --load inPlace","$ jbrowse add-assembly GRCh38.config.json --load copy","$ jbrowse add-assembly https://example.com/data/sample.2bit","$ jbrowse add-assembly GRCh38.fa --target /path/to/jb2/installation/customconfig.json --load copy"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"type of sequence, by default inferred from sequence file\n\nindexedFasta An index FASTA (e.g. .fa or .fasta) file;\n can optionally specify --faiLocation\n\nbgzipFasta A block-gzipped and indexed FASTA (e.g. .fa.gz or .fasta.gz) file;\n can optionally specify --faiLocation and/or --gziLocation\n\ntwoBit A twoBit (e.g. .2bit) file\n\nchromSizes A chromosome sizes (e.g. .chrom.sizes) file\n\ncustom Either a JSON file location or inline JSON that defines a custom\n sequence adapter; must provide --name if using inline JSON","options":["indexedFasta","bgzipFasta","twoBit","chromSizes","custom"]},"name":{"name":"name","type":"option","char":"n","description":"Name of the assembly; if not specified, will be guessed using the sequence file name"},"alias":{"name":"alias","type":"option","char":"a","description":"An alias for the assembly name (e.g. \"hg38\" if the name of the assembly is \"GRCh38\");\ncan be specified multiple times"},"faiLocation":{"name":"faiLocation","type":"option","description":"[default: <fastaLocation>.fai] FASTA index file or URL"},"gziLocation":{"name":"gziLocation","type":"option","description":"[default: <fastaLocation>.gzi] FASTA gzip index file or URL"},"refNameAliases":{"name":"refNameAliases","type":"option","description":"Reference sequence name aliases file or URL; assumed to be a tab-separated aliases\nfile unless --refNameAliasesType is specified"},"refNameAliasesType":{"name":"refNameAliasesType","type":"option","description":"Type of aliases defined by --refNameAliases; if \"custom\", --refNameAliases is either\na JSON file location or inline JSON that defines a custom sequence adapter","options":["aliases","custom"]},"refNameColors":{"name":"refNameColors","type":"option","description":"A comma-separated list of color strings for the reference sequence names; will cycle\nthrough colors if there are fewer colors than sequences"},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to.\nCreates ./config.json if nonexistent"},"out":{"name":"out","type":"option","description":"synonym for target"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"load":{"name":"load","type":"option","char":"l","description":"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","options":["copy","symlink","move","inPlace"]},"skipCheck":{"name":"skipCheck","type":"boolean","description":"Don't check whether or not the sequence file or URL exists or if you are in a JBrowse directory","allowNo":false},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrite existing assembly if one with the same name exists","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Equivalent to `--skipCheck --overwrite`","allowNo":false}},"args":[{"name":"sequence","description":"sequence file or URL\n\nIf TYPE is indexedFasta or bgzipFasta, the index file defaults to <location>.fai\nand can be optionally specified with --faiLocation\nIf TYPE is bgzipFasta, the gzip index file defaults to <location>.gzi and can be\noptionally specified with --gziLocation","required":true}]},"add-connection":{"id":"add-connection","description":"Add a connection to a JBrowse 2 configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse add-connection http://mysite.com/jbrowse/data/","$ jbrowse add-connection http://mysite.com/jbrowse/custom_data_folder/ --type JBrowse1Connection","$ jbrowse add-connection http://mysite.com/path/to/hub.txt --assemblyName hg19","$ jbrowse add-connection http://mysite.com/path/to/custom_hub_name.txt --type UCSCTrackHubConnection --assemblyName hg19","$ jbrowse add-connection http://mysite.com/path/to/custom --type custom --config '{\"uri\":{\"url\":\"https://mysite.com/path/to/custom\"}}' --assemblyName hg19","$ jbrowse add-connection https://mysite.com/path/to/hub.txt --connectionId newId --name newName --target /path/to/jb2/installation/config.json"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"type of connection, ex. JBrowse1Connection, UCSCTrackHubConnection, custom"},"assemblyName":{"name":"assemblyName","type":"option","char":"a","description":"Assembly name of the connection If none, will default to the assembly in your config file"},"config":{"name":"config","type":"option","char":"c","description":"Any extra config settings to add to connection in JSON object format, such as '{\"uri\":\"url\":\"https://sample.com\"}}'"},"connectionId":{"name":"connectionId","type":"option","description":"Id for the connection that must be unique to JBrowse. Defaults to 'connectionType-assemblyName-currentTime'"},"name":{"name":"name","type":"option","char":"n","description":"Name of the connection. Defaults to connectionId if not provided"},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to."},"out":{"name":"out","type":"option","description":"synonym for target"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"skipCheck":{"name":"skipCheck","type":"boolean","description":"Don't check whether or not the data directory URL exists or if you are in a JBrowse directory","allowNo":false},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrites any existing connections if same connection id","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Equivalent to `--skipCheck --overwrite`","allowNo":false}},"args":[{"name":"connectionUrlOrPath","description":"URL of data directory\nFor hub file, usually called hub.txt\nFor JBrowse 1, location of JB1 data directory similar to http://mysite.com/jbrowse/data/ ","required":true}]},"add-track-json":{"id":"add-track-json","description":"Add a track configuration directly from a JSON hunk to the JBrowse 2 configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse add-track-json track.json","$ jbrowse add-track-json track.json --update"],"flags":{"update":{"name":"update","type":"boolean","char":"u","description":"update the contents of an existing track, matched based on trackId","allowNo":false},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to.\nCreates ./config.json if nonexistent"},"out":{"name":"out","type":"option","description":"synonym for target"}},"args":[{"name":"track","description":"track JSON file or command line arg blob","required":true}]},"add-track":{"id":"add-track","description":"Add a track to a JBrowse 2 configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse add-track /path/to/my.bam --load copy","$ jbrowse add-track /path/to/my.bam --target /path/to/jbrowse2/installation/config.json --load symlink","$ jbrowse add-track https://mywebsite.com/my.bam","$ jbrowse add-track /path/to/my.bam --type AlignmentsTrack --name 'New Track' --load move","$ jbrowse add-track /path/to/my.bam --trackId AlignmentsTrack1 --load inPlace --overwrite","$ jbrowse add-track /path/to/my.bam --config '{\"defaultRendering\": \"density\"}'"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"Type of track, by default inferred from track file"},"name":{"name":"name","type":"option","char":"n","description":"Name of the track. Will be defaulted to the trackId if none specified"},"indexFile":{"name":"indexFile","type":"option","description":"Optional index file for the track"},"description":{"name":"description","type":"option","char":"d","description":"Optional description of the track"},"assemblyNames":{"name":"assemblyNames","type":"option","char":"a","description":"Assembly name or names for track as comma separated string. If none, will default to the assembly in your config file"},"category":{"name":"category","type":"option","description":"Optional Comma separated string of categories to group tracks"},"config":{"name":"config","type":"option","description":"Any extra config settings to add to a track. i.e '{\"defaultRendering\": \"density\"}'"},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation to write out to."},"out":{"name":"out","type":"option","description":"synonym for target"},"subDir":{"name":"subDir","type":"option","description":"when using --load a file, output to a subdirectory of the target dir","default":""},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"trackId":{"name":"trackId","type":"option","description":"trackId for the track, by default inferred from filename, must be unique throughout config"},"load":{"name":"load","type":"option","char":"l","description":"Required flag when using a local file. Choose how to manage the track. Copy, symlink, or move the track to the JBrowse directory. Or inPlace to leave track alone","options":["copy","symlink","move","inPlace"]},"skipCheck":{"name":"skipCheck","type":"boolean","description":"Skip check for whether or not the file or URL exists or if you are in a JBrowse directory","allowNo":false},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrites existing track if it shares the same trackId","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Equivalent to `--skipCheck --overwrite`","allowNo":false},"protocol":{"name":"protocol","type":"option","description":"Force protocol to a specific value","default":"uri"}},"args":[{"name":"track","description":"Track file or URL","required":true}]},"admin-server":{"id":"admin-server","description":"Start up a small admin server for JBrowse configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse admin-server","$ jbrowse admin-server -p 8888"],"flags":{"port":{"name":"port","type":"option","char":"p","description":"Specifified port to start the server on;\nDefault is 9090."},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to.\nCreates ./config.json if nonexistent"},"out":{"name":"out","type":"option","description":"synonym for target"},"skipCheck":{"name":"skipCheck","type":"boolean","description":"Don't check whether or not you are in a JBrowse directory","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"create":{"id":"create","description":"Downloads and installs the latest JBrowse 2 release","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse create /path/to/new/installation","$ jbrowse create /path/to/new/installation --force","$ jbrowse create /path/to/new/installation --url url.com/directjbrowselink.zip","$ jbrowse create /path/to/new/installation --tag @jbrowse/web@0.0.1","$ jbrowse create --listVersions # Lists out all available versions of JBrowse 2"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Overwrites existing JBrowse 2 installation if present in path","allowNo":false},"listVersions":{"name":"listVersions","type":"boolean","char":"l","description":"Lists out all versions of JBrowse 2","allowNo":false},"url":{"name":"url","type":"option","char":"u","description":"A direct URL to a JBrowse 2 release"},"tag":{"name":"tag","type":"option","char":"t","description":"Version of JBrowse 2 to install. Format is @jbrowse/web@0.0.1.\nDefaults to latest"}},"args":[{"name":"localPath","description":"Location where JBrowse 2 will be installed","required":true}]},"set-default-session":{"id":"set-default-session","description":"Set a default session with views and tracks","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse set-default-session --session /path/to/default/session.json","$ jbrowse set-default-session --target /path/to/jb2/installation/config.json --view LinearGenomeView --tracks track1, track2, track3","$ jbrowse set-default-session --view LinearGenomeView, --name newName --viewId view-no-tracks","$ jbrowse set-default-session --currentSession # Prints out current default session"],"flags":{"session":{"name":"session","type":"option","char":"s","description":"set path to a file containing session in json format"},"name":{"name":"name","type":"option","char":"n","description":"Give a name for the default session","default":"New Default Session"},"view":{"name":"view","type":"option","char":"v","description":"View type in config to be added as default session, i.e LinearGenomeView, CircularView, DotplotView.\nMust be provided if no default session file provided"},"viewId":{"name":"viewId","type":"option","description":"Identifier for the view. Will be generated on default"},"tracks":{"name":"tracks","type":"option","char":"t","description":"Track id or track ids as comma separated string to put into default session"},"currentSession":{"name":"currentSession","type":"boolean","char":"c","description":"List out the current default session","allowNo":false},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to"},"out":{"name":"out","type":"option","description":"synonym for target"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"upgrade":{"id":"upgrade","description":"Upgrades JBrowse 2 to latest version","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse upgrade # Upgrades current directory to latest jbrowse release","$ jbrowse upgrade /path/to/jbrowse2/installation","$ jbrowse upgrade /path/to/jbrowse2/installation --tag @jbrowse/web@0.0.1","$ jbrowse upgrade --listVersions # Lists out all available versions of JBrowse 2","$ jbrowse upgrade --url https://sample.com/jbrowse2.zip"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"listVersions":{"name":"listVersions","type":"boolean","char":"l","description":"Lists out all versions of JBrowse 2","allowNo":false},"tag":{"name":"tag","type":"option","char":"t","description":"Version of JBrowse 2 to install. Format is @jbrowse/web@0.0.1.\nDefaults to latest"},"url":{"name":"url","type":"option","char":"u","description":"A direct URL to a JBrowse 2 release"}},"args":[{"name":"localPath","description":"Location where JBrowse 2 is installed","required":false,"default":"."},{"name":"placeholder","description":"Placeholder for config file migration scripts","required":false,"hidden":true}]}}}
{"version":"1.0.1","commands":{"add-assembly":{"id":"add-assembly","description":"Add an assembly to a JBrowse 2 configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse add-assembly GRCh38.fa --load copy","$ jbrowse add-assembly GRCh38.fasta.with.custom.extension.xyz --type indexedFasta --load move","$ jbrowse add-assembly myFile.fa.gz --name GRCh38 --alias hg38 --load inPlace","$ jbrowse add-assembly GRCh38.chrom.sizes --load inPlace","$ jbrowse add-assembly GRCh38.config.json --load copy","$ jbrowse add-assembly https://example.com/data/sample.2bit","$ jbrowse add-assembly GRCh38.fa --target /path/to/jb2/installation/customconfig.json --load copy"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"type of sequence, by default inferred from sequence file\n\nindexedFasta An index FASTA (e.g. .fa or .fasta) file;\n can optionally specify --faiLocation\n\nbgzipFasta A block-gzipped and indexed FASTA (e.g. .fa.gz or .fasta.gz) file;\n can optionally specify --faiLocation and/or --gziLocation\n\ntwoBit A twoBit (e.g. .2bit) file\n\nchromSizes A chromosome sizes (e.g. .chrom.sizes) file\n\ncustom Either a JSON file location or inline JSON that defines a custom\n sequence adapter; must provide --name if using inline JSON","options":["indexedFasta","bgzipFasta","twoBit","chromSizes","custom"]},"name":{"name":"name","type":"option","char":"n","description":"Name of the assembly; if not specified, will be guessed using the sequence file name"},"alias":{"name":"alias","type":"option","char":"a","description":"An alias for the assembly name (e.g. \"hg38\" if the name of the assembly is \"GRCh38\");\ncan be specified multiple times"},"faiLocation":{"name":"faiLocation","type":"option","description":"[default: <fastaLocation>.fai] FASTA index file or URL"},"gziLocation":{"name":"gziLocation","type":"option","description":"[default: <fastaLocation>.gzi] FASTA gzip index file or URL"},"refNameAliases":{"name":"refNameAliases","type":"option","description":"Reference sequence name aliases file or URL; assumed to be a tab-separated aliases\nfile unless --refNameAliasesType is specified"},"refNameAliasesType":{"name":"refNameAliasesType","type":"option","description":"Type of aliases defined by --refNameAliases; if \"custom\", --refNameAliases is either\na JSON file location or inline JSON that defines a custom sequence adapter","options":["aliases","custom"]},"refNameColors":{"name":"refNameColors","type":"option","description":"A comma-separated list of color strings for the reference sequence names; will cycle\nthrough colors if there are fewer colors than sequences"},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to.\nCreates ./config.json if nonexistent"},"out":{"name":"out","type":"option","description":"synonym for target"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"load":{"name":"load","type":"option","char":"l","description":"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","options":["copy","symlink","move","inPlace"]},"skipCheck":{"name":"skipCheck","type":"boolean","description":"Don't check whether or not the sequence file or URL exists or if you are in a JBrowse directory","allowNo":false},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrite existing assembly if one with the same name exists","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Equivalent to `--skipCheck --overwrite`","allowNo":false}},"args":[{"name":"sequence","description":"sequence file or URL\n\nIf TYPE is indexedFasta or bgzipFasta, the index file defaults to <location>.fai\nand can be optionally specified with --faiLocation\nIf TYPE is bgzipFasta, the gzip index file defaults to <location>.gzi and can be\noptionally specified with --gziLocation","required":true}]},"add-connection":{"id":"add-connection","description":"Add a connection to a JBrowse 2 configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse add-connection http://mysite.com/jbrowse/data/","$ jbrowse add-connection http://mysite.com/jbrowse/custom_data_folder/ --type JBrowse1Connection","$ jbrowse add-connection http://mysite.com/path/to/hub.txt --assemblyName hg19","$ jbrowse add-connection http://mysite.com/path/to/custom_hub_name.txt --type UCSCTrackHubConnection --assemblyName hg19","$ jbrowse add-connection http://mysite.com/path/to/custom --type custom --config '{\"uri\":{\"url\":\"https://mysite.com/path/to/custom\"}}' --assemblyName hg19","$ jbrowse add-connection https://mysite.com/path/to/hub.txt --connectionId newId --name newName --target /path/to/jb2/installation/config.json"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"type of connection, ex. JBrowse1Connection, UCSCTrackHubConnection, custom"},"assemblyName":{"name":"assemblyName","type":"option","char":"a","description":"Assembly name of the connection If none, will default to the assembly in your config file"},"config":{"name":"config","type":"option","char":"c","description":"Any extra config settings to add to connection in JSON object format, such as '{\"uri\":\"url\":\"https://sample.com\"}}'"},"connectionId":{"name":"connectionId","type":"option","description":"Id for the connection that must be unique to JBrowse. Defaults to 'connectionType-assemblyName-currentTime'"},"name":{"name":"name","type":"option","char":"n","description":"Name of the connection. Defaults to connectionId if not provided"},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to."},"out":{"name":"out","type":"option","description":"synonym for target"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"skipCheck":{"name":"skipCheck","type":"boolean","description":"Don't check whether or not the data directory URL exists or if you are in a JBrowse directory","allowNo":false},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrites any existing connections if same connection id","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Equivalent to `--skipCheck --overwrite`","allowNo":false}},"args":[{"name":"connectionUrlOrPath","description":"URL of data directory\nFor hub file, usually called hub.txt\nFor JBrowse 1, location of JB1 data directory similar to http://mysite.com/jbrowse/data/ ","required":true}]},"add-track-json":{"id":"add-track-json","description":"Add a track configuration directly from a JSON hunk to the JBrowse 2 configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse add-track-json track.json","$ jbrowse add-track-json track.json --update"],"flags":{"update":{"name":"update","type":"boolean","char":"u","description":"update the contents of an existing track, matched based on trackId","allowNo":false},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to.\nCreates ./config.json if nonexistent"},"out":{"name":"out","type":"option","description":"synonym for target"}},"args":[{"name":"track","description":"track JSON file or command line arg blob","required":true}]},"add-track":{"id":"add-track","description":"Add a track to a JBrowse 2 configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse add-track /path/to/my.bam --load copy","$ jbrowse add-track /path/to/my.bam --target /path/to/jbrowse2/installation/config.json --load symlink","$ jbrowse add-track https://mywebsite.com/my.bam","$ jbrowse add-track /path/to/my.bam --type AlignmentsTrack --name 'New Track' --load move","$ jbrowse add-track /path/to/my.bam --trackId AlignmentsTrack1 --load inPlace --overwrite","$ jbrowse add-track /path/to/my.bam --config '{\"defaultRendering\": \"density\"}'"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"Type of track, by default inferred from track file"},"name":{"name":"name","type":"option","char":"n","description":"Name of the track. Will be defaulted to the trackId if none specified"},"indexFile":{"name":"indexFile","type":"option","description":"Optional index file for the track"},"description":{"name":"description","type":"option","char":"d","description":"Optional description of the track"},"assemblyNames":{"name":"assemblyNames","type":"option","char":"a","description":"Assembly name or names for track as comma separated string. If none, will default to the assembly in your config file"},"category":{"name":"category","type":"option","description":"Optional Comma separated string of categories to group tracks"},"config":{"name":"config","type":"option","description":"Any extra config settings to add to a track. i.e '{\"defaultRendering\": \"density\"}'"},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation to write out to."},"out":{"name":"out","type":"option","description":"synonym for target"},"subDir":{"name":"subDir","type":"option","description":"when using --load a file, output to a subdirectory of the target dir","default":""},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"trackId":{"name":"trackId","type":"option","description":"trackId for the track, by default inferred from filename, must be unique throughout config"},"load":{"name":"load","type":"option","char":"l","description":"Required flag when using a local file. Choose how to manage the track. Copy, symlink, or move the track to the JBrowse directory. Or inPlace to leave track alone","options":["copy","symlink","move","inPlace"]},"skipCheck":{"name":"skipCheck","type":"boolean","description":"Skip check for whether or not the file or URL exists or if you are in a JBrowse directory","allowNo":false},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrites existing track if it shares the same trackId","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Equivalent to `--skipCheck --overwrite`","allowNo":false},"protocol":{"name":"protocol","type":"option","description":"Force protocol to a specific value","default":"uri"}},"args":[{"name":"track","description":"Track file or URL","required":true}]},"admin-server":{"id":"admin-server","description":"Start up a small admin server for JBrowse configuration","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse admin-server","$ jbrowse admin-server -p 8888"],"flags":{"port":{"name":"port","type":"option","char":"p","description":"Specifified port to start the server on;\nDefault is 9090."},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to.\nCreates ./config.json if nonexistent"},"out":{"name":"out","type":"option","description":"synonym for target"},"skipCheck":{"name":"skipCheck","type":"boolean","description":"Don't check whether or not you are in a JBrowse directory","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"create":{"id":"create","description":"Downloads and installs the latest JBrowse 2 release","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse create /path/to/new/installation","$ jbrowse create /path/to/new/installation --force","$ jbrowse create /path/to/new/installation --url url.com/directjbrowselink.zip","$ jbrowse create /path/to/new/installation --tag @jbrowse/web@0.0.1","$ jbrowse create --listVersions # Lists out all available versions of JBrowse 2"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Overwrites existing JBrowse 2 installation if present in path","allowNo":false},"listVersions":{"name":"listVersions","type":"boolean","char":"l","description":"Lists out all versions of JBrowse 2","allowNo":false},"url":{"name":"url","type":"option","char":"u","description":"A direct URL to a JBrowse 2 release"},"tag":{"name":"tag","type":"option","char":"t","description":"Version of JBrowse 2 to install. Format is @jbrowse/web@0.0.1.\nDefaults to latest"}},"args":[{"name":"localPath","description":"Location where JBrowse 2 will be installed","required":true}]},"set-default-session":{"id":"set-default-session","description":"Set a default session with views and tracks","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse set-default-session --session /path/to/default/session.json","$ jbrowse set-default-session --target /path/to/jb2/installation/config.json --view LinearGenomeView --tracks track1, track2, track3","$ jbrowse set-default-session --view LinearGenomeView, --name newName --viewId view-no-tracks","$ jbrowse set-default-session --currentSession # Prints out current default session"],"flags":{"session":{"name":"session","type":"option","char":"s","description":"set path to a file containing session in json format"},"name":{"name":"name","type":"option","char":"n","description":"Give a name for the default session","default":"New Default Session"},"view":{"name":"view","type":"option","char":"v","description":"View type in config to be added as default session, i.e LinearGenomeView, CircularView, DotplotView.\nMust be provided if no default session file provided"},"viewId":{"name":"viewId","type":"option","description":"Identifier for the view. Will be generated on default"},"tracks":{"name":"tracks","type":"option","char":"t","description":"Track id or track ids as comma separated string to put into default session"},"currentSession":{"name":"currentSession","type":"boolean","char":"c","description":"List out the current default session","allowNo":false},"target":{"name":"target","type":"option","description":"path to config file in JB2 installation directory to write out to"},"out":{"name":"out","type":"option","description":"synonym for target"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"upgrade":{"id":"upgrade","description":"Upgrades JBrowse 2 to latest version","pluginName":"@jbrowse/cli","pluginType":"core","aliases":[],"examples":["$ jbrowse upgrade # Upgrades current directory to latest jbrowse release","$ jbrowse upgrade /path/to/jbrowse2/installation","$ jbrowse upgrade /path/to/jbrowse2/installation --tag @jbrowse/web@0.0.1","$ jbrowse upgrade --listVersions # Lists out all available versions of JBrowse 2","$ jbrowse upgrade --url https://sample.com/jbrowse2.zip"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"listVersions":{"name":"listVersions","type":"boolean","char":"l","description":"Lists out all versions of JBrowse 2","allowNo":false},"tag":{"name":"tag","type":"option","char":"t","description":"Version of JBrowse 2 to install. Format is @jbrowse/web@0.0.1.\nDefaults to latest"},"url":{"name":"url","type":"option","char":"u","description":"A direct URL to a JBrowse 2 release"}},"args":[{"name":"localPath","description":"Location where JBrowse 2 is installed","required":false,"default":"."},{"name":"placeholder","description":"Placeholder for config file migration scripts","required":false,"hidden":true}]}}}
{
"name": "@jbrowse/cli",
"version": "1.0.0",
"version": "1.0.1",
"description": "A command line tool for working with JBrowse 2",

@@ -27,3 +27,3 @@ "keywords": [

"engines": {
"node": ">=10.0.0"
"node": ">=10.4.0"
},

@@ -65,3 +65,3 @@ "scripts": {

},
"gitHead": "4e843cd28ebc1261c552089f76874a1b29474736"
"gitHead": "34eddf1ad0225654dc924996a6bcd454f72ac744"
}

@@ -136,3 +136,3 @@ ---

_See code: [src/commands/add-assembly.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.0/products/jbrowse-cli/src/commands/add-assembly.ts)_
_See code: [src/commands/add-assembly.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.1/products/jbrowse-cli/src/commands/add-assembly.ts)_

@@ -191,3 +191,3 @@ ## `jbrowse add-connection CONNECTIONURLORPATH`

_See code: [src/commands/add-connection.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.0/products/jbrowse-cli/src/commands/add-connection.ts)_
_See code: [src/commands/add-connection.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.1/products/jbrowse-cli/src/commands/add-connection.ts)_

@@ -255,3 +255,3 @@ ## `jbrowse add-track TRACK`

_See code: [src/commands/add-track.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.0/products/jbrowse-cli/src/commands/add-track.ts)_
_See code: [src/commands/add-track.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.1/products/jbrowse-cli/src/commands/add-track.ts)_

@@ -281,3 +281,3 @@ ## `jbrowse add-track-json TRACK`

_See code: [src/commands/add-track-json.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.0/products/jbrowse-cli/src/commands/add-track-json.ts)_
_See code: [src/commands/add-track-json.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.1/products/jbrowse-cli/src/commands/add-track-json.ts)_

@@ -310,3 +310,3 @@ ## `jbrowse admin-server`

_See code: [src/commands/admin-server.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.0/products/jbrowse-cli/src/commands/admin-server.ts)_
_See code: [src/commands/admin-server.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.1/products/jbrowse-cli/src/commands/admin-server.ts)_

@@ -342,3 +342,3 @@ ## `jbrowse create LOCALPATH`

_See code: [src/commands/create.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.0/products/jbrowse-cli/src/commands/create.ts)_
_See code: [src/commands/create.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.1/products/jbrowse-cli/src/commands/create.ts)_

@@ -395,3 +395,3 @@ ## `jbrowse help [COMMAND]`

_See code: [src/commands/set-default-session.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.0/products/jbrowse-cli/src/commands/set-default-session.ts)_
_See code: [src/commands/set-default-session.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.1/products/jbrowse-cli/src/commands/set-default-session.ts)_

@@ -426,3 +426,3 @@ ## `jbrowse upgrade [LOCALPATH]`

_See code: [src/commands/upgrade.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.0/products/jbrowse-cli/src/commands/upgrade.ts)_
_See code: [src/commands/upgrade.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%401.0.1/products/jbrowse-cli/src/commands/upgrade.ts)_
<!-- commandsstop -->

@@ -429,0 +429,0 @@

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.