The following instructions assume you are not going to make a new genome version directory and that all you need to do is update refGene, all_mrna and all_est files.
IGB QuickLoad is configured so that a set of foundation gene annotations (gene models) load into IGB as soon as the user selects the corresponding genome version.
This is configured through the annots.xml file that resides in every genome version directory. Any data set with attribute "load_model" set to "Whole Genome" will automatically load into IGB.
For genomes harvested from UCSC, this foundation gene annotations data typically are from the the UCSC refGene table. If a genome does not have a refGene table, we instead use ensGene or whatever other genes data set looks the most complete and the most useful.
IGB QuickLoad file names should include the genome version and the UCSC table name. The title in the annots.xml file should match the track name but should not include the species name, as that will be obvious to the user and may make linkout patterns harder to maintain. |
For example, gene models data for the UCSC track named RefSeq Genes is stored in a table called refGene. In IGB QuickLoad, the data file should be named G_species_strain_MMM_YYYY_refGene.bed.gz (a compressed BED detail file) and the title attribute in annots.xml should be RefSeq Genes.
However, the UCSC genome browser sometimes include species names in the title of its mRNA track. IGB QuickLoad data sets should not include species names in the titles. For example, the title of an mRNA track is always "mRNA" and never (for example) "Zebrafish mRNA."
Install these in a directory in your PATH.
If you're doing this on a Mac desktop or laptop computer, create a directory called "bin" in your home directory and save all compiled binaries there. Edit your .bash_profile file to include a line like the following to ensure that the shell can find the programs.
export PATH=.:$HOME/bin:$PATH |
Use git to obtain a copy of source code:
$ git clone https://bitbucket.org/lorainelab/genomesrc |
If you already have a copy, then update it. Changed into your local copy and run:
$ git pull origin master |
Use svn to get a copy of the QuickLoad data repository: TO BE UPDATED
$ svn co TO BE UPDATED |
If you already have a copy, just update using svn up. Change into your checked-out, local copy and run:
$ svn up |
Add quickloadsrc to your PATH as it contains a python script you'll use to created BED detail files from ordinary BED files. Edit the .bash_profile file as in above:
export PATH=.:$HOME/quickload_src:$HOME/bin:$PATH |
Go to http://genome.ucsc.edu/cgi-bin/hgTables
File name: G_species_strain_MMM_YYYY_refGene.gz
Data set title: RefSeq Genes
Configure Table Browser with the following settings:
UCSC data set file names saved in IGB QuickLoad should always include the IGB genome version name followed by an underscore character followed by the UCSC table name. The title field in the annots.xml file should always be the UCSC track name because that is what users will recognize from having used the UCSC genome browser. |
$ wget ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/gene2accession.gz $ wget ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/gene_info.gz |
Use ucscToBedDetail.py (from https://bitbucket.org/lorainelab/genomes_src) to create a new BED file with gene symbol and description
For example, do something like this:
$ ucscToBedDetail.py ~/Downloads/G_species_MMM_YYYY_refGene.bed.gz G_species_MMM_YYYY_refGene.bed |
This will create a new BED detail file (G_species_MMM_YYYY_refGene.bed) in the current working directory.
Note that for this to work, gene2accession.gz and gene_info.gz must be in your current working directory.
You can also provide these files using options -a and -g if you have saved them to a different location. See the script documentation for details.
$ sort -k1,1 -k2,2n G_species_MMM_YYYY_refGene.bed | bgzip > G_species_MMM_YYYY_refGene.bed.gz $ tabix -s 1 -b 2 -e 3 bed G_species_MMM_YYYY_refGene.bed.gz |
$ gunzip -c G_species_MMM_YYYY_refGene.bed.gz | wc -l |
The wc command should print the number of lines in the file, which should be equal to the number of rows in the corresponding refGene table. To find out how many rows the refGene table contains, click \"describe table scheme\" in the Table Browser.
Open file the file and change load mode to whole genome. Click the genome row in the Current Sequence table. You should see something above every chromosome.
If some chromosomes have no data, go back to the table browser and use the region text area to confirm there was no data for the given chromosome.
Make sure the number of chromosomes listed in the file does not exceed the number of chromosomes listed in the genome descriptor file genome.txt:
$ gunzip -c G_species_MMM_YYYY_refGene.bed.gz | cut -f1 | sort | uniq wc -l $ wc -l genome.txt |
The first line counts the number of unique sequences appearing the first column of the bed file. The second line counts the number of lines in the genome.txt file.
The annots.xml file description for the refGene annotations contains the date the data were downloaded. Edit the file accordingly to reflect today's date.
Use svn status command to double-check which files you've changed:
$ svn st |
It should print something like:
M G_species_MMM_YYYY_refGene.bed.gz M G_species_MMM_YYYY_refGene.bed.gz.tbi M annots.xml |
M stands for "modified".
These are the only files that should have changed. If others are different, something has gone wrong. |
Check in the files one-by-one:
svn ci G_species_MMM_YYYY_refGene.bed.gz -m "Enter a message here." svn ci G_species_MMM_YYYY_refGene.bed.gz.tbi -m "Enter a message here." svn ci annots.xml -m "Enter a message here." |