This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Generate "Ucsc Genes Track" In Local Ucsc Genome Browser?

Hi all,

I would like to generate a "UCSC genes" track for a genome hosted in the our local UCSC browser. Something like this, with subsections and most data linking to an external url. I'm starting off from a tab delimited annotation file and I would like to end up with all data loaded onto SQL and most data searchable through the browser's search bar.

There is a description on how the example track above was generated, but many of the scripts are no longer in the current ucsc/kent distribution.

Does anyone have some experience with this? It would be great to get a more detailed list of steps on how to generate this type of track. I have generated custom tracks before but all of them were trackhubs or standard bed, bedDetail or wig formats.

Thanks!

ucsc browser genome

The first link you have posted is to an Help page generated automatically. It's not a UCSC track; it's the output of a script (hgGene) that, given a gene id, returns all the information that you see there. The second link you posted describes how a Gene Annotation track has been generated. It explains how, for a given new genome, you can generate annotations on gene positions. Which of these two features do you want to implement? Do you want to generate an help page (1st case), or do you want to calculate gene positions for a new genome (2nd case)?

I want to generate the first one, both the help page and the track behind all that information (knownGene). I already have the positions and annotations ready. Sorry about the wrong link.

1 answer

This is the SQL description of the knownGene track:

$ mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -Dhg19  -e "desc knownGene"
+------------+------------------+------+-----+---------+-------+
| Field      | Type             | Null | Key | Default | Extra |
+------------+------------------+------+-----+---------+-------+
| name       | varchar(255)     | NO   | MUL |         |       |
| chrom      | varchar(255)     | NO   | MUL |         |       |
| strand     | char(1)          | NO   |     |         |       |
| txStart    | int(10) unsigned | NO   |     | 0       |       |
| txEnd      | int(10) unsigned | NO   |     | 0       |       |
| cdsStart   | int(10) unsigned | NO   |     | 0       |       |
| cdsEnd     | int(10) unsigned | NO   |     | 0       |       |
| exonCount  | int(10) unsigned | NO   |     | 0       |       |
| exonStarts | longblob         | NO   |     |         |       |
| exonEnds   | longblob         | NO   |     |         |       |
| proteinID  | varchar(40)      | NO   | MUL |         |       |
| alignID    | varchar(255)     | NO   | MUL |         |       |
+------------+------------------+------+-----+---------+-------+

for a simple usage,you can put whatever you want in name/proteinID/alignId. exonStarts and exonEnds are a comma-separated list of genomic indexes (size=exonCount) for each exon/start and each exon/end (using a half open interval)

Thanks! This is what I want to do but I would also like to add links to the mRNA, peptide, Uniprot, etc, in the help page. I believe this can be done with linked SQL tables but I'm not sure what is the best way to go about generating the tables and linking them correctly.

Log in to answer this question.