Replacing old tables with new ones

From Genecats
Jump to navigationJump to search

When you are updating a track that already exists on the public site with new data or a new assembly, follow the steps below sequentially to make sure that the old data and new data are not simultaneously on the public site (RR). This scenario assumes that you have finished QAing the track and have both the old and the new data tracks on hgwbeta.

  1. Find and drop old tables from hgwbeta.
  2. Make public on hgwbeta.
    Now only the new track should be visible on hgwbeta-public.
  3. Push both trackDb and the new tables to mysqlrr.
    Now the RR should be displaying the new track even though the old tables are there because trackDb points to the new tables.
  4. Drop old tables from RR after testing the new track (including genome-euro).

Example

Here is an example in which a chain/net track was updated from danRer5 to danRer6 on mm9:

1. Find and drop tables from hgwbeta:

  • hgwbeta: hgsql mm9
  • mysql> show tables like "%anRer5%";
+-------------------------------+
| Tables_in_mm9 (%anRer5%)      |
+-------------------------------+
| chr10_chainDanRer5            |
| chr10_chainDanRer5Link        |
| chr11_chainDanRer5            |
| chr11_chainDanRer5Link        |
| ....                          |
| chrY_chainDanRer5Link         |
| chrY_random_chainDanRer5      |
| chrY_random_chainDanRer5Link  |
| netDanRer5                    |
+-------------------------------+
71 rows in set (0.05 sec)

Now we want to create a file with all the tables to drop, in command form for mysql

  • hgwbeta: hgsql -Ne "show tables like '%anRer5%'" mm9 > dropList
  • hgwbeta: vi dropList
  • vi: :%s/^/DROP TABLE mm9./ (this means: for the whole file, substitute, at the beginning of the line, this text)
  • vi: :%s/$/;/ (this means: for the whole file, substitute, at the end of the line, this text)
  • vi: :wq
  • hgwbeta: hgsql mm9
  • mysql> (copy and paste contents of dropList and hit enter)

2. Make public on hgwbeta.

  • hgwbeta - trackDb: make public DBS=mm9

3. Push both trackDb and the new tables to mysqlrr.

  • email: Please push the following from mm9:
    chainDanRer6
    chainDanRer6Link
    netDanRer6
  • from hgwbeta to mysqlrr

4. Drop old tables from RR after testing the new track.

  • email: Please drop the following tables from the mm9 database from mysqlrr and genome-euro
    chr10_chainDanRer5
    chr10_chainDanRer5Link
    chr11_chainDanRer5
    ...

NOTE: To remove an old, obsolete track, see example in Redmine #19452