Skip to content

Commit

Permalink
Merge pull request #1565 from GMOD/tracktype_option
Browse files Browse the repository at this point in the history
Rename jbrowse cli add-track --type to --trackType
  • Loading branch information
rbuels authored Dec 17, 2020
2 parents 8f968fb + f783144 commit 2de8847
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion products/jbrowse-cli/src/commands/add-track.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ describe('add-track', () => {
'customTrackId',
'--description',
'new description',
'--type',
'--trackType',
'CustomTrackType',
'--category',
'newcategory',
Expand Down
8 changes: 4 additions & 4 deletions products/jbrowse-cli/src/commands/add-track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class AddTrack extends JBrowseCommand {
'$ 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"}'`,
]
Expand All @@ -53,7 +53,7 @@ export default class AddTrack extends JBrowseCommand {
]

static flags = {
type: flags.string({
trackType: flags.string({
char: 't',
description: `Type of track, by default inferred from track file`,
}),
Expand Down Expand Up @@ -143,7 +143,7 @@ export default class AddTrack extends JBrowseCommand {
const isDir = (await fsPromises.lstat(output)).isDirectory()
this.target = isDir ? `${output}/config.json` : output

let { type, trackId, name, assemblyNames } = runFlags
let { trackType, trackId, name, assemblyNames } = runFlags

const configDirectory = path.dirname(this.target)
if (!argsTrack) {
Expand Down Expand Up @@ -208,7 +208,7 @@ export default class AddTrack extends JBrowseCommand {
}

// set up the track information
type = type || this.guessTrackType(adapter.type)
const type = trackType || this.guessTrackType(adapter.type)
trackId = trackId || path.basename(location, path.extname(location))
name = name || trackId
assemblyNames = assemblyNames || configContents.assemblies[0].name
Expand Down

0 comments on commit 2de8847

Please sign in to comment.