jbrowse-components icon indicating copy to clipboard operation
jbrowse-components copied to clipboard

How to set the defaultsession of gff file and vcf file?

Open ouyang-lang opened this issue 1 year ago • 4 comments

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,
                  },
                ],
              },
            ],
          },
        },

ouyang-lang avatar Aug 09 '22 02:08 ouyang-lang

Hello, I would like to ask, vcf file, the default display session is liner xx ?

ouyang-lang avatar Aug 09 '22 07:08 ouyang-lang

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/)

cmdcolin avatar Aug 09 '22 12:08 cmdcolin

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 }, ], }, ], }, }, })

ouyang-lang avatar Aug 09 '22 13:08 ouyang-lang

that looks fine:)

cmdcolin avatar Aug 09 '22 13:08 cmdcolin

can probably close for now, let us know if there is anything else

cmdcolin avatar Aug 19 '22 19:08 cmdcolin