diff --git a/products/jbrowse-cli/README.md b/products/jbrowse-cli/README.md index 4d565b5f75..b835a24d1f 100644 --- a/products/jbrowse-cli/README.md +++ b/products/jbrowse-cli/README.md @@ -217,7 +217,7 @@ OPTIONS -n, --name=name Name of the track. Will be defaulted to the trackId if none specified - -t, --type=type Type of track, by default inferred from track file + -t, --trackType=trackType Type of track, by default inferred from track file --category=category Optional Comma separated string of categories to group tracks @@ -246,7 +246,7 @@ 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 --trackType 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"}' ``` diff --git a/products/jbrowse-cli/src/commands/add-track.ts b/products/jbrowse-cli/src/commands/add-track.ts index 88562b2c5e..7aeb2b649b 100644 --- a/products/jbrowse-cli/src/commands/add-track.ts +++ b/products/jbrowse-cli/src/commands/add-track.ts @@ -208,18 +208,18 @@ export default class AddTrack extends JBrowseCommand { } // set up the track information - const type = trackType || this.guessTrackType(adapter.type) + trackType = trackType || this.guessTrackType(adapter.type) trackId = trackId || path.basename(location, path.extname(location)) name = name || trackId assemblyNames = assemblyNames || configContents.assemblies[0].name this.debug(`Name is: ${name}`) - this.debug(`Type is: ${type}`) + this.debug(`Type is: ${trackType}`) this.debug(`Track is :${trackId}`) this.debug(`Assembly name(s) is :${assemblyNames}`) const configObj = config ? parseJSON(config) : {} const trackConfig: Track = { - type, + type: trackType, trackId, name, category: category ? category.split(',').map(c => c.trim()) : undefined, @@ -235,7 +235,7 @@ export default class AddTrack extends JBrowseCommand { } // any special track modifications go here - switch (type) { + switch (trackType) { case 'AlignmentsTrack': { const assembly = configContents.assemblies.find( asm => asm.name === assemblyNames,