Browse Source

Document upgrade path for Tripal JBrowse nodes.

Lacey Sanderson 5 years ago
parent
commit
fc79b595b4
4 changed files with 53 additions and 6 deletions
  1. 5 5
      README.md
  2. 1 0
      docs/guide/install.rst
  3. 33 0
      docs/guide/install/migrate.rst
  4. 14 1
      tripal_jbrowse/tripal_jbrowse.module

+ 5 - 5
README.md

@@ -1,9 +1,9 @@
 # Tripal JBrowse Integration
 
-This package of modules integrates [GMOD JBrowse](https://jbrowse.org/) into your [Tripal](http://tripal.info/) site providing 
- - Tripal page integration via **Tripal JBrowse Page** and 
- - a user interface for JBrowse instance creation and management via **Tripal JBrowse Management**. 
- 
+This package of modules integrates [GMOD JBrowse](https://jbrowse.org/) into your [Tripal](http://tripal.info/) site providing
+ - Tripal page integration via **Tripal JBrowse Page** and
+ - a user interface for JBrowse instance creation and management via **Tripal JBrowse Management**.
+
  This powerful combination allows you to provide seamless genome browsing to your users in an administrator-friendly manner.
 
 ## Quick Start
@@ -29,4 +29,4 @@ This module is open-source and licensed under GPLv3. [Read full license](LICENSE
 - Joe West (@jwest60)
 - Other contributors (https://github.com/tripal/tripal_jbrowse/graphs/contributors)
 
-*Copyright 2018 University of Saskatchewan and University of Tennessee Knoxville.* 
+*Copyright 2018 University of Saskatchewan and University of Tennessee Knoxville.*

+ 1 - 0
docs/guide/install.rst

@@ -8,3 +8,4 @@ Installation
    install/dependencies
    install/jbrowse_mgmt
    install/instance_page
+   install/migrate

+ 33 - 0
docs/guide/install/migrate.rst

@@ -0,0 +1,33 @@
+Tripal JBrowse Nodes Migration
+================================
+
+The old method of Tripal JBrowse page integration using nodes has been **deprecated**. If you are still using this method of integration, administrators will see a warning directing you here.
+
+The new method of page integration using the Tripal JBrowse Management module to register instances with your Tripal site. The following steps will help you register your existing JBrowse instances with Tripal JBrowse Management in order to take advantage of the new page integration.
+
+1. Enable Tripal JBrowse Management as you would any other Drupal/Tripal module. This can be done using ``drush pm-enable tripal_jbrowse_mgmt``.
+2. Download JBrowse and install a single instance in a web-accessible location. We recommend ``DRUPAL_ROOT/tools/jbrowse``.
+3. Create symbolic links to each of your existing instances where the name of the link matches the organism it is for: ``genus_species__common_name``.
+
+.. code::
+
+  cd DRUPAL_ROOT/tools/jbrowse
+  mkdir data
+  cd data
+  ln -s path/to/existing/instance/data/directory genus_species__common_name
+
+4. Navigate to Administration » Tripal » Extensions » Tripal JBrowse and click on "Settings". Fill out the paths for your new single JBrowse instance.
+
++------------------------------------+---------------------------------------+
+| Data Directory                     | DRUPAL_ROOT/tools/jbrowse/data        |
++------------------------------------+---------------------------------------+
+| Data Path                          | ./tools/jbrowse/data                  |
++------------------------------------+---------------------------------------+
+| Path to JBrowse's Index File       | ./tools/jbrowse                       |
++------------------------------------+---------------------------------------+
+| Path to JBrowse's bin Directory    | DRUPAL_ROOT/tools/jbrowse/bin         |
++------------------------------------+---------------------------------------+
+
+5. Navigate to Administration » Tripal » Extensions » Tripal JBrowse and click on "Register Existing Instance". Fill in the details for each of your existing instances.
+6. Enable the new Tripal JBrowse Page Integration module and dynamic pages will now be available for each of your newly registered instances. This can be done using ``drush pm-enable tripal_jbrowse_page``.
+7. Delete your existing Tripal JBrowse Instance nodes under Admin » Content and disable the old module using ``drush pm-disable tripal_jbrowse``.

+ 14 - 1
tripal_jbrowse/tripal_jbrowse.module

@@ -4,6 +4,19 @@
  * Core functions of this module.
  */
 
+/**
+ * Implements hook_init().
+ */
+function tripal_jbrowse_init() {
+  global $user;
+
+  // Only show message to administrators.
+  if (in_array('admin', $user->roles)) {
+    $msg = t('We have detected that you still have Tripal JBrowse Nodes installed. This module is DEPRECATED! Please follow the migration instructions <a href="@url">here</a>.', ['@url' => 'https://tripal-jbrowse.readthedocs.io/en/latest/guide/install/migrate.html']);
+    drupal_set_message($msg, 'warning');
+  }
+}
+
 /**
  * Implements hook_theme().
  */
@@ -19,4 +32,4 @@ function tripal_jbrowse_theme($existing, $type, $theme, $path) {
   );
 
   return $items;
-}
+}