New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jbrowse/cli

Package Overview
Dependencies
Maintainers
6
Versions
106
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 0.0.1-beta.25 to 0.0.1-beta.26

1

lib/base.d.ts

@@ -71,3 +71,2 @@ /**

init(): Promise<void>;
checkLocation(location: string): Promise<void>;
readFile(location: string): Promise<string>;

@@ -74,0 +73,0 @@ readJsonFile(location: string): Promise<any>;

@@ -14,23 +14,2 @@ "use strict";

async init() { }
async checkLocation(location) {
let manifestJson;
try {
manifestJson = await fs_1.promises.readFile(path_1.default.join(location, 'manifest.json'), {
encoding: 'utf8',
});
}
catch (error) {
this.error('Could not find the file "manifest.json". Please make sure you are in the top level of a JBrowse 2 installation.', { exit: 10 });
}
let manifest = {};
try {
manifest = json_parse_better_errors_1.default(manifestJson);
}
catch (error) {
this.error('Could not parse the file "manifest.json". Please make sure you are in the top level of a JBrowse 2 installation.', { exit: 20 });
}
if (manifest.name !== 'JBrowse') {
this.error('"name" in file "manifest.json" is not "JBrowse". Please make sure you are in the top level of a JBrowse 2 installation.', { exit: 30 });
}
}
async readFile(location) {

@@ -37,0 +16,0 @@ return fs_1.promises.readFile(location, { encoding: 'utf8' });

4

lib/commands/add-assembly.d.ts
import { flags } from '@oclif/command';
import JBrowseCommand, { Assembly } from '../base';
export default class AddAssembly extends JBrowseCommand {
target: string;
static description: string;

@@ -20,3 +21,4 @@ static examples: string[];

refNameColors: flags.IOptionFlag<string | undefined>;
target: flags.IOptionFlag<string>;
target: flags.IOptionFlag<string | undefined>;
out: flags.IOptionFlag<string | undefined>;
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;

@@ -23,0 +25,0 @@ load: flags.IOptionFlag<string | undefined>;

@@ -62,4 +62,4 @@ "use strict";

if (loaded) {
sequenceLocation = await this.resolveFileLocation(path_1.default.join('.', path_1.default.basename(sequenceLocation)));
indexLocation = await this.resolveFileLocation(path_1.default.join('.', path_1.default.basename(indexLocation)));
sequenceLocation = path_1.default.basename(sequenceLocation);
indexLocation = path_1.default.basename(indexLocation);
}

@@ -101,5 +101,5 @@ sequence = {

if (loaded) {
sequenceLocation = await this.resolveFileLocation(path_1.default.join('.', path_1.default.basename(sequenceLocation)));
indexLocation = await this.resolveFileLocation(path_1.default.join('.', path_1.default.basename(indexLocation)));
bgzipIndexLocation = await this.resolveFileLocation(path_1.default.join('.', path_1.default.basename(bgzipIndexLocation)));
sequenceLocation = path_1.default.basename(sequenceLocation);
indexLocation = path_1.default.basename(indexLocation);
bgzipIndexLocation = path_1.default.basename(bgzipIndexLocation);
}

@@ -129,3 +129,3 @@ sequence = {

if (loaded) {
sequenceLocation = await this.resolveFileLocation(path_1.default.join('.', path_1.default.basename(sequenceLocation)));
sequenceLocation = path_1.default.basename(sequenceLocation);
}

@@ -144,3 +144,3 @@ sequence = {

let sequenceLocation = await this.resolveFileLocation(argsSequence, !(runFlags.skipCheck || runFlags.force), runFlags.load === 'inPlace');
this.debug(`chrome.sizes location resolved to: ${sequenceLocation}`);
this.debug(`chrom.sizes location resolved to: ${sequenceLocation}`);
if (!name) {

@@ -154,3 +154,3 @@ name = path_1.default.basename(sequenceLocation, '.chrom.sizes');

if (loaded) {
sequenceLocation = await this.resolveFileLocation(path_1.default.join('.', path_1.default.basename(sequenceLocation)));
sequenceLocation = path_1.default.basename(sequenceLocation);
}

@@ -194,5 +194,5 @@ sequence = {

const { args: runArgs, flags: runFlags } = this.parse(AddAssembly);
if (!(runFlags.skipCheck || runFlags.force)) {
await this.checkLocation(path_1.default.dirname(runFlags.target));
}
const output = runFlags.target || runFlags.out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;
const { sequence: argsSequence } = runArgs;

@@ -246,8 +246,8 @@ this.debug(`Sequence location is: ${argsSequence}`);

let configContents;
if (fs_1.default.existsSync(runFlags.target)) {
this.debug(`Found existing config file ${runFlags.target}`);
configContents = Object.assign(Object.assign({}, defaultConfig), (await this.readJsonFile(runFlags.target)));
if (fs_1.default.existsSync(this.target)) {
this.debug(`Found existing config file ${this.target}`);
configContents = Object.assign(Object.assign({}, defaultConfig), (await this.readJsonFile(this.target)));
}
else {
this.debug(`Creating config file ${runFlags.target}`);
this.debug(`Creating config file ${this.target}`);
configContents = Object.assign({}, defaultConfig);

@@ -272,5 +272,5 @@ }

}
this.debug(`Writing configuration to file ${runFlags.target}`);
await this.writeJsonFile(runFlags.target, configContents);
this.log(`${idx !== -1 ? 'Overwrote' : 'Added'} assembly "${assembly.name}" ${idx !== -1 ? 'in' : 'to'} ${runFlags.target}`);
this.debug(`Writing configuration to file ${this.target}`);
await this.writeJsonFile(this.target, configContents);
this.log(`${idx !== -1 ? 'Overwrote' : 'Added'} assembly "${assembly.name}" ${idx !== -1 ? 'in' : 'to'} ${this.target}`);
}

@@ -314,2 +314,3 @@ guessSequenceType(sequence) {

let locationUrl;
const destination = this.target;
try {

@@ -328,4 +329,3 @@ locationUrl = new URL(filePaths[0]);

return undefined;
const dataLocation = path_1.default.join('.', path_1.default.basename(filePath));
return fs_1.promises.copyFile(filePath, dataLocation);
return fs_1.promises.copyFile(filePath, path_1.default.join(path_1.default.dirname(destination), path_1.default.basename(filePath)));
}));

@@ -338,4 +338,3 @@ return true;

return undefined;
const dataLocation = path_1.default.join('.', path_1.default.basename(filePath));
return fs_1.promises.symlink(filePath, dataLocation);
return fs_1.promises.symlink(filePath, path_1.default.join(path_1.default.dirname(destination), path_1.default.basename(filePath)));
}));

@@ -348,4 +347,3 @@ return true;

return undefined;
const dataLocation = path_1.default.join('.', path_1.default.basename(filePath));
return fs_1.promises.rename(filePath, dataLocation);
return fs_1.promises.rename(filePath, path_1.default.join(path_1.default.dirname(destination), path_1.default.basename(filePath)));
}));

@@ -431,4 +429,6 @@ return true;

description: 'path to config file in JB2 installation directory to write out to.\nCreates ./config.json if nonexistent',
default: './config.json',
}),
out: command_1.flags.string({
description: 'synonym for target',
}),
help: command_1.flags.help({ char: 'h' }),

@@ -435,0 +435,0 @@ load: command_1.flags.string({

import { flags } from '@oclif/command';
import JBrowseCommand from '../base';
export default class AddConnection extends JBrowseCommand {
private target;
static description: string;

@@ -17,3 +18,4 @@ static examples: string[];

name: flags.IOptionFlag<string | undefined>;
target: flags.IOptionFlag<string>;
target: flags.IOptionFlag<string | undefined>;
out: flags.IOptionFlag<string | undefined>;
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;

@@ -20,0 +22,0 @@ skipCheck: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;

@@ -6,2 +6,3 @@ "use strict";

const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
const fs_1 = require("fs");
const path_1 = tslib_1.__importDefault(require("path"));

@@ -13,11 +14,11 @@ const json_parse_better_errors_1 = tslib_1.__importDefault(require("json-parse-better-errors"));

const { args: runArgs, flags: runFlags } = this.parse(AddConnection);
const output = runFlags.target || runFlags.out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;
const { connectionUrlOrPath: argsPath } = runArgs;
const { config, target } = runFlags;
const { config } = runFlags;
let { type, name, connectionId, assemblyName } = runFlags;
if (!(runFlags.skipCheck || runFlags.force)) {
await this.checkLocation(path_1.default.dirname(target));
}
const url = await this.resolveURL(argsPath, !(runFlags.skipCheck || runFlags.force));
const configContents = await this.readJsonFile(target);
this.debug(`Using config file ${target}`);
const configContents = await this.readJsonFile(this.target);
this.debug(`Using config file ${this.target}`);
if (!configContents.assemblies || !configContents.assemblies.length) {

@@ -97,5 +98,5 @@ this.error('No assemblies found. Please add one before adding connections', { exit: 120 });

configContents.connections.push(connectionConfig);
this.debug(`Writing configuration to file ${target}`);
await this.writeJsonFile(target, configContents);
this.log(`${idx !== -1 ? 'Overwrote' : 'Added'} connection "${name}" ${idx !== -1 ? 'in' : 'to'} ${target}`);
this.debug(`Writing configuration to file ${this.target}`);
await this.writeJsonFile(this.target, configContents);
this.log(`${idx !== -1 ? 'Overwrote' : 'Added'} connection "${name}" ${idx !== -1 ? 'in' : 'to'} ${this.target}`);
}

@@ -187,4 +188,6 @@ async resolveURL(location, check = true) {

description: 'path to config file in JB2 installation directory to write out to.',
default: './config.json',
}),
out: command_1.flags.string({
description: 'synonym for target',
}),
help: command_1.flags.help({ char: 'h' }),

@@ -191,0 +194,0 @@ skipCheck: command_1.flags.boolean({

import { flags } from '@oclif/command';
import JBrowseCommand from '../base';
export default class AddTrackJson extends JBrowseCommand {
target: string;
static description: string;

@@ -13,5 +14,6 @@ static examples: string[];

update: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
target: flags.IOptionFlag<string>;
target: flags.IOptionFlag<string | undefined>;
out: flags.IOptionFlag<string | undefined>;
};
run(): Promise<void>;
}

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

const command_1 = require("@oclif/command");
const path_1 = tslib_1.__importDefault(require("path"));
const fs_1 = require("fs");
const base_1 = tslib_1.__importDefault(require("../base"));

@@ -11,8 +11,10 @@ class AddTrackJson extends base_1.default {

const { args, flags: runFlags } = this.parse(AddTrackJson);
const output = runFlags.target || runFlags.out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;
const { track: inputtedTrack } = args;
this.debug(`Sequence location is: ${inputtedTrack}`);
const { update, target } = runFlags;
await this.checkLocation(path_1.default.dirname(target));
const config = await this.readJsonFile(target);
this.debug(`Found existing config file ${target}`);
const { update } = runFlags;
const config = await this.readJsonFile(this.target);
this.debug(`Found existing config file ${this.target}`);
const track = await this.readInlineOrFileJson(inputtedTrack);

@@ -37,5 +39,5 @@ if (!config.tracks) {

}
this.debug(`Writing configuration to file ${target}`);
await this.writeJsonFile(target, config);
this.log(`${idx !== -1 ? 'Overwrote' : 'Added'} assembly "${track.name}" ${idx !== -1 ? 'in' : 'to'} ${target}`);
this.debug(`Writing configuration to file ${this.target}`);
await this.writeJsonFile(this.target, config);
this.log(`${idx !== -1 ? 'Overwrote' : 'Added'} assembly "${track.name}" ${idx !== -1 ? 'in' : 'to'} ${this.target}`);
}

@@ -63,4 +65,6 @@ }

description: 'path to config file in JB2 installation directory to write out to.\nCreates ./config.json if nonexistent',
default: './config.json',
}),
out: command_1.flags.string({
description: 'synonym for target',
}),
};

@@ -10,2 +10,3 @@ import { flags } from '@oclif/command';

export default class AddTrack extends JBrowseCommand {
target: string;
static description: string;

@@ -21,2 +22,3 @@ static examples: string[];

name: flags.IOptionFlag<string | undefined>;
indexFile: flags.IOptionFlag<string | undefined>;
description: flags.IOptionFlag<string | undefined>;

@@ -26,3 +28,5 @@ assemblyNames: flags.IOptionFlag<string | undefined>;

config: flags.IOptionFlag<string | undefined>;
target: flags.IOptionFlag<string>;
target: flags.IOptionFlag<string | undefined>;
out: flags.IOptionFlag<string | undefined>;
subDir: flags.IOptionFlag<string>;
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;

@@ -34,10 +38,6 @@ trackId: flags.IOptionFlag<string | undefined>;

force: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
protocol: flags.IOptionFlag<string>;
};
run(): Promise<void>;
resolveFileLocationWithProtocol(location: string, check?: boolean, warn?: boolean): Promise<{
location: string;
protocol: 'uri' | 'localPath';
local: boolean;
}>;
guessFileNames(fileName: string): {
guessFileNames(fileName: string, index?: string): {
file: string;

@@ -63,3 +63,3 @@ index: string;

};
guessAdapter(fileName: string, protocol: 'uri' | 'localPath'): {
guessAdapter(fileName: string, protocol: 'uri' | 'localPath', index?: string): {
type: string;

@@ -69,3 +69,3 @@ bamLocation: UriLocation | LocalPathLocation;

location: UriLocation | LocalPathLocation;
indexType?: undefined;
indexType: string;
};

@@ -76,2 +76,3 @@ cramLocation?: undefined;

vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -86,13 +87,12 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {
type: string;
bamLocation: UriLocation | LocalPathLocation;
index: {
location: UriLocation | LocalPathLocation;
indexType: string;
};
cramLocation?: undefined;
craiLocation?: undefined;
cramLocation: UriLocation | LocalPathLocation;
craiLocation: UriLocation | LocalPathLocation;
bamLocation?: undefined;
index?: undefined;
gffGzLocation?: undefined;
vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -107,10 +107,12 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {
type: string;
cramLocation: UriLocation | LocalPathLocation;
craiLocation: UriLocation | LocalPathLocation;
bamLocation?: undefined;
index?: undefined;
cramLocation?: undefined;
craiLocation?: undefined;
gffGzLocation?: undefined;
vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -125,10 +127,15 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {
type: string;
gffGzLocation: UriLocation | LocalPathLocation;
index: {
location: UriLocation | LocalPathLocation;
indexType: string;
};
bamLocation?: undefined;
index?: undefined;
cramLocation?: undefined;
craiLocation?: undefined;
gffGzLocation?: undefined;
vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -143,5 +150,6 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {
type: string;
gffGzLocation: UriLocation | LocalPathLocation;
vcfGzLocation: UriLocation | LocalPathLocation;
index: {

@@ -154,3 +162,4 @@ location: UriLocation | LocalPathLocation;

craiLocation?: undefined;
vcfGzLocation?: undefined;
gffGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -165,5 +174,6 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {
type: string;
vcfGzLocation: UriLocation | LocalPathLocation;
bedGzLocation: UriLocation | LocalPathLocation;
index: {

@@ -177,2 +187,3 @@ location: UriLocation | LocalPathLocation;

gffGzLocation?: undefined;
vcfGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -187,2 +198,3 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {

@@ -197,2 +209,3 @@ type: string;

vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigWigLocation?: undefined;

@@ -206,2 +219,3 @@ fastaLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {

@@ -216,2 +230,3 @@ type: string;

vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -225,2 +240,3 @@ fastaLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {

@@ -236,2 +252,3 @@ type: string;

vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -244,2 +261,3 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {

@@ -256,2 +274,3 @@ type: string;

vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -263,2 +282,3 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {

@@ -273,2 +293,3 @@ type: string;

vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -282,5 +303,6 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {
type: string;
rootUrlTemplate: string;
rootUrlTemplate: UriLocation | LocalPathLocation;
bamLocation?: undefined;

@@ -292,2 +314,3 @@ index?: undefined;

vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -301,2 +324,3 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {

@@ -311,2 +335,3 @@ type: string;

vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -320,2 +345,3 @@ bigWigLocation?: undefined;

hicLocation?: undefined;
pafLocation?: undefined;
} | {

@@ -330,2 +356,3 @@ type: string;

vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;

@@ -339,2 +366,22 @@ bigWigLocation?: undefined;

endpoint?: undefined;
pafLocation?: undefined;
} | {
type: string;
pafLocation: UriLocation | LocalPathLocation;
bamLocation?: undefined;
index?: undefined;
cramLocation?: undefined;
craiLocation?: undefined;
gffGzLocation?: undefined;
vcfGzLocation?: undefined;
bedGzLocation?: undefined;
bigBedLocation?: undefined;
bigWigLocation?: undefined;
fastaLocation?: undefined;
faiLocation?: undefined;
gziLocation?: undefined;
twoBitLocation?: undefined;
rootUrlTemplate?: undefined;
endpoint?: undefined;
hicLocation?: undefined;
};

@@ -341,0 +388,0 @@ guessSubadapter(fileName: string, protocol: string, mainAdapter: string): {

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

const command_1 = require("@oclif/command");
const fs_1 = require("fs");
const fs_1 = tslib_1.__importStar(require("fs"));
const path_1 = tslib_1.__importDefault(require("path"));
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
const json_parse_better_errors_1 = tslib_1.__importDefault(require("json-parse-better-errors"));

@@ -16,26 +15,28 @@ const base_1 = tslib_1.__importDefault(require("../base"));

const { track: argsTrack } = runArgs;
const { config, skipCheck, force, category, description, load, target, } = runFlags;
const { config, skipCheck, force, overwrite, category, description, load, subDir, target, protocol, out, indexFile: index, } = runFlags;
const output = target || out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;
let { type, trackId, name, assemblyNames } = runFlags;
const configDirectory = path_1.default.dirname(target);
if (!(skipCheck || force)) {
await this.checkLocation(configDirectory);
const configDirectory = path_1.default.dirname(this.target);
if (!argsTrack) {
this.error('No track provided. Example usage: jbrowse add-track yourfile.bam', { exit: 120 });
}
const { location, protocol, local, } = await this.resolveFileLocationWithProtocol(argsTrack, !(skipCheck || force), load === 'inPlace');
let trackLocation;
if (load) {
if (!local) {
this.error(`URL detected with --load flag. Please rerun the function without the --load flag`, { exit: 100 });
if (subDir) {
const dir = path_1.default.join(configDirectory, subDir);
if (!fs_1.default.existsSync(dir)) {
fs_1.default.mkdirSync(dir);
}
trackLocation =
load === 'inPlace'
? location
: path_1.default.join(configDirectory, path_1.default.basename(location));
}
else if (local) {
this.error('Local file detected. Please select a load option for the track with the --load flag', { exit: 110 });
const location = argsTrack;
const isUrl = (loc) => loc.match(/^https?:\/\//);
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 (isUrl(location) && load) {
this.error('The --load flag is used for local files only, but a URL was provided', { exit: 100 });
}
else {
trackLocation = location;
else if (!isUrl(location) && !load) {
this.error(`The --load flag should be used if a local file is used, example --load
copy to copy the file into the config directory. Options for load are
copy/move/symlink/inPlace (inPlace for no file operations)`, { exit: 110 });
}
const adapter = this.guessAdapter(trackLocation, protocol);
if (adapter.type === 'UNKNOWN') {

@@ -48,3 +49,3 @@ this.error('Track type is not recognized', { exit: 120 });

// only add track if there is an existing config.json
const configContents = await this.readJsonFile(target);
const configContents = await this.readJsonFile(this.target);
if (!configContents.assemblies || !configContents.assemblies.length) {

@@ -59,27 +60,10 @@ this.error('No assemblies found. Please add one before adding tracks', {

// set up the track information
if (type) {
this.debug(`Type is: ${type}`);
}
else {
type = this.guessTrackType(adapter.type);
}
if (trackId) {
this.debug(`Track is :${trackId}`);
}
else {
trackId = path_1.default.basename(location, path_1.default.extname(location));
} // get filename and set as name
if (name) {
this.debug(`Name is: ${name}`);
}
else {
name = trackId;
}
if (assemblyNames) {
this.debug(`Assembly name(s) is :${assemblyNames}`);
}
else {
assemblyNames = configContents.assemblies[0].name;
this.log(`Inferred default assembly name ${assemblyNames}`);
}
type = type || this.guessTrackType(adapter.type);
trackId = trackId || path_1.default.basename(location, path_1.default.extname(location));
name = name || trackId;
assemblyNames = assemblyNames || configContents.assemblies[0].name;
this.debug(`Name is: ${name}`);
this.debug(`Type is: ${type}`);
this.debug(`Track is :${trackId}`);
this.debug(`Assembly name(s) is :${assemblyNames}`);
const configObj = config ? json_parse_better_errors_1.default(config) : {};

@@ -121,3 +105,3 @@ const trackConfig = Object.assign({ type,

this.debug(`Found existing trackId ${trackId} in configuration`);
if (runFlags.force || runFlags.overwrite) {
if (force || overwrite) {
this.debug(`Overwriting track ${trackId} in configuration`);

@@ -134,3 +118,3 @@ configContents.tracks[idx] = trackConfig;

// copy/symlinks/moves the track into the jbrowse installation directory
const filePaths = Object.values(this.guessFileNames(location));
const filePaths = Object.values(this.guessFileNames(location, index));
switch (load) {

@@ -142,3 +126,3 @@ case 'copy': {

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

@@ -153,3 +137,3 @@ }));

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

@@ -164,3 +148,3 @@ }));

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

@@ -171,76 +155,13 @@ }));

}
this.debug(`Writing configuration to file ${target}`);
await this.writeJsonFile(target, configContents);
this.log(`${idx !== -1 ? 'Overwrote' : 'Added'} track "${name}" ${idx !== -1 ? 'in' : 'to'} ${target}`);
this.debug(`Writing configuration to file ${this.target}`);
await this.writeJsonFile(this.target, configContents);
this.log(`${idx !== -1 ? 'Overwrote' : 'Added'} track "${name}" ${idx !== -1 ? 'in' : 'to'} ${this.target}`);
}
async resolveFileLocationWithProtocol(location, check = true, warn = false) {
let locationUrl;
let locationPath;
let locationObj;
try {
locationUrl = new URL(location);
}
catch (error) {
// ignore
}
if (locationUrl) {
let response;
try {
if (check) {
response = await node_fetch_1.default(locationUrl, { method: 'HEAD' });
}
if (!response || response.ok) {
locationObj = {
location: locationUrl.href,
protocol: 'uri',
local: false,
};
return locationObj;
}
}
catch (error) {
// ignore
}
}
try {
locationPath = await fs_1.promises.realpath(location);
}
catch (e) {
// ignore
}
if (locationPath) {
const filePath = path_1.default.relative(process.cwd(), locationPath);
if (warn && filePath.startsWith('..')) {
this.warn(`Location ${filePath} is not in the JBrowse directory. Make sure it is still in your server directory.`);
}
locationObj = {
location: filePath,
protocol: 'uri',
local: true,
};
return locationObj;
}
return this.error(`Could not resolve to a file or a URL: "${location}"`, {
exit: 180,
});
}
guessFileNames(fileName) {
guessFileNames(fileName, index) {
if (/\.bam$/i.test(fileName)) {
return {
file: fileName,
index: `${fileName}.bai`,
index: index || `${fileName}.bai`,
};
}
if (/\.bai$/i.test(fileName)) {
return {
file: fileName.replace(/\.bai$/i, ''),
index: fileName,
};
}
if (/\.bam.csi$/i.test(fileName)) {
return {
file: fileName.replace(/\.csi$/i, ''),
index: fileName,
};
}
if (/\.cram$/i.test(fileName)) {

@@ -252,8 +173,2 @@ return {

}
if (/\.crai$/i.test(fileName)) {
return {
file: fileName.replace(/\.crai$/i, ''),
index: fileName,
};
}
if (/\.gff3?$/i.test(fileName)) {

@@ -268,14 +183,2 @@ return {};

}
if (/\.gff3?\.b?gz.tbi$/i.test(fileName)) {
return {
file: fileName.replace(/\.tbi$/i, ''),
index: fileName,
};
}
if (/\.gff3?\.b?gz.csi$/i.test(fileName)) {
return {
file: fileName.replace(/\.csi$/i, ''),
index: fileName,
};
}
if (/\.gtf?$/i.test(fileName)) {

@@ -293,14 +196,2 @@ return {};

}
if (/\.vcf\.b?gz\.tbi$/i.test(fileName)) {
return {
file: fileName.replace(/\.tbi$/i, ''),
index: fileName,
};
}
if (/\.vcf\.b?gz\.csi$/i.test(fileName)) {
return {
file: fileName.replace(/\.csi$/i, ''),
index: fileName,
};
}
if (/\.vcf\.idx$/i.test(fileName)) {

@@ -313,10 +204,7 @@ return {};

if (/\.bed\.b?gz$/i.test(fileName)) {
return {};
return {
file: fileName,
index: index || `${fileName}.tbi`,
};
}
if (/\.bed.b?gz.tbi$/i.test(fileName)) {
return {};
}
if (/\.bed.b?gz.csi/i.test(fileName)) {
return {};
}
if (/\.bed\.idx$/i.test(fileName)) {

@@ -340,11 +228,5 @@ return {};

file: fileName,
index: `${fileName}.fai`,
index: index || `${fileName}.fai`,
};
}
if (/\.(fa|fasta|fna|mfa)\.fai$/i.test(fileName)) {
return {
file: fileName.replace(/\.fai$/i, ''),
index: fileName,
};
}
if (/\.(fa|fasta|fna|mfa)\.b?gz$/i.test(fileName)) {

@@ -357,16 +239,2 @@ return {

}
if (/\.(fa|fasta|fna|mfa)\.b?gz\.fai$/i.test(fileName)) {
return {
file: fileName.replace(/\.fai$/i, ''),
index: fileName,
index2: `${fileName.replace(/\.fai$/i, '')}.gzi`,
};
}
if (/\.(fa|fasta|fna|mfa)\.b?gz\.gzi$/i.test(fileName)) {
return {
file: fileName.replace(/\.gzi$/i, ''),
index: `${fileName.replace(/\.gzi$/i, '')}.fai`,
index2: fileName,
};
}
if (/\.2bit$/i.test(fileName)) {

@@ -395,6 +263,11 @@ return {

}
if (/\.paf$/i.test(fileName)) {
return {
file: fileName,
};
}
return {};
}
// find way to import this instead of having to paste it
guessAdapter(fileName, protocol) {
guessAdapter(fileName, protocol, index) {
function makeLocation(location) {

@@ -413,19 +286,8 @@ if (protocol === 'uri') {

bamLocation: makeLocation(fileName),
index: { location: makeLocation(`${fileName}.bai`) },
index: {
location: makeLocation(index || `${fileName}.bai`),
indexType: index && index.toUpperCase().endsWith('CSI') ? 'CSI' : 'BAI',
},
};
}
if (/\.bai$/i.test(fileName)) {
return {
type: 'BamAdapter',
bamLocation: makeLocation(fileName.replace(/\.bai$/i, '')),
index: { location: makeLocation(fileName) },
};
}
if (/\.bam.csi$/i.test(fileName)) {
return {
type: 'BamAdapter',
bamLocation: makeLocation(fileName.replace(/\.csi$/i, '')),
index: { location: makeLocation(fileName), indexType: 'CSI' },
};
}
if (/\.cram$/i.test(fileName)) {

@@ -438,9 +300,2 @@ return {

}
if (/\.crai$/i.test(fileName)) {
return {
type: 'CramAdapter',
cramLocation: makeLocation(fileName.replace(/\.crai$/i, '')),
craiLocation: makeLocation(fileName),
};
}
if (/\.gff3?$/i.test(fileName)) {

@@ -455,19 +310,8 @@ return {

gffGzLocation: makeLocation(fileName),
index: { location: makeLocation(`${fileName}.tbi`), indexType: 'TBI' },
index: {
location: makeLocation(index || `${fileName}.tbi`),
indexType: index && index.toUpperCase().endsWith('CSI') ? 'CSI' : 'TBI',
},
};
}
if (/\.gff3?\.b?gz.tbi$/i.test(fileName)) {
return {
type: 'Gff3TabixAdapter',
gffGzLocation: makeLocation(fileName.replace(/\.tbi$/i, '')),
index: { location: makeLocation(fileName), indexType: 'TBI' },
};
}
if (/\.gff3?\.b?gz.csi$/i.test(fileName)) {
return {
type: 'Gff3TabixAdapter',
gffGzLocation: makeLocation(fileName.replace(/\.csi$/i, '')),
index: { location: makeLocation(fileName), indexType: 'CSI' },
};
}
if (/\.gtf?$/i.test(fileName)) {

@@ -487,19 +331,8 @@ return {

vcfGzLocation: makeLocation(fileName),
index: { location: makeLocation(`${fileName}.tbi`), indexType: 'TBI' },
index: {
location: makeLocation(`${fileName}.tbi`),
indexType: index && index.toUpperCase().endsWith('CSI') ? 'CSI' : 'TBI',
},
};
}
if (/\.vcf\.b?gz\.tbi$/i.test(fileName)) {
return {
type: 'VcfTabixAdapter',
vcfGzLocation: makeLocation(fileName.replace(/\.tbi$/i, '')),
index: { location: makeLocation(fileName), indexType: 'TBI' },
};
}
if (/\.vcf\.b?gz\.csi$/i.test(fileName)) {
return {
type: 'VcfTabixAdapter',
vcfGzLocation: makeLocation(fileName.replace(/\.csi$/i, '')),
index: { location: makeLocation(fileName), indexType: 'CSI' },
};
}
if (/\.vcf\.idx$/i.test(fileName)) {

@@ -517,20 +350,10 @@ return {

return {
type: 'UNSUPPORTED',
type: 'BedTabixAdapter',
bedGzLocation: makeLocation(fileName),
index: {
location: makeLocation(`${fileName}.tbi`),
indexType: index && index.toUpperCase().endsWith('CSI') ? 'CSI' : 'TBI',
},
};
}
if (/\.bed.b?gz.tbi$/i.test(fileName)) {
return {
type: 'UNSUPPORTED',
};
}
if (/\.bed.b?gz.csi/i.test(fileName)) {
return {
type: 'UNSUPPORTED',
};
}
if (/\.bed\.idx$/i.test(fileName)) {
return {
type: 'UNSUPPORTED',
};
}
if (/\.(bb|bigbed)$/i.test(fileName)) {

@@ -552,12 +375,5 @@ return {

fastaLocation: makeLocation(fileName),
faiLocation: makeLocation(`${fileName}.fai`),
faiLocation: makeLocation(index || `${fileName}.fai`),
};
}
if (/\.(fa|fasta|fna|mfa)\.fai$/i.test(fileName)) {
return {
type: 'IndexedFastaAdapter',
fastaLocation: makeLocation(fileName.replace(/\.fai$/i, '')),
faiLocation: makeLocation(fileName),
};
}
if (/\.(fa|fasta|fna|mfa)\.b?gz$/i.test(fileName)) {

@@ -571,18 +387,2 @@ return {

}
if (/\.(fa|fasta|fna|mfa)\.b?gz\.fai$/i.test(fileName)) {
return {
type: 'BgzipFastaAdapter',
fastaLocation: makeLocation(fileName.replace(/\.fai$/i, '')),
faiLocation: makeLocation(fileName),
gziLocation: makeLocation(`${fileName.replace(/\.fai$/i, '')}.gzi`),
};
}
if (/\.(fa|fasta|fna|mfa)\.b?gz\.gzi$/i.test(fileName)) {
return {
type: 'BgzipFastaAdapter',
fastaLocation: makeLocation(fileName.replace(/\.gzi$/i, '')),
faiLocation: makeLocation(`${fileName.replace(/\.gzi$/i, '')}.fai`),
gziLocation: makeLocation(fileName),
};
}
if (/\.2bit$/i.test(fileName)) {

@@ -602,3 +402,3 @@ return {

type: 'NCListAdapter',
rootUrlTemplate: fileName,
rootUrlTemplate: makeLocation(fileName),
};

@@ -618,2 +418,8 @@ }

}
if (/\.paf/i.test(fileName)) {
return {
type: 'PafAdapter',
pafLocation: makeLocation(fileName),
};
}
return {

@@ -688,2 +494,3 @@ type: 'UNKNOWN',

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

@@ -719,2 +526,5 @@ return known[adapterType] || 'BasicTrack';

}),
indexFile: command_1.flags.string({
description: 'Optional index file for the track',
}),
description: command_1.flags.string({

@@ -736,4 +546,10 @@ char: 'd',

description: 'path to config file in JB2 installation to write out to.',
default: './config.json',
}),
out: command_1.flags.string({
description: 'synonym for target',
}),
subDir: command_1.flags.string({
description: 'when using --load a file, output to a subdirectory of the target dir',
default: '',
}),
help: command_1.flags.help({ char: 'h' }),

@@ -758,2 +574,6 @@ trackId: command_1.flags.string({

}),
protocol: command_1.flags.string({
description: 'Force protocol to a specific value',
default: 'uri',
}),
};
import { flags } from '@oclif/command';
import JBrowseCommand from '../base';
export default class AdminServer extends JBrowseCommand {
private target;
static description: string;

@@ -8,3 +9,4 @@ static examples: string[];

port: flags.IOptionFlag<string | undefined>;
target: flags.IOptionFlag<string>;
target: flags.IOptionFlag<string | undefined>;
out: flags.IOptionFlag<string | undefined>;
skipCheck: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;

@@ -11,0 +13,0 @@ help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;

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

const command_1 = require("@oclif/command");
const fs_1 = tslib_1.__importDefault(require("fs"));
const fs_1 = tslib_1.__importStar(require("fs"));
const crypto_1 = tslib_1.__importDefault(require("crypto"));
const path_1 = tslib_1.__importDefault(require("path"));
const express_1 = tslib_1.__importDefault(require("express"));
const cors_1 = tslib_1.__importDefault(require("cors"));
const base_1 = tslib_1.__importDefault(require("../base"));

@@ -21,5 +21,5 @@ function isValidPort(port) {

const { flags: runFlags } = this.parse(AdminServer);
if (!runFlags.skipCheck) {
await this.checkLocation(path_1.default.dirname(runFlags.target));
}
const output = runFlags.target || runFlags.out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;
// check if the config file exists, if none exists write default

@@ -35,7 +35,7 @@ const defaultConfig = {

};
if (fs_1.default.existsSync(runFlags.target)) {
this.debug(`Found existing config file ${runFlags.target}`);
if (fs_1.default.existsSync(this.target)) {
this.debug(`Found existing config file ${this.target}`);
}
else {
this.debug(`Creating config file ${runFlags.target}`);
this.debug(`Creating config file ${this.target}`);
await this.writeJsonFile('./config.json', defaultConfig);

@@ -56,2 +56,3 @@ }

app.use(express_1.default.static('.'));
app.use(cors_1.default());
// POST route to save config

@@ -64,3 +65,3 @@ app.use(express_1.default.json());

try {
await this.writeJsonFile(runFlags.target, req.body.config);
await this.writeJsonFile(this.target, req.body.config);
res.send('Config written to disk');

@@ -89,3 +90,3 @@ }

const server = app.listen(port);
this.log(`Navigate to http://localhost:${port}?adminKey=${adminKey} to configure your JBrowse installation graphically.`);
this.log(`Navigate to http://localhost:${port}?adminKey=${adminKey} to configure your JBrowse installation graphically.\n\nIf you are running yarn start you can launch http://localhost:3000?adminKey=${adminKey}&adminServer=http://localhost:${port}/updateConfig`);
}

@@ -103,4 +104,6 @@ }

description: 'path to config file in JB2 installation directory to write out to.\nCreates ./config.json if nonexistent',
default: './config.json',
}),
out: command_1.flags.string({
description: 'synonym for target',
}),
skipCheck: command_1.flags.boolean({

@@ -107,0 +110,0 @@ description: "Don't check whether or not you are in a JBrowse directory",

import { flags } from '@oclif/command';
import JBrowseCommand from '../base';
export default class SetDefaultSession extends JBrowseCommand {
private target;
static description: string;

@@ -14,3 +15,4 @@ static examples: string[];

currentSession: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
target: flags.IOptionFlag<string>;
target: flags.IOptionFlag<string | undefined>;
out: flags.IOptionFlag<string | undefined>;
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;

@@ -17,0 +19,0 @@ };

@@ -6,3 +6,2 @@ "use strict";

const fs_1 = require("fs");
const path_1 = tslib_1.__importDefault(require("path"));
const json_parse_better_errors_1 = tslib_1.__importDefault(require("json-parse-better-errors"));

@@ -14,5 +13,7 @@ const base_1 = tslib_1.__importDefault(require("../base"));

const { flags: runFlags } = this.parse(SetDefaultSession);
const { session, name, tracks, currentSession, view, viewId, target, } = runFlags;
await this.checkLocation(path_1.default.dirname(target));
const configContents = await this.readJsonFile(target);
const { session, name, tracks, currentSession, view, viewId } = runFlags;
const output = runFlags.target || runFlags.out || '.';
const isDir = (await fs_1.promises.lstat(output)).isDirectory();
this.target = isDir ? `${output}/config.json` : output;
const configContents = await this.readJsonFile(this.target);
// if user passes current session flag, print out and exit

@@ -67,5 +68,5 @@ if (currentSession) {

}
this.debug(`Writing configuration to file ${target}`);
await this.writeJsonFile(target, configContents);
this.log(`${existingDefaultSession ? 'Overwrote' : 'Added'} defaultSession "${name}" ${existingDefaultSession ? 'in' : 'to'} ${target}`);
this.debug(`Writing configuration to file ${this.target}`);
await this.writeJsonFile(this.target, configContents);
this.log(`${existingDefaultSession ? 'Overwrote' : 'Added'} defaultSession "${name}" ${existingDefaultSession ? 'in' : 'to'} ${this.target}`);
}

@@ -129,4 +130,6 @@ async readDefaultSessionFile(defaultSessionFile) {

description: 'path to config file in JB2 installation directory to write out to',
default: './config.json',
}),
out: command_1.flags.string({
description: 'synonym for target',
}),
help: command_1.flags.help({

@@ -133,0 +136,0 @@ char: 'h',

@@ -5,2 +5,4 @@ "use strict";

const command_1 = require("@oclif/command");
const fs_1 = tslib_1.__importDefault(require("fs"));
const path_1 = tslib_1.__importDefault(require("path"));
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));

@@ -20,3 +22,9 @@ const unzipper_1 = tslib_1.__importDefault(require("unzipper"));

this.debug(`Want to upgrade at: ${argsPath}`);
await this.checkLocation(argsPath);
if (!argsPath) {
this.error(`No directory supplied`, { exit: 100 });
}
if (!fs_1.default.existsSync(path_1.default.join(argsPath, 'manifest.json'))) {
this.error(`No manifest.json found in this directory, are you sure it is an
existing jbrowse 2 installation?`, { exit: 10 });
}
const locationUrl = url || (tag ? await this.getTag(tag) : await this.getLatest());

@@ -23,0 +31,0 @@ this.log(`Fetching ${locationUrl}...`);

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

{"version":"0.0.1-beta.25","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","default":"./config.json"},"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.","default":"./config.json"},"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","default":"./config.json"}},"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"},"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.","default":"./config.json"},"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}},"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","default":"./config.json"},"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","default":"./config.json"},"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":"0.0.1-beta.26","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": "0.0.1-beta.25",
"version": "0.0.1-beta.26",
"description": "A command line tool for working with JBrowse 2",

@@ -40,2 +40,3 @@ "keywords": [

"@oclif/plugin-help": "^3",
"cors": "^2.8.5",
"express": "^4.17.1",

@@ -62,3 +63,3 @@ "json-parse-better-errors": "^1.0.2",

},
"gitHead": "45e5bba2d3faa803f9e476a98e2d75b659b35cd6"
"gitHead": "2db6647570da2d35c028e6e8c2ecf2bb76d5fd38"
}

@@ -100,2 +100,5 @@ ---

--out=out
synonym for target
--overwrite

@@ -120,3 +123,3 @@ Overwrite existing assembly if one with the same name exists

--target=target
[default: ./config.json] path to config file in JB2 installation directory to write out to.
path to config file in JB2 installation directory to write out to.
Creates ./config.json if nonexistent

@@ -134,3 +137,3 @@

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

@@ -168,2 +171,4 @@ ## `jbrowse add-connection CONNECTIONURLORPATH`

--out=out synonym for target
--overwrite Overwrites any existing connections if same connection id

@@ -174,4 +179,3 @@

--target=target [default: ./config.json] path to config file in JB2 installation directory to write
out to.
--target=target path to config file in JB2 installation directory to write out to.

@@ -190,3 +194,3 @@ EXAMPLES

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

@@ -227,10 +231,17 @@ ## `jbrowse add-track TRACK`

--indexFile=indexFile Optional index file for the track
--out=out synonym for target
--overwrite Overwrites existing track if it shares the same trackId
--protocol=protocol [default: uri] Force protocol to a specific value
--skipCheck Skip check for whether or not the file or URL exists or if you are in a JBrowse
directory
--target=target [default: ./config.json] path to config file in JB2 installation to write out
to.
--subDir=subDir when using --load a file, output to a subdirectory of the target dir
--target=target path to config file in JB2 installation to write out to.
--trackId=trackId trackId for the track, by default inferred from filename, must be unique

@@ -248,3 +259,3 @@ throughout config

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

@@ -264,4 +275,5 @@ ## `jbrowse add-track-json TRACK`

-u, --update update the contents of an existing track, matched based on trackId
--out=out synonym for target
--target=target [default: ./config.json] path to config file in JB2 installation directory to write out to.
--target=target path to config file in JB2 installation directory to write out to.
Creates ./config.json if nonexistent

@@ -274,3 +286,3 @@

_See code: [src/commands/add-track-json.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%400.0.1-beta.25/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%400.0.1-beta.26/products/jbrowse-cli/src/commands/add-track-json.ts)_

@@ -291,5 +303,7 @@ ## `jbrowse admin-server`

--out=out synonym for target
--skipCheck Don't check whether or not you are in a JBrowse directory
--target=target [default: ./config.json] path to config file in JB2 installation directory to write out to.
--target=target path to config file in JB2 installation directory to write out to.
Creates ./config.json if nonexistent

@@ -302,3 +316,3 @@

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

@@ -334,3 +348,3 @@ ## `jbrowse create LOCALPATH`

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

@@ -373,4 +387,6 @@ ## `jbrowse help [COMMAND]`

--target=target [default: ./config.json] path to config file in JB2 installation directory to write out to
--out=out synonym for target
--target=target path to config file in JB2 installation directory to write out to
--viewId=viewId Identifier for the view. Will be generated on default

@@ -386,3 +402,3 @@

_See code: [src/commands/set-default-session.ts](https://github.com/GMOD/jbrowse-components/blob/%40jbrowse%2Fcli%400.0.1-beta.25/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%400.0.1-beta.26/products/jbrowse-cli/src/commands/set-default-session.ts)_

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

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

@@ -420,0 +436,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc