Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
321 changed files
with
31,230 additions
and
3,329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
ApolloLabelProc is a JBrowse plugin. | ||
Update location bar with 'label' (if it exists), when the locationBar content is JSON, which is expected from Apollo. | ||
Install / Activate: | ||
|
||
For JBrowse 1.11.6+, copy the ApolloLabelProc directory to the 'plugins' directory. | ||
Add this to appropriate trackList.json under the plugins section (create one if it doesn't exist): | ||
|
||
"plugins": [ | ||
"ApolloLabelProc" | ||
], | ||
|
||
For Apollo 2.x, copy the ApolloLabelProc directory to the web-apps/jbrowse/plugins directory. | ||
Add this to web-apps/jbrowse/plugins/WebApollo/json/annot.json: | ||
|
||
"plugins" : [ | ||
{ | ||
"location" : "./plugins/WebApollo", | ||
"name" : "WebApollo" | ||
}, | ||
{ | ||
"location" : "./plugins/ApolloLabelProc", | ||
"name" : "ApolloLabelProc" | ||
} | ||
], |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* ApolloLabelProc | ||
* Update location bar with label (if it exists), when the locationBar content is JSON, which is expected from Apollo. | ||
*/ | ||
|
||
define([ | ||
'dojo/_base/declare', | ||
'dojo/_base/lang', | ||
'dojo/Deferred', | ||
'JBrowse/Plugin', | ||
'JBrowse/Util' | ||
], | ||
function( | ||
declare, | ||
lang, | ||
Deferred, | ||
JBrowsePlugin, | ||
Util | ||
) { | ||
return declare( JBrowsePlugin, | ||
{ | ||
constructor: function( args ) { | ||
console.log("plugin: ApolloLabelProc"); | ||
var counter = 0 ; | ||
|
||
var thisB = this; | ||
|
||
var currentBookmark ; | ||
|
||
// this traps the event that happens directly after onCoarseMove function, where the label gets updates. | ||
dojo.subscribe("/jbrowse/v1/n/navigate", function(currRegion){ | ||
var locationStr = Util.assembleLocStringWithLength( currRegion ); | ||
//console.log("locationStr="+locationStr); | ||
|
||
// is locationStr JSON? | ||
if (locationStr.charAt(0)=='{') { | ||
locationStr = locationStr.substring(0,locationStr.lastIndexOf('}')+1); | ||
var obj = JSON.parse(locationStr); | ||
|
||
// look for the "label" property | ||
if(obj.hasOwnProperty('sequenceList')) { | ||
//console.log("label="+obj.label); | ||
currentBookmark = obj ; | ||
|
||
// if( thisB.browser.locationBox ){ | ||
// // thisB.browser.locationBox.set('value',obj.label, false); | ||
// // dojo.style(dojo.byId('widget_location'), "display", "none"); | ||
// dojo.style(dojo.byId('widget_location'), "width", "0"); | ||
// } | ||
|
||
dojo.addOnLoad(function() { | ||
// console.log(borderContainer); | ||
|
||
if(counter==0){ | ||
var searchBox = dojo.byId('search-box'); | ||
dojo.style(searchBox, "display", "none"); | ||
if(obj.hasOwnProperty("label")){ | ||
// TODO: add something next to search-box that displays something slightly different | ||
// bookmark name + location . . . pasting it in should call browser "GO" function | ||
// should call Browser.navigateTo . . with the browser location stuff | ||
// we cann actually store the bookmark data here | ||
|
||
} | ||
var borderContainer = dijit.byId('GenomeBrowser'); | ||
borderContainer.resize(); | ||
} | ||
counter = 1 ; | ||
|
||
// dojo.style(dojo.byId('search-refseq'), "display", "none"); | ||
}); | ||
|
||
} | ||
else{ | ||
currentBookmark = null ; | ||
} | ||
} | ||
|
||
}); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.