The Ensembl Genomes data is provided on the Ensembl Genomes FTP site in the form of tab-delimited text files for importing into MySQL. Go to the appropriate release directory and then to 'mysql'.


The MySQL data

Each database directory contains a data file for each table in that database an SQL file that contains the SQL commands necessary to build that database's table structure and a checksum file (using a UNIX "sum" utility) so you can verify that the data has downloaded correctly.

Regardless of which species you choose to install, you will also need ensemblgenomes_ontology_22_75, ensembl_website_75 and an empty copy of ensembl_accounts - even if you do not use logins, this latter db is needed for session data, e.g. image configurations.

You may optionally want to install the comparative genomics databases as well: ensembl_compara_fungi_22_75, ensembl_compara_plants_22_75, ensembl_compara_metazoa_22_75, ensembl_compara_protists_22_75, ensembl_compara_bacteria_22_75 and ensembl_compara_pan_homology_22_75

NB: The FTP site will ideally be laid out as described. If, however, for reasons of space or maintainability, files are not located as described then check the ftp site for README files which should explain where the data can be found.

To install the Ensembl Data:

  1. Download the directory in for whatever organism you want to install.
  2. Each table file is gzipped so unpack the data into working directories, keeping separate directories for each database.

    For each database you have downloaded, cd into the database directory and perform steps 3-5. For illustration, we will use plasmodium_falciparum_core_22_75_3 as the database - you need to change this appropriately for each database you install. Remember, you also need to download and install the multi-species databases.

  3. Start a MySQL console session (see the Installing MySQL section above if necessary) and issue the command:
    create database plasmodium_falciparum_core_22_75_3;
  4. Exit the console session, and issue the following command to run the ensembl SQL file, which should be in the directory where you unpacked the downloaded data. This creates the schema for the empty database you created in step 3.

    Note that we are using the example MySQL settings of /data/mysql as the install directory, and mysqldba as the database user. Note that here mysqldba is a MySQL account with file access to the database, which is not the same as a system user. See the MySQL documentation for instructions on creating/administering users.

    /data/mysql/bin/mysql -u mysqldba plasmodium_falciparum_core_22_75_3 < plasmodium_falciparum_core_22_75_3.sql
  5. Load the data into the database structure you have just built with the following command.
    /data/mysql/bin/mysqlimport -u mysqldba --fields_escaped_by=\\ plasmodium_falciparum_core_22_75_3 -L *.txt
    Note that owing to the nature of some of the data in Ensembl it has been necessary to escape the table fields when dumping the MySQL text files. Hence to import successfully, a field escape parameter needs to be specified when using mysqlimport

You have now created and loaded the core Ensembl Genomes database for plasmodium falciparum .

Note that all the databases except the ensembl_accounts database only require read access for the website to work. The ensembl_accounts requires a MySQL user with delete/insert/update permissions. Also note that because its the only database that the website writes data into, the ensembl_accounts has no .table (data) files to download.

NB MySQL needs quite a lot of temporary space to load the databases. It is quite possible that your / tmp directory (which MySQL uses by default) is too small, in which case you might see an Error 28 (use the MySQL tool perror to see what these error numbers mean). Fortunately, you can force MySQL to write temporary files to another location. See the MySQL docs for details: The simplest solution is to start mysqld with the argument --tmpdir my_spacious_tmp_location.

GO data

The Ensembl ftp site now includes a copy of the GO database as ensemblgenomes_ontology_22_75. Install this if you want local GO information.