Assembly QA Part 3 BETA Steps
These steps were revised in 2017, but you can also see the old steps: Releasing an assembly (old steps)
Navigation Menu |
Beta: Check for Ensembl tracks
Before pushing Ensembl tracks to beta, review the Ensembl wiki page and the Ensembl_QA script.
Beta: Copy redmine table list to hive
Should have been done in Dev steps: Alignment files are to valid assemblies, if not copy file and table list to assembly hive directory as below.
In Redmine for your assembly, look at the field, "Table List." The engineer should have provided a path to redmine.$db.table.list
E.g.,
/hive/data/genomes/manPen1/pushQ/redmine.manPen1.table.list
Your file contents should be something like this:
head redmine.manPen1.table.list hg38.chainManPen1 hg38.chainManPen1Link hg38.netManPen1 manPen1.augustusGene
Copy the file list to your assembly directory in hive.
From hive, copy the file list to your assembly dir:
cp /hive/data/genomes/$db/pushQ/redmine.$db.table.list .
Make a note of which assemblies are listed in this file list by looking at the unique databases/assemblies in column 1. For example:
cut -d'.' -f1 redmine.$db.table.list | sort -u hg38 manPen1 mm10
Beta: Remove trackDb and hgFindSpec tables from your HIVE table list
Remove tables from the list that start with trackDb or hgFindSpec:
sed -i.bak '/trackDb/d' cleanTableList
sed -i.bak '/hgFindSpec/d' cleanTableList
You'll be using this cleanTableList when doing your push.
Another way to do this:
grep -Ev "(trackDb|hgFindSpec)" redmine.$db.table.list > tableList.hgFindSpecANDtrackDb.removed
Beta: Special steps for extFile tables
- If this is a new assembly and this is the first Conservation track, the extFile table probably doesn't exist on beta and likely only has a single entry on dev. If this is the case, it is ok to just push the entire table from dev to beta.
- Include extFile table in push request when you are ready to push to the RR.
- Follow the steps above to remove seq or extFile tables from cleanTableList.
- NOTE: Do not push seq or extFile tables from dev to beta.
- You must use the copyExtSeqRows.csh script to move only the rows needed.
- There may be more than one set of entries in the extFile table. Make sure you only push the set that pertains to the actual files you are pushing to hgnfs1 (e.g. /gbdb/ponAbe2/multiz8way/anno/maf/*)
- These are the lines that will need to be added to beta:
mysql> select path from extFile where path like "%anno/maf%";
- See resource on the conservation track wiki page.
Beta: Make table PUSH lists for each assembly
In the example above, the assembly manPen1 has tables in 3 different databases (manPen1, hg38, and mm10). It will be helpful to create a file, containing only table names, for each unique database listed in the Table List. These files can then be used for pushing tables in a loop.
Using the example above, make 3 files with a list of tables to push for each assembly,
- manPen1 with tables to push
db="manPen1" cat redmine.$db.table.list| grep "mm10." | cut -d'.' -f2 > mm10.push
- hg38 with tables to push
cat redmine.$db.table.list| grep "hg38." | cut -d'.' -f2 > hg38.push
- mm10 with tables to push: NOTE: This will need additional cleaning in the next step.
cat redmine.$db.table.list| grep "$db." | cut -d'.' -f2 > $db.push
Since the above commands are specific to this example, you could have different patterns in your file list. Be sure to do comparison wc-l counts to be sure you didn't miss any tables.
Beta: Remove certain tables from your assembly push list
Here is a list of tables NOT to push. see notes on this Gspreadsheet
- You may need to remove "extFile" on this exclude list depending on the outcome of the previous steps.
author cds cell description development extFile gbCdnaInfo gbExtFile gbMiscDiff gbSeq gbStatus gbWarn geneName genscanSubopt hgFindSpec_public or hgFindSpec_username imageClone keyword library mrnaClone organism productName refLink refSeqStatus refSeqSummary BJRgbStatus sex source tissue trackDb_public or trackDb_username
Access this file hive, or if it's removed, you can put this list in a file, "tablesNotToPush" and use grep to remove them from your assembly.push table (e.g., manPen1.push ) that you made in the previous step.
grep -vf /hive/data/staging/tablesNotToPush $db.push > $db.push1 sdiff $db.push $db.push1
Do this for all three assembly push files and if your sdiff output shows the two files are the same, then continue with one more check.
Beta: Compare assembly.push list with dev mySQL table list
It's worthwhile to compare the assembly.push list with the tables that are on dev for your assembly. For example, there may be tables added in dev since Hiram's redmine.$db.table.list was created that should not be pushed yet. If you find any discrepancies between the tables actually on dev, and the tables in your push list, ask the developer about it.
1. Get the tables in your dev assembly db.
hgsql -Ne "show tables" $db > devTablesAll
2. Remove the tables that you know won't be pushed:
grep -vf /hive/data/staging/tablesNotToPush devTablesAll > devMySqlTableList
This command will show a side-by side difference between the tables on dev and the tables you will push.
sdiff -s devMySqlTableList $db.push
Examine which tables are missing, ask if you have questions. Common differences for the sql table list include chainRBestHg38%, chainSyn%, gapOverlap, hgFindSpec_%, netRBest%, netSyn%, tandemDups, trackDb_%. The important this is to not miss any super interesting tables in the push list.
Beta: Push all tables for your assembly to beta
OPTION 3: Use the bigPush.sh script, push tables in a file
These commands also push the two other commonly chained assemblies (the next step).
bigPush.sh $db $db.push bigPush.sh mm10 mm10.push bigPush.sh hg38 hg38.push
Push the clean table lists that you created in the steps above from hgwdev to hgwbeta:
Option 1: Push 1 table at a time
This command will push one table from dev to beta for your database/assembly:
sudo mypush $db $table hgwbeta
Option 2: Push tables in a loop
for table in $(cat yourTableList); do sudo mypush $db $table hgwbeta; done
For example:
for table in $(cat manPen1.push); do sudo mypush manPen1 $table hgwbeta; done
Option 4: Use the bigPush.sh script, list tables in quotes
List space separated tables in quotes.
hgwdev > bigPush.csh $db "table1 table2 table3 table4"
You can count the number of tables in a database if you want to compare the number of tables listed in your push file to the number of tables that have been pushed to beta.
Option 5: Push all tables in the db, then remove the tables you don't need
hgwdev> sudo mypush $db '*' hgwbeta
FROM HIVE:
wc -l manPen1.push 55 manPen1.push
FROM HGWBETA
use manPen1 USE databasename; SHOW TABLES; SELECT FOUND_ROWS(); +--------------+ | FOUND_ROWS() | +--------------+ | 55 | +--------------+
Beta: Push all tables to other assemblies to beta
Repeat the push steps for other assemblies listed in your table list (e.g., chain/net tables to other assemblies). For example:
for table in $(cat hg38.push1); do sudo mypush hg38 $table hgwbeta; done
for table in $(cat mm10.push1); do sudo mypush mm10 $table hgwbeta; done
Beta: Review copyHgcentral steps
You can copy items from hgcentraltest to hgcentralbeta with the copyHgcentral script. For the usage statement, run:
copyHgcentral -h
- The copyHgcentral script must be run in test mode first.
- Test mode will show you the state of hgcentraltest, hgcentralbeta and hgcentral.
- Once test mode has been run and reviewed, run execute mode to copy from hgcentraltest to hgcentralbeta.
- Note that test mode generates output files which must be manually deleted afterward. Be sure to run copyHgcentral in hive or your home directory and not in a directory where temp files should not be.
NOTE
- Note, copyHgcentral can and should be run for "all" (blatServers, dbDb, defaultDb, genomeClade), as below and you can skip 4 next steps
copyHgcentral test $db all dev beta copyHgcentral execute $db all dev beta
Beta: copyHgcentral test db blatServers dev beta
Redundant if you did "all" above. Generates files, run in hive:
copyHgcentral test $db blatServers dev beta
copyHgcentral execute $db blatServers dev beta
You can also check on hgsqlbeta:
use hgcentralbeta; select * from blatServers where db='manPen1';
Beta: copyHgcentral test db dbDb dev beta
Redundant if you did "all" above. Generates files, run in hive:
hgwdev > copyHgcentral test $db dbDb dev beta
hgwdev > copyHgcentral execute $db dbDb dev beta
You can also check on hgwbeta:
use hgcentralbeta; select * from dbDb where name='manPen1' \G;
Beta: copyHgcentral test db defaultDb dev beta
Redundant if you did "all" above. Generates files, run in hive:
hgwdev > copyHgcentral test $db defaultDb dev beta
hgwdev > copyHgcentral execute $db defaultDb dev beta
You can also check on hgsqlbeta
hgsql -h hgwbeta use hgcentralbeta; select * from defaultDb where name="manPen1"limit 1;
Beta: copyHgcentral test db genomeClade dev beta
NOTE: This table probably will not need to be updated. It contains records like this:
mysql> select * from genomeClade order by rand() limit 5; +-----------------+------------+----------+ | genome | clade | priority | +-----------------+------------+----------+ | GRCh38.p2 | haplotypes | 134 | | C. japonica | worm | 70 | | Atlantic cod | vertebrate | 125 | | D. melanogaster | insect | 10 | | D. persimilis | insect | 55 | +-----------------+------------+----------+
Generates files, run in hive:
hgwdev > copyHgcentral test $db genomeClade dev beta
hgwdev > copyHgcentral execute $db genomeClade dev beta
Beta: copyHgcentral: liftOverChain: manual move
**If you completed liftOverChain+Nets in Track QA steps, run these commands to check hgcentralbeta:
hgsql -h hgwbeta -Ne "SELECT * FROM liftOverChain WHERE fromDb = '$db' OR toDb = '$db'" hgcentralbeta hgsql -h hgwbeta -Ne "SELECT * FROM liftOverChain WHERE fromDb = '$db' AND toDb = '$db'" hgcentralbeta
liftOverChain is not copied with the copyHgcentral script, it needs to be copied manually.
- Only copy lines from liftOverChain on hgcentraltest to hgcentralbeta if there are liftOver files listed in the pushQ and if the assemblies they go to/from exist on the RR.
- Check for lines in liftOverCBold texthain that should be in the pushQ, but aren't (e.g., the liftOver from a previous assembly).
- Add lines related to your assembly, any previous versions of your organism, and any other organisms that are associated with liftOver files and your assembly.
- More details on the Chain and Net QA wiki page.
hgsql -Ne "SELECT * FROM liftOverChain WHERE fromDb = '$db' OR toDb = '$db'" hgcentraltest > chain.dev
Check beta, load if not present and recheck:
hgsql -h hgwbeta -Ne "SELECT * FROM liftOverChain WHERE fromDb = '$db' OR toDb = '$db'" hgcentralbeta hgsql -h hgwbeta -e "LOAD DATA LOCAL INFILE 'chain.dev' INTO TABLE liftOverChain" hgcentralbeta
TIP: An easy way to add liftOver rows!
- Run checkMetaData.csh $db
NOTE: If the assembly is not the first for that organism, the defaultDb will remain on hgcentraltestOnly
- This creates files in the dir in which you run it.
- Use the file "liftOverChain.$db.hgcentraltestOnly" as your LOAD file:
hgsql -h hgwbeta -e "LOAD DATA LOCAL INFILE 'liftOverChain.$db.hgcentraltestOnly' INTO TABLE liftOverChain" hgcentralbeta
After loading, run checkMetaData.csh $db again to make sure there are no differences.
Beta: checkMetaData
After completing copyHgcentral steps, run checkMetaData.csh $db
- This checks that all of the metadata is the same on hgwdev and on hgwbeta.
- Run this script in a temporary folder or hive; it creates some comparison files that can be deleted after the check.
Beta: Double check gbdb files
- Double-check that hgnfs1 (which is /gbdb on hgwbeta) has the files listed in Redmine file list.
cd /gbdb/$db ls -ld $(find .)
- Remove any unnecessary files.
- If any files were updated on hgwdev in the course of QAing tracks, make sure the correct version is on hgnfs1.
- To see the timestamps of files with symlinks on hgwdev, use the options "-lL" with ls.
- The large "L" shows information for a file that a link references, rather than for the link itself.
- You may notice that hgwdev has TRIX .ix and .ixx files, that is OK. These live on beta in a different location, /data/trix, more information at the at the TrackDb page.
Note: files on hgwdev are double the size as beta, this is not a concern.
Beta: Push gbdb files
In order to check your assembly on beta, you will need to:
- Push any listed supporting files in /gbdb from hgwdev to hgwbeta using the gbdbPush script
- Using the script, paste the gbdb file paths from the redmine.$db.file.list one at a time and end the script using a period ( . ).
$ sudo gbdbPush [sudo] password for user: Enter the files to push to, one per line. End with a '.' ### BEGIN FILE LIST ### /gbdb/hg38/gdcCancer/gdcCancer.bb . ### END FILE LIST ###
- Note that the gbdb files are sync'd to hgdownload on Sundays. If needed sooner, request a push.
- If there are images associated with any track description pages, be sure to run a make beta from within kent/src/hg/htdocs/ to get the images to beta.
- They may not be listed in the file list, but you also need to push the /gbdb/$db/trackDb.ixx and /gbdb/$db/trackDb.ix files.
- After push, you can see files: ssh qateam@hgwbeta ; cd /gbdb/$db
Beta: Do a make beta in trackDb for your assembly
Do make beta on hgwdev in kent/src/hg/makeDb/trackDb like so:
make beta DBS=$db
Example to make beta on more than one db at a time:
make beta DBS='$db1 $db2 $db3 $db4 etc'
Running multiple dbs in parallel to save time
Multiple assemblies can be run in parallel by using the make -j option (as of 2/10/17, thanks to Mark Diekhans). Updating all dev dbs used to take about 50 minutes, and now it can take about 5 minutes (at 16 in parallel). While Mark has safely run 16 dbs at a time on dev, it is recommended to only run 8 or less at a time on beta or the RR. Use make -j # beta and make -j # public, where the number (make -j 16 alpha) represents how many parallel processes (16) are running.
- For example, if you do:
make -j 8 alpha
- it updates everything, 8 at a time. If you do:
make -j 2 DBS="hg19 hg38 mm10 felCat5"
- it updates those 4 databases, 2 at a time .
- Note: the 'make in parallel' process creates and removes temporary files:
- The tmp dirs are found with:
kent/src/inc/portable.h: char *getTempDir(void); /* get temporary directory to use for programs. This first checks TMPDIR environment * variable, then /data/tmp, /scratch/tmp, /var/tmp, /tmp. Return is static and * only set of first call */
Examples:
make beta -j 4 DBS="dm6 ce11 sacCer3 droEre1 droSec1 droSim1 droYak2 droAna2 dp3 droMoj2 droVir2 droGri1 droPer1" make public -j 4 DBS="dm6 ce11 sacCer3 droEre1 droSec1 droSim1 droYak2 droAna2 dp3 droMoj2 droVir2 droGri1 droPer1"
Beta: Do a make beta in trackDb for chain net organisms
If your assembly has alignments to other organisms, such as chain/net alignments to hg38 or to the previous assembly version of your organism, be sure to also do a 'make beta' for those assemblies (usually previous organism versions, hg38, and mm10)
make beta DBS=$otherChainAssemblies
Beta: Turn on GenBank updates add:commit:push
In order for your assembly to receive Genbank updates on hgwbeta, add your assembly to hgwbeta.dbs alphabetically. If a previous assembly is there, put the previous assembly in the lower list alphabetically.
- Add the new assembly to ~/kent/src/hg/makeDb/genbank/etc/hgwbeta.dbs in alphabetical order.
- Be sure to save, git add, git commit, and git push the file.
- This turns on GenBank updates for the assembly. Currently (June 2019), GenBank updates are done quarterly (every 3 months).
- Do not yet edit the rr.dbs, this comes later when the assembly is on the RR.
cat ~/kent/src/hg/makeDb/genbank/etc/hgwbeta.dbs | grep $db
Beta: GenBank updates: make libs and run make
After committing the change, make sure your libs are up to date:
cd ~/kent/src ; make libs
then go ahead and run the make:
cd ~/kent/src/hg/makeDb/genbank/ git pull make install-server
To see whether updates have run (at least the day after the *.dbs files were updated), check the update times of the table 'gbLoaded':
Beta: GenBank updates: check Genbank update times
hgwdev > updateTimes.csh $db gbLoaded verbose
For example, you'll see last update time for that particular SQL table on dev (but not yet for the beta/rr/euro/asia):
updateTimes.csh manPen1 gbLoaded verbose gbLoaded ============= dev 2017-04-18 11:40:07 beta 2017-04-18 11:40:07 rr euro asia
The update times may be out of sync between machines, but not by more than 24 hours or so if updates are running. The gbLoaded table should have been pushed with the tables to beta. In the future, this update time may not change for a while, this is because we now pull GenBank updates quarterly vs. nightly. Make sure you still add you $db to the hgwdev.dbs and hgwbeta.dbs files. More genbank update instructions are available at Genbank updates.
The etc-update-server part of the make will cause the downloads mentioned below in the "Verify downloads" section to be created.
Beta: joinerCheck common keys
Check that common keys between tables are in sync:
hgwdev > cd ~/kent/src/hg/makeDb/schema hgwdev > joinerCheck -database=$db -keys all.joiner
If there are errors related to genbank identifiers, it is likely because of the genbank load process, and not an issue with your database. Run joinerCheck once the tables are on beta to confirm:
hgwdev > HGDB_CONF=~/.hg.conf.beta joinerCheck -keys -identifier=$identifier all.joiner
Beta: joinerCheck table times
Check table update times:
cd ~/kent/src/hg/makeDb/schema joinerCheck -database=$db -times all.joiner
You should get no output if it ran successfully.
Beta: joinerCheck tableCoverage
Check that all tables in this database are mentioned/referenced in all.joiner
hgwdev > joinerCheck -database=$db -tableCoverage all.joiner
If not all of the tables are listed, email the developer asking him to add those tables to the tablesIgnored $db. According to Hiram it is probably ok for us to edit all.joiner ourselves.
Beta: Check release tags: compare dev and beta tracks side by side
Compare your tracks by bringing up a dev and a beta browser window side-by-side. If some beta tracks can't be seen, you may need to edit the release tag.
- See this page for more information:
- http://genomewiki.ucsc.edu/index.php/ThreeStateTrackDb
Where are your release tags? They're in your .ra files, you can do a recursive search, like this:
find . -name '*ra' | xargs grep "manPen1"
Beta: Check Tools: LiftOver
Check LiftOver on beta and beta public.
Beta: Check Tools: BLAT: dna
Copy some dna and check BLAT for a DNA search on beta and beta public.
Beta: Check Tools: BLAT: protein
Copy some protein and check BLAT for a protein search on beta and beta public.
Beta: Check Tools: PCR
Check PCR on beta and beta public. See how to test PCR details from DEV steps
Beta: Review chain net track QA wiki
- Review the Chain/Net QA wiki page, see the section QAing on hgwbeta
- See also Editing the human trackDb.ra file
Your assembly may have chain/nets for a composite chain/net track. For example, you may have a 'turkey' assembly that belongs in the "Vertabrate Chain/Net" composite track on hg38. If your chain/nets appear next to the composite track, rather than within the composite track, you may need to create separate chainNetMelGal1.ra and chainNetMelGal5.ra files in trackDb/human. Once you have those files created then you will need to add the appropriate includes to the trackDb/human/hg38/trackDb.ra and trackDb/human/hg19/trackDb.chainNet.ra files.
Beta: Do chain net quick qa or full qa
DO NOT RUN these three commands since blastz has been replaced by lastz!!! Instead run findScores.pl, as shown at bottom
Details in Chain/Net QA wiki page, section QAing on hgwbeta
Full QA, run:
chainNetTrio.csh [database] [other database]
Quick QA, run
getChainLines.csh [database] [other database]
The following getMatrixLines.csh script is broken:
getMatrixLines.csh [database] [other database]
You can see the same information with:
$ findScores.pl susScr11 hg38 looking in file: /hive/data/genomes/hg38/bed/lastz.susScr11/axtChain/run/chain.csh chainMinScore 3000 chainLinearGap medium default values: matrix 16 91,-114,-31,-123,-114,100,-125,-31,-31,-125,100,-114,-123,-31,-114,91
Beta: Re push any tables if needed after checking updateTimes
- Make sure no tables need to be repushed from hgwdev to hgwbeta.
- Note that if at any point you need to re-push some genbank tables, you must push ALL genbank tables together.
- Remember that Dev should have several tables that beta doesn't (e.g., author, cds, cell, chainRBest*, chainSyn*)
You can use
hgwdev > updateTimesDb.sh -d $db
Or you can check tables in a list by using a loop like this:
for table in $(cat hg38.push); do updateTimes.csh hg38 $table verboseNoMirror >> hg38.updateTimes.devVSbeta ; done
to compare table update times between hgwdev and hgwbeta. Everything but hgFindSpec, history, tableDescriptions, trackDb and the genbank tables should have the same update times.
To see all of the tables in the assembly that are related to genbank do this:
hgwdev > hgsql -Ne 'show tables' $db | egrep -f /cluster/data/genbank/etc/genbank.tbls
Beta: Do a make public in trackDb for your assembly
Make your track public by using the "make public" command on hgwdev while in the trackDb directory (src/hg/makeDb/trackDb):
[user@hgwdev trackDb]$ make public DBS=$db
Example to make beta on more than one db at a time:
make beta DBS='$db1 $db2 $db3 $db4 etc'
Your track should now be visible on the hgwbeta-public server.
If your track is not visible, you may want to check that your track has the correct release tag. Also see [Three State TrackDb] for more information.
Beta: Do a make public in trackDb for chain net organisms
If your assembly has alignments to other organisms, such as chain/net alignments to hg38 or to the previous assembly version of your organism, be sure to also do a 'make public' for those assemblies.
Beta: Remove release tag for big vcf track types
Once you verify that the track looks good on hgwbeta, remove the release tag from trackDb.ra.
- More information about editing release tags can be found here:
- http://genomewiki.ucsc.edu/index.php/ThreeStateTrackDb#Updated_trackDb_release_process
🔵 Done with BETA steps? Go to Assembly QA Part 4: RR Steps