jbrowse-components
jbrowse-components copied to clipboard
How to set the defaultsession of gff file and vcf file?
Hello, I recently wanted to add the code of the default session to the jbrowse2 I deployed, but the defaultsession of the gff and vcf files has not been added, so I want to ask? Looking forward to reply
my code
defaultSession: {
name: 'my session',
view: {
id: 'linearGenomeView',
type: 'LinearGenomeView',
tracks: [
{
id: 'IpTYJKmsp',
type: 'ReferenceSequenceTrack',
configuration: 'GRCm38-ReferenceSequenceTrack',
displays: [
{
id: 's877wHWtzD',
type: 'LinearReferenceSequenceDisplay',
configuration:
'GRCm38-ReferenceSequenceTrack-LinearReferenceSequenceDisplay',
},
],
},
{
id: 'KHwe41KXk',
type: 'FeatureTrack',
configuration: 'volvox1.sorted.gff3',
displays: [
{
id: '_-kwYVczT8',
type: 'LinearFeatureTrackDisplay',
configuration:
'volvox1.sorted.gff3-LinearFeatureTrackDisplay',
height: 250,
},
],
},
],
},
},
Hello, I would like to ask, vcf file, the default display session is liner xx ?
One way to create a default session is probably to browse to the place that you want in the browser, use File->Export session, and copy the contents of that into your config.json file. Currently sessions are a bit hard to hand edit but possibly we will make a more easily "hand editable" method using the "session spec" ...right now you can use session spec from the URL bar (see here https://jbrowse.org/jb2/docs/urlparams/)
Hello, I solved this problem, but I added the code of defaultsession to the page, and I didn't use the method you gave. Will there be any problems with this operation?
my code defaultSession: { name: 'my session', view: { id: 'linearGenomeView', type: 'LinearGenomeView', tracks: [ { type: 'FeatureTrack', configuration: 'volvox1.sorted.gff3', displays: [ { type: 'LinearBasicDisplay', configuration: 'volvox1.sorted.gff3-LinearBasicDisplay', height:185 }, ], }, ], }, }, })
that looks fine:)
can probably close for now, let us know if there is anything else