GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
460 stars 199 forks source link

Enable multiple URL templates in single track, or improve combination track exporting #1067

Open FredericBGA opened 6 years ago

FredericBGA commented 6 years ago

Just like GGB

Simply provide the feature option with a space-delimited list of the features you want to include. For >example:

feature = gene:sgd stRNA:sgd

it's not the same need as #68

I would like to be able to display all features of the same type in a single track (ie : SNPs)

cmdcolin commented 6 years ago

This has been done by varying the "glyph" attribute in trackList.json with a callback to return a different glyph depending on feature type. I think @scottcain at wormbase did this

The "glyph" can be a function callback, and that allows you to switch on feature.get('type')

It could be made easier in some sense like the configuration from gbrowse/ggb that you show. Is this an accurate assesment of the issue? If you have something particular about "how" the data is displayed as different feature types in the same track I'd be curious

FredericBGA commented 6 years ago

Sorry, my explanations (and the title) are confusing. I would like to be able to display the same feature type from different sources ie: SNPs from one project 1 and SNPs from project 2 have their own track and are also display in a single track.

It was possible to do that with GGB (several type:source and the same glyph for all):

feature = repeat:MIPS_REcat repeat:MTEC similarity:RepeatMasker repeat_region:tallymer glyph = segments

maybe something like this with JBrowse:

"urlTemplate" : ["tracks/SNP1/{refseq}/trackData.jsonz", "tracks/SNP2/{refseq}/trackData.jsonz"]

cmdcolin commented 6 years ago

Are they different samples and you want to display them in the same track? Just curious if something like https://github.com/elsiklab/multivariantviewer is of interest since we're talking about snp data

rbuels commented 6 years ago

@FredericBGA There's no way to have a track have more than one data source in regular JBrowse, you would might want to just format another track that has data from both the SNP1 and SNP2 projects, or you could see if any of the plugins address this.

FredericBGA commented 6 years ago

Thank you for your answers. This idea of this is to avoid formating another track, users with enougth skills (and access rigths !) can easily do that using bedtools, on the server. This could help other users (no skills and/or no access to data) to mine the data. Thank you for pointing me to the multivariant viewer , it matches our needs for SNPs. The combinaison track can be also a way to do what I need. But I loose all tags data when I try to export. I tried to explain that here: jbrowse list