GenomeHubs
  • Introduction
  • Introduction
    • GenomeHubs
    • Files and containers
    • Demo
  • Quick Start
    • 1. Prepare
    • 2. Setup MySQL database server
    • (optional) Test Ensembl browser
    • 3. Import assembly and gene models
    • 4. Export files
    • 5. Run analyses
    • 6. Import analysis results
    • 7. Update meta
    • 8. Start download site
    • 9. Start BLAST server
    • 10. Start search container
    • 11. Edit Ensembl plugin
    • 12. Start Ensembl browser
  • Next Steps
    • Setup with multiple hosts
    • Understand the GFF parser
    • Import additional assemblies
    • Run comparative analyses
    • Import variation data
    • Add track hubs
    • Connect using Perl API
    • Set up REST API
Powered by GitBook
On this page

Was this helpful?

  1. Quick Start

11. Edit Ensembl plugin

Previous10. Start search containerNext12. Start Ensembl browser

Last updated 4 years ago

Was this helpful?

Ensembl sites use a plugin architecture that allows any methods/settings to be overwritten by files that are loaded after the main webcode. GenomeHubs provides a plugin which customises some of the features of a standard Ensembl Site, however, in order to set links to the other site components (particlarly the downloads server which hosts data for the assembly statistic visualisations) it is necessary to write a plugin.

At its simplest, this plugin need only contain a configuration file to specify URLs, but it is also useful to include images and text for the assemblies that you will be hosting. Beyond this a plugin could be developed to customise almost any feature of the site so this provides an introduction to one of the most powerful features of an Ensembl site.

Create a plugin

  • GenomeHubs fetches plugins from git repositories when starting the Ensembl browser so your plugin must be available in a git repository, but this does not need to be a publicly hosted repository on Github so long as it is accessible via git clone from the machine that will host the Ensembl site.

Edit conf/ini-files/DEFAULTS.ini to update urls, logos and styles:

  • modify entries that refer to genomehubs

  • ensure that urls point to your domain

  • ensure that the ASSEMBLY_STATS_URL path matches the version name of the directory mounted on the downloads server

  • update other logos and styles as required

Add images for each species (if available) to htdocs/i/species:

  • name images to match the SPECIES.URL meta parameter

  • add a 96 pixel square image to the 96 subdirectory

  • add a 64 pixel square image to the 64 subdirectory

  • add a 48 pixel square image to the 48 subdirectory

Add descriptive text to appear on each assembly home page to htdocs/ssi/species:

  • name files about_<SPECIES.URL>.html

  • use section names to allow the text to be parsed:

    <!-- {about} -->
    <p>Something about the organism.</p>
    <!-- {about} -->
    <!-- {assembly} -->
    <p>Assembly methods.</p>
    <!-- {assembly} -->
    <!-- {annotation} -->
    <p>Annotation methods.</p>
    <!-- {annotation} -->
    <!-- {references} -->
    <ol>
      <li>Numbered references</li>
    </ol>
    <!-- {references} -->

Edit copyright and link details in the perl modules under modules/EnsEMBL/Web/Document/Element Commit and push all changes

To place assemblies in sections on your Ensembl homepage, add a SiteDefs.pm file to the conf directory:

  • Name the module to match the PLUGIN_PACKAGE name in your EasyMirror container configuration and include an update_conf method:

    ```

    package EG::MealyBugBase::SiteDefs;

use strict;

sub update_conf { push @$SiteDefs::ENSEMBL_API_LIBS, $SiteDefs::ENSEMBL_SERVERROOT . '/your-plugin-name/modules'; }

1;

```

Visit github and fork the into your own github account.

a more complete example is available in the MealyBugBase

genomehubs/template-plugin
GitHub repository