Skip to content

Commit

Permalink
Merge c9e4714 into 4fc0649
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Jan 22, 2019
2 parents 4fc0649 + c9e4714 commit 08a4039
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 22 deletions.
11 changes: 6 additions & 5 deletions apollo
Expand Up @@ -7,13 +7,13 @@ function usage(){
echo "Production Commands:";
echo "";
echo "deploy: Builds war file (no processing of javascript) into the target directory.";
echo "install-tools: Installs JBrowse tools in the ./bin directory if not preset."
echo "jbrowse-tools: Installs JBrowse tools in the ./bin directory if not preset."
echo "run-local <port>: Runs from current directory, but not in dev-mode. ";
echo "help: This message.";
echo "";
echo "Development Commands:";
echo "devmode: Runs from current directory debug mode (non-minimized javascript).";
echo "jbrowse: Installs updated client/apollo files and JBrowse.";
echo "jbrowse: Installs updated client/apollo files and JBrowse for the web.";
echo "run-app <port>: Runs from current directory, but does not compile annotator panel (you have to run run-local once first).";
echo "test: Runs test-suite.";
echo "debug: Runs from cuurent directory in debug mode (non-minimized javascript).";
Expand Down Expand Up @@ -207,10 +207,11 @@ if [[ $1 == "devmode" ]];then
check_configs
$gradle_executable installJBrowseWebOnly devmode &
$grails_executable -reloading run-app
elif [[ $1 == "install-tools" ]];then
elif [[ $1 == "jbrowse-tools" ]];then
check_configs
check_perldependencies
$gradle_executable installJBrowseLocal
$gradle_executable installJBrowseWebOnly
rm -rf bin
ln -s jbrowse/bin bin
elif [[ $1 == "run-local" ]];then
check_configs
if [[ $# == 2 ]]; then
Expand Down
7 changes: 0 additions & 7 deletions build.gradle
Expand Up @@ -128,13 +128,6 @@ task cloneRepo3(dependsOn: evaluateJBrowseConfigs) {
}
}

task installJBrowseLocal(type: Exec) {
doLast{
workingDir = '.'
commandLine './install_jbrowse.sh'
}
}

//task copyResourcesDev(dependsOn: installJBrowse) {
task copyResourcesDev() {
doLast {
Expand Down
11 changes: 9 additions & 2 deletions client/apollo/js/TrackConfigTransformer.js
Expand Up @@ -13,12 +13,19 @@ constructor: function( args ) {
this.transformers=[];
var browser=args.browser;
this.overridePlugins=browser.config.overridePlugins;
this.transformers["NeatHTMLFeatures/View/Track/NeatFeatures"] = function(trackConfig) {
trackConfig.type = "WebApollo/View/Track/DraggableNeatHTMLFeatures";
};
// have to set this explicitly if you want undecorated features
// trackConfig.type = "WebApollo/View/Track/DraggableHTMLFeatures";
// and configure the jbrowse plugin off
this.transformers["JBrowse/View/Track/HTMLFeatures"] = function(trackConfig) {
trackConfig.type = "WebApollo/View/Track/DraggableHTMLFeatures";
trackConfig.type = "WebApollo/View/Track/DraggableNeatHTMLFeatures";
};

// trackConfig.type = "WebApollo/View/Track/WebApolloCanvasFeatures";
this.transformers["JBrowse/View/Track/CanvasFeatures"] = function(trackConfig) {
trackConfig.type = "WebApollo/View/Track/WebApolloCanvasFeatures";
trackConfig.type = "WebApollo/View/Track/WebApolloNeatCanvasFeatures";
};

this.transformers["JBrowse/View/Track/HTMLVariants"] = function(trackConfig) {
Expand Down
2 changes: 1 addition & 1 deletion client/apollo/js/View/Track/AnnotTrack.js
Expand Up @@ -25,7 +25,7 @@ define([
'dojox/grid/DataGrid',
'dojox/grid/cells/dijit',
'dojo/data/ItemFileWriteStore',
'WebApollo/View/Track/DraggableHTMLFeatures',
'WebApollo/View/Track/DraggableNeatHTMLFeatures',
'WebApollo/FeatureSelectionManager',
'WebApollo/JSONUtils',
'WebApollo/BioFeatureUtils',
Expand Down
22 changes: 22 additions & 0 deletions client/apollo/js/View/Track/DraggableNeatHTMLFeatures.js
@@ -0,0 +1,22 @@

define( [
'dojo/_base/declare',
'dojo/_base/array',
'NeatHTMLFeatures/View/Track/NeatFeatures',
'WebApollo/View/Track/DraggableHTMLFeatures'
],
function( declare,
array,
NeatFeatureTrack,
HTMLFeatureTrack
) {


var draggableTrack = declare( [NeatFeatureTrack,HTMLFeatureTrack],{
constructor: function(args) { }

});

return draggableTrack;
});

24 changes: 24 additions & 0 deletions client/apollo/js/View/Track/WebApolloNeatCanvasFeatures.js
@@ -0,0 +1,24 @@
define( [
'dojo/_base/declare',
'dojo/_base/array',
'NeatCanvasFeatures/View/Track/NeatFeatures',
'WebApollo/View/Track/WebApolloCanvasFeatures'
],
function( declare,
array,
NeatFeatureTrack,
CanvasFeaturesTrack
)
{

return declare( [NeatFeatureTrack,CanvasFeaturesTrack], {
constructor: function() {
this.browser.getPlugin( 'WebApollo', dojo.hitch( this, function(p) {
this.webapollo = p;
}));
}
});


});

14 changes: 7 additions & 7 deletions grails-app/conf/Config.groovy
Expand Up @@ -418,13 +418,13 @@ jbrowse {
WebApollo {
included = true
}
// NeatHTMLFeatures{
// included = true
// linearGradient = 0
// }
// NeatCanvasFeatures{
// included = true
// }
NeatHTMLFeatures{
included = true
linearGradient = 0
}
NeatCanvasFeatures{
included = true
}
RegexSequenceSearch {
included = true
}
Expand Down
Expand Up @@ -460,6 +460,9 @@ class JbrowseController {
// add core plugin: https://github.com/GMOD/jbrowse/blob/master/src/JBrowse/Browser.js#L244
// pluginKeys.add("RegexSequenceSearch")
pluginKeys.add("WebApollo")
// see https://github.com/GMOD/jbrowse/issues/897
// https://github.com/GMOD/Apollo/issues/2014
jsonObject.plugins.add("stub")
for (plugin in plugins) {
if (!pluginKeys.contains(plugin.key)) {
pluginKeys.add(plugin.key)
Expand Down

0 comments on commit 08a4039

Please sign in to comment.