Skip to content

Commit

Permalink
Merge c57fcce into 4fc0649
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Jan 23, 2019
2 parents 4fc0649 + c57fcce commit 5ae6f9c
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 14 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
9 changes: 9 additions & 0 deletions client/apollo/js/TrackConfigTransformer.js
Expand Up @@ -13,10 +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";
};
this.transformers["NeatCanvasFeatures/View/Track/NeatFeatures"] = function(trackConfig) {
trackConfig.type = "WebApollo/View/Track/WebApolloNeatCanvasFeatures";
};
// have to set this explicitly if you want undecorated features
// 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/WebApolloCanvasFeatures";
this.transformers["JBrowse/View/Track/CanvasFeatures"] = function(trackConfig) {
trackConfig.type = "WebApollo/View/Track/WebApolloCanvasFeatures";
};
Expand Down
2 changes: 1 addition & 1 deletion client/apollo/js/View/Track/AnnotTrack.js
Expand Up @@ -5633,7 +5633,7 @@ define([

// if feature-render annot-render ,
// remove and add: gray-center-10pct
if(div.className.indexOf("feature-render")>=0 && div.className.indexOf("annot-render")>=0 ){
if(div.className && div.className.indexOf("feature-render")>=0 && div.className.indexOf("annot-render")>=0 ){
div.className = "gray-center-10pct";
}
// annot_context_menu.unBindDomNode(div);
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;
}));
}
});


});

20 changes: 19 additions & 1 deletion docs/Configure.md
Expand Up @@ -90,7 +90,11 @@ or ```git```, which can include a ```tag``` or ```branch``` as above.

Options for ```alwaysRecheck``` and ```alwaysRepull``` always check the branch and tag and always pull respectiviely.

__Warning:__ The ```NeatHTMLFeatures``` and ```NeatCanvasFeatures``` plugins work very well in JBrowse instances. We are still in the process of testing and improving their performance in combination with the Apollo plugin. Until we finalize this process, we strongly advise caution if enabling them for use in your Apollo instances.
##### NeatFeatures

__Warning:__ The ```NeatHTMLFeatures``` and ```NeatCanvasFeatures``` plugins work very well in JBrowse instances.

However, there are some outstanding issues with them, so proceed with caution.

```
jbrowse {
Expand Down Expand Up @@ -132,6 +136,20 @@ jbrowse {
}
```

To use `NeatFeatures` in the tracks you need to specify:

```
trackType: NeatHTMLFeatures/View/Track/NeatFeatures
```

or

```
trackType: NeatCanvasFeatures/View/Track/NeatFeatures
```

In the `AnnotTrack.json` code you will have to change `WebApollo/View/Track/DraggableHTMLFeatures` to `WebApollo/View/Track/DraggableNeatHTMLFeatures`.


### Translation tables

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 5ae6f9c

Please sign in to comment.