intermine/intermine-search-drupal

Name: intermine-search-drupal

Owner: InterMine

Description: Drupal module to enable searching a mine instance using InterMine Search API

Forked from: jcvi-plant-genomics/intermine-search-drupal

Created: 2018-03-19 09:34:31.0

Updated: 2018-03-19 09:34:33.0

Pushed: 2018-03-18 15:37:19.0

Homepage: http://www.medicagogenome.org/search/medicmine/circadian

Size: 250

Language: CSS

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

intermine-search-drupal

Drupal module to enable searching one or more mine instances using the InterMine Search API, collating the response into a faceted results page.

Dependencies

Note: The above dependencies will be automatically downloaded and installed, if not already available.

Installation
  1. On the command line, change directory to the location of your Drupal modules and clone the intermine-search-drupal git repository, like so:

     /opt/www/MTGD/htdocs/tripal
     sites/all/modules
    t clone https://github.com/jcvi-plant-genomics/intermine-search-drupal.git intermine_search
    
  2. On the Drupal modules page http://localhost/admin/modules, activate the “InterMine Search” module. This can also be done from the command-line via drush, like so (choose y to install all required dependencies):

    ush pm-enable intermine_search
    
  3. On the module configuration page http://locahost/admin/config/search/intermine_search, update the settings.

    • To point to a single InterMine instance, the settings are configured like so:
    • intermine_name: MedicMine
    • intermine_base_url: http://medicmine.jcvi.org/medicmine
    • intermine_search_examples: e.g. Medtr2g036650, plasma membrane, sucrose synthase
    • To configure more than one remote InterMine instance, the URLs are represented as a JSON array like so:
    • intermine_name: LegFed
    • intermine_base_url:
      [{"intermine_base_url":"https://mines.legumeinfo.org/beanmine","intermine_name":"BeanMine"},
      {"intermine_base_url":"https://mines.legumeinfo.org/chickpeamine","intermine_name":"ChickpeaMine"},
      {"intermine_base_url":"https://mines.legumeinfo.org/cowpeamine","intermine_name":"CowpeaMine"},
      {"intermine_base_url":"http://medicmine.jcvi.org/medicmine","intermine_name":"MedicMine"},
      {"intermine_base_url":"https://mines.legumeinfo.org/peanutmine","intermine_name":"PeanutMine"},
      {"intermine_base_url":"https://mines.legumeinfo.org/soymine","intermine_name":"SoyMine"}]
      
    • intermine_search_examples: e.g. Medtr2g036650, plasma membrane, sucrose synthase, Glyma.16G153700, Glyma.16G153700.1, BARCSOYSSR_04_1400, Seed yield 15-5

    Click “Save Configuration” to store the settings in the database.

  4. On the Drupal Search Settings page http://localhost/admin/config/search/settings, enable the “InterMine Search” module, set it as the “Default search module”, and click “Save Configuration”.

  5. On the External Links module Settings page http://localhost/admin/config/user-interface/extlink, enable “Open external links in a new window”, and click “Save Configuration”.

Usage

Any %search_term% passed to the URL (like so: http://localhost/search/%intermine_name%/%search_term%) will trigger a query against the Search API endpoints of one or all the configured InterMine instances. For example:

  1. MedicMine: http://localhost/search/medicmine/sucrose%20synthase
  2. LegFed: http://localhost/search/legfed/circadian

The results (returned in JSON format by the InterMine API) are used to populate a faceted, dynamic, search result page with contextual links to corresponding entities within the InterMine instances.

Examples

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.