Skip to content

Commit

Permalink
Fix lint from add-track
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 19, 2020
1 parent 69e98e4 commit 0808be9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions products/jbrowse-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"}'
```
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 @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 0808be9

Please sign in to comment.