Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 2.3 KB

Update-Seed-Database.md

File metadata and controls

44 lines (31 loc) · 2.3 KB

Update cBioPortal seed database files stored in datahub

This documentation file is addressed to developers. To update the seed database files to a recent version you should follow these steps:

  1. Start a new instance of the cBioPortal database with the previous seed database (more information).

  2. Run the migration script from a branch that includes the new database schema (more information).

  3. Update the gene and gene alias by following the instructions in https://github.com/cBioPortal/cbioportal/blob/master/docs/Updating-gene-and-gene_alias-tables.md

  4. Update the cancer types by running ./update_cancer_types.py -p <local_dir>/portal.properties

  5. Move to the folder where you want to save the seed files. Use the following commands (assuming that the database is running on port 8306) to generate the new seed files. Please specify the species and the new schema version in the file name (e.g. for the human version of v2.1.0, the file name should be seed-cbioportal_hg19_v2.1.0.sql).

⚠️ Do not confuse the schema version with the cBioPortal version.

Make sure you use mysqldump version 5.7. When using macOS with homebrew, you can install this by running:

brew install mysql@5.7

# Move to 5.7 folder to run this specific mysqldump version
cd '/usr/local/Cellar/mysql@5.7/5.7.23/bin'
./mysqldump --version

Run mysqldump to generate the dump files:

./mysqldump -u cbio -pP@ssword1 -P 8306 --host 127.0.0.1 --ignore-table cbioportal.pdb_uniprot_alignment --ignore-table cbioportal.pdb_uniprot_residue_mapping --ignore-table cbioportal.info --no-create-info --complete-insert cbioportal > seed-cbioportal_hg19_v2.1.0.sql

⚠️ The database schema is not included in these dump files.

  1. In case gene sets are included in the seed, manually add a line at the end the sql file to update the gene set version.
-- Manually add gene set version
UPDATE info SET GENESET_VERSION="msigdb_6.1";
  1. Zip the generated mysql dump files:
gzip seed-cbioportal_hg19_v2.1.0.sql
  1. New files are ready to be uploaded to datahub.

⚠️ The database schema itself is found at: $PORTAL_HOME/db-scripts/src/main/resources/db/cgds.sql