Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
defaultTracks in config as a comma list not parsed in 1.12.3 #892
We have defaultTracks in trackList.json as a comma separated list:
With JBrowse v1.12.3, and a newly emptied browser and cookie store, when I attempt to load a genome with just the data parameter (which should trigger those defaults), I instead only receive the DNA track.
The new logic in Browser.js is the culprit from lines 190 to 202.
The first time through with a new page load and no cookie set triggered the
block at line 192 is entered, but the type check
on line 197 fails and does not populate tracksToShow as intended. This leaves only the unconfigured default of "DNA"
I'm not familiar with what would alter the config value to be an array rather than string, but this slightly different syntax restores correct use of defaultTracks in regular JBrowse 1.12.3 for me.
I'm happy to submit a pull request for this minor change if that looks good.
Looking at this again, my fix always adds defaultTracks to the trackToShow list, but Eric's original intention seems to only concat() if not an array. I think my proposal might end up building an array like [ "track1", "track2, track3" ] for Apollo default tracksToShow, which would be obviously wrong.
@cmdcolin 's extra enclosing () fixes this for me in a dev build of v1.12.3 and is the proper patch.
@erasche what do you think?