Public Sigenae Contig Browser .

 

The default species for Ensembl are listed in this file:

public-plugins/ensembl/conf/SiteDefs.pm

in %__species_aliases. These are automatically imported into the main conf/SiteDefs::ENSEMBL_SPECIES_ALIASES. In this distribution all the default species are enabled. (See below on how to customise your own list).

The keys of the hash (the species names on the left hand side) define the list of valid species for this website. The values of the hash (the aliases on the right) can be used in URLs instead of the longer species names. i.e.

http://my.ensembl.site/mouse/contigview

is identical to

http://my.ensembl.site/Mus_musculus/contigview

To configure a species it has to have an appropriately-named .ini file in the conf/ini_files directory and to be present as in the %__species_aliases as shown below:

sub update_conf {
  $SiteDefs::ENSEMBL_PERL_SPECIES  = 'Homo_sapiens'; # Default species
  $SiteDefs::__species_aliases{ 'Bos_taurus'      } = [qw(bt cow moo)];
  $SiteDefs::__species_aliases{ 'Canis_familiaris'} = [qw(cf dog)];
  $SiteDefs::__species_aliases{ 'Homo_sapiens'    } = [qw(hs human man default)];
}

Customising your species list

To overwrite the default species and customise your own species list add lines (described below) to the "update_conf" method in your mirror plugin: public-plugins/mirror/conf/SiteDefs.pm.

  1. To delete a species:
        delete( $SiteDefs::__species_aliases{'Bos_taurus'} );
  2. To add a new species:
        $SiteDefs::__species_aliases{'New_species'} = [qw(ns new)];
  3. To add an additional alias to a species:
        push @{$SiteDefs::__species_aliases{'Pan_troglodytes'}}, qw(chimpanzee);

Remember to create an ini file for each of the species in public-plugins/mirror/conf/ini-files/<Genus_species>.ini. If you put your changes into the public-plugins/mirror directory, they will not be overridden when you next do a cvs update.

You might also want to change $SiteDefs::ENSEMBL_PERL_SPECIES - this is a special alias for URLs of the form http://my.ensembl.site/perl/contigview, for purely historical reasons. It will probably be used in the future to set the default species for multi-species pages/functions.

Once you are happy with your ini files, run the utility script utils/update_webdb.pl, which will update ensembl_website with species information (assembly IDs, etc) for that release. Although not essential for the running of an Ensembl site, this database is used by several static content utilities as well as the news and help pages.

Static content for your species

A new species needs at a minimum, a directory and home page:

  • public-plugins/mirror/htdocs/[Genus_species]/
  • public-plugins/mirror/htdocs/[Genus_species]/index.html

If you would like your species home page to match that of the existing Ensembl site, you will need the following:

  1. A subdirectory public-plugins/mirror/htdocs/[Genus_species]/ssi/
  2. An index page copied from a similar species. There are only two variations on the species home page, depending on whether the genome has been assembled into chromosomes or not. Both versions have four smaller HTML files that are placed within the home page using server-side includes; note that you will see errors on the page if these files do not exist. The files are:
    • A block giving access points for the data:
      • If a species has no chromosomes, it will need a file htdocs/[Genus_species]/ssi/examples.html which should have example entry points to the data.
      • If the species has chromosomes, it will need a karyotype image, called karyotype_[Genus_species].png. The image can be generated in KaryoView (provided that the site is already correctly configured for dynamic content!) and then edited - it should ideally be no more than 250px wide so that the page won't look cramped at 800x600 resolution! Save the finished file in htdocs/img/species/ (N.B. the folder is literally called 'species' - don't substitute the name of your new species!).
      • After you have made the karyotype, you will need to create a file htdocs/[Genus_species]/ssi/karyomap.html - use a similar species as a template and adjust the imagemap areas and URLs to match the new karyotype.
    • A block htdocs/[Genus_species]/ssi/about.html which generally should contain a short description of the assembl/annotation plus (optionally) a picture of the species. The image should be roughly 100x100px and called pic_[Genus_species].png. Save it in htdocs/img/species/, as per the karyotype images.
    • Two additional blocks currently show "What's New" and species statistics, which the Ensembl webteam generate using Perl scripts.
      • The species statistics are generated from raw SQL queries against the relevant database(s). Since the queries depend on the database content, our in-house script may not work with your data so we recommend writing your own script to generate this file.
      • The "What's New" block depends upon content from the news tables in the ensembl_website database. If you are using this database to add your own site news, you can run the utility script whatsnew.pl to generate this block. If not, you will need to replace it with your own static content.

The Ensembl home page and site maps

If you have added or deleted species, you will needed to generate new species lists for the home page and new site maps (see below).

If you have added species, you will also need a thumbnail image of the species, for use on the home page and main sitemap. The image must be 40x40px and called thumb_[Genus_species].png. Save it in public-plugins/mirror/htdocs/img/species/

Species lists

These can be manually updated by copying mammals.html and others.html from /public-plugins/ensembl/htdocs/ssi/ to /public-plugins/mirror/htdocs/ssi/ and then editing them to show your species.

Alternatively you can run the utility script utils/homepage.pl, as long as you have run utils/update_webdb.pl first to put all your configured species into the database.

./homepage.pl --release=40 --sitetype=mirror (substituting the relevant release number)

If your static content is not in public-plugins/mirror, you need to append another flag:

--mirror=my-plugins/mysite (no beginning or trailing slashes).

Site maps

These are generated quickly and easily by running utils/sitemap.pl. The script uses the SEARCH_LINKS hash from the cached configuration to generate individual species site maps, and also walks the /info directory to produce a tree of links to site documentation.

The script can be invoked with similar flags to homepage.pl, but does not need a release number.

If you have extended Ensembl by adding new views, you can include them in the site map by editing the script - see the inline documentation under 'TO ADD A NEW VIEW'.


 

© 2012 INRA / WTSI / EBI.

                
Based on Ensembl release 40 - Aug 2006