Git Product home page Git Product logo

arabidopsis-information-portal / combotrackselector Goto Github PK

View Code? Open in Web Editor NEW
7.0 8.0 4.0 289 KB

Plugin to allow the co-existence of the Hierarchical and Faceted Track Selectors in the GMOD JBrowse Genome Browser

Home Page: https://gmod.github.io/jbrowse-registry/demos/JBrowse-1.12.1/?data=../combotrackselector&loc=Chr1:25097503..25120860&tracks=DNA,Genes,1005,159,1013,285,1201

License: MIT License

CSS 27.99% JavaScript 72.01%
jbrowse jbrowse-plugin

combotrackselector's Introduction

AIP ComboTrackSelector v1.0

Description

ComboTrackSelector is a JBrowse plugin that enables both the Hierarchical and Faceted track selectors to co-exist within the scope of JBrowse. The plugin allows for the segregation of the available tracks between the two selectors, which can be customized based on amount of track metadata (e.g. tracks with multiple metadata aspects/facets can be restricted to the Faceted selector only).

The following steps explain how the ComboTrackSelect plugin can be installed and configured to work with JBrowse:

  • First, prepare a trackList.json file for tracks which should appear only in the Hierarchical track selector. An example of such a config file used by the Araport project: trackList.json

  • Second, prepare a trackList2.json file for tracks which should appear only in the Faceted track selector. An example of such a config file as used by the Araport project: trackList2.json

  • Third, prepare a csv or json formatted file of track metadata, associated with the set of tracks set up to appear in the Faceted selector. Examples of such config files as used by the Araport project: epiccogeMetaData.csv or epiccogeMetaData.json.
    The trackList2.json config file should have an appropriately configured trackMetadata: { } stanza like so:

      {
      	"tracks" : {},
      	"dataRoot" : "arabidopsis",
      	"trackMetadata": {
      		"sources": [
      		{
      			"url": "{dataRoot}/epiccogeMetaData.json",
      			"type": "json"
      		}
      	],
      	"indexFacets": [
      		"Lab Name",
      		"Type",
      		"Platform",
      		:
      		:
      	]
      	}
      }
    
  • Finally, the plugin can be enabled using either ONE OF the following methods (see official JBrowse documentation on using plugins):

tracks.conf

	[plugins]
	ComboTrackSelector.location += ./plugins/ComboTrackSelector
	ComboTrackSelector.icon += https://gravatar.com/avatar/f5ae7bbffab5fbd56777fee2720c7ee4.png

trackList.json

	"plugins": [
		{
			"name" : "ComboTrackSelector",
			"location" : "./plugins/ComboTrackSelector",
			"icon" : "https://gravatar.com/avatar/f5ae7bbffab5fbd56777fee2720c7ee4.png"
		}
	]

Once enabled and configured correctly, the ComboTrackSelector should appear as seen below:

ComboTrackSelector Screeshot

Contributors


If you have any questions regarding the usage of this plugin, please write to mailto:[email protected]

combotrackselector's People

Contributors

abretaud avatar agnespychan avatar msarmien avatar vivekkrish avatar ywchoi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

combotrackselector's Issues

ComboTrackSelector fails on JBrowse 1.13.1-alpha.0.

It seems as if the following code in main.js is causing an issue by trying to "clone" a config which leads to an error:

        // load all the classes we need
        require( [ tl_class ],
                 lang.hitch( this, function( trackListClass ) {
                     // instantiate the tracklist and the track metadata object
                     this.trackListView = new trackListClass(
                         lang.mixin(
                             lang.clone( newconfig.trackSelector ) || {},
                             {
                                 trackConfigs: newconfig.tracks,
                                 browser: this,
                                 trackMetaData: this.trackMetaDataStore
                             }
                         )
                     );

solynta_jbrowse_chr02_12401705__12401861

ComboTrackSelector fails in JBrowse-1.14.0-dev and above

When trying to load the plugin it fails to display properly in the hierarchical track selector pane. See my screenshot below of my test space in JBrowse where I test this plugin. The plugin seems to function ok, in terms of the faceted button going to the faceted track selector succesfully and loading the metadata correctly but when the button is drawn it is blocking part of the main tracklist pane.

Can you fix this please? This issue wasn't present for JBrowse-1.13-1-dev.

Thanks,

Vaneet

faceted_screenshot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.