bbabbd5d2566d47d923d51dbe350634783455999 mspeir Sun Oct 26 12:14:52 2025 -0700 change soe to gi, refs #35031 diff --git src/hg/htdocs/goldenPath/help/bigGenePred.html src/hg/htdocs/goldenPath/help/bigGenePred.html index 98a6290522f..603afa3a5f2 100755 --- src/hg/htdocs/goldenPath/help/bigGenePred.html +++ src/hg/htdocs/goldenPath/help/bigGenePred.html @@ -85,41 +85,41 @@

Creating a bigGenePred track from a bed12+8 file

Step 1. Format your pre-bigGenePred file. The first 12 fields of pre-bigGenePred files are described by the BED file format. Your file must also contain the 8 extra fields described in the autoSql file definition shown above: name2, cdsStartStat, cdsEndStat, exonFrames, type, geneName, geneName2, geneType. For example, you can use this bed12+8 input file, bigGenePred.txt. Your pre-bigGenePred file must be sorted first on the chrom field, and secondarily on the chromStart field. You can use the UNIX sort command to do this:

sort -k1,1 -k2,2n unsorted.bed > input.bed

Step 2. Download the bedToBigBed program from the -binary utilities directory.

+binary utilities directory.

Step 3. Download the chrom.sizes file for your assembly from -our downloads page (click on "Full +our downloads page (click on "Full data set" for your organism). For example, the hg38.chrom.sizes file for the hg38 database is located at -http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes. +http://hgdownload.gi.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes. Alternatively, you can use the fetchChromSizes script from the -utilities directory. +utilities directory.

Step 4. Create the bigGenePred file from your pre-bigGenePred file using the bedToBigBed utility command:

bedToBigBed -as=bigGenePred.as -type=bed12+8 bigGenePred.txt chrom.sizes myBigGenePred.bb

Step 5. Move the newly created bigGenePred file (myBigGenePred.bb) to a web-accessible http, https, or ftp location. See hosting section if necessary.

Step 6. Construct a custom track using a single track line. Any of the track attributes will be available for use on bigBed tracks. The basic version of the track line will look something like this:

@@ -196,80 +196,80 @@ page to view an example of bigGenePred amino acid display at the beginning of the SIRT1 gene on chromosome 10.

An image of a track with codons colored

Example #3: Bed12+8 to BigGenePred

In this example, you will create your own bigGenePred file from an existing pre-bigGenePred input file, a bed12+8 file.

  1. Save the example bed12+8 input file to your computer, bigGenePred.txt.
  2. - Download the bedToBigBed + Download the bedToBigBed utility (Step 2, in the Creating a bigGenePred section above).
  3. Save the hg38.chrom.sizes text file to your computer. This file contains the chrom.sizes for the human hg38 assembly (Step 3, above).
  4. Save the autoSql file bigGenePred.as to your computer.
  5. Run the bedToBigBed utility to create the bigGenePred output file (step 4, above):
    bedToBigBed -type=bed12+8 -tab -as=bigGenePred.as bigGenePred.txt hg38.chrom.sizes bigGenePred.bb
  6. Place the newly created bigGenePred file (bigGenePred.bb) on a web-accessible server (Step 5, above).
  7. Construct a track line that points to the bigGenePred file (Step 6, above).
  8. Create the custom track on the human assembly hg38 (Dec. 2013), and view it in the Genome Browser (step 7, above).

Example #4: GTF (or GFF) to BigGenePred

In this example, you will convert a GTF file to bigGenePred using command line utilities. You will need gtfToGenePred, genePredTobigGenePred, and bedToBigBed. If you would like to convert a GFF file to bigGenePred, you will use gff3ToGenePred in place of the gtfToGenePred. You can download utilities from the -utilities directory.

+utilities directory.

  1. Obtain a GTF file using the wget command. Skip this step if you already have a GTF or GFF file.
    wget http://genome.ucsc.edu/goldenPath/help/examples/bigGenePredExample4.gtf
  2. Convert the GTF file to genePred extended format using the gtfToGenePred command.
    gtfToGenePred -genePredExt bigGenePredExample4.gtf example4.genePred
    If you are converting a GFF file, use the gff3ToGenePred command.
    gff3ToGenePred yourFile.gff example4.genePred 
  3. Convert the genePred extended file to a pre-bigGenePred text file.
    genePredToBigGenePred example4.genePred bigGenePredEx4.txt
  4. Download a helper file that specifies column names.
    wget https://genome.ucsc.edu/goldenPath/help/examples/bigGenePred.as
  5. Convert your text bigGenePred to a binary indexed format. If you are not using hg38, you will need to replace the hg38.chrom.sizes file path with your organism's file path from the - downloads directory under "Genome Sequence Files". -
    bedToBigBed -type=bed12+8 -tab -as=bigGenePred.as bigGenePredEx4.txt http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes bigGenePredEx4.bb
  6. + downloads directory under "Genome Sequence Files". +
    bedToBigBed -type=bed12+8 -tab -as=bigGenePred.as bigGenePredEx4.txt http://hgdownload.gi.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes bigGenePredEx4.bb
  7. Put your binary indexed file, bigGenePredEx4.bb, in a web-accessible location. See the hosting section for more information.
  8. To view this example, you can click this into this Browser link. To view your own data, paste the link into your web browser and replace the URL after "bigDataUrl=" with a link to your own hosted data.
     http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&position=chr19:44905790-44909388&hgct_customText=track%20type=bigGenePred%20bigDataUrl=http://genome.ucsc.edu/goldenPath/help/examples/bigGenePredEx4.bb
    You can also add your data in the custom track management page. This allows you to set position, configuration options, and write a more complete desciption. If you want to see codons, you can right click, then click configure codon view or set this options using baseColorDefault=genomicCodons as is done below.
    browser position chr19:44905790-44909388 
     track type=bigGenePred baseColorDefault=genomicCodons name="bigGenePred Example Four" description="Ex4:BigGenePred Made from GTF" visibility=pack bigDataUrl=http://genome.ucsc.edu/goldenPath/help/examples/bigGenePredEx4.bb
    Once you are done, you should have a track on the Genome Browser like the one below.
  9. @@ -320,41 +320,41 @@

    An image of a bigGenePred track hub on the Browser

Sharing your data with others

If you would like to share your bigGenePred data track with a colleague, learn how to create a URL link to your data by looking at Example #6 on the custom track help page.

Extracting data from bigBed format

Because the bigGenePred files are an extension of bigBed files, which are indexed binary files, it can be difficult to extract data from them. UCSC has developed the following programs to assist in working with bigBed formats, available from the -binary utilities directory.

+binary utilities directory.

As with all UCSC Genome Browser programs, simply type the program name (with no parameters) at the command line to view the usage statement.

Troubleshooting

If you encounter an error when you run the bedToBigBed program, check your input file for data coordinates that extend past the end of the chromosome. If these are present, run the bedClip program -(available here) to remove the problematic +(available here) to remove the problematic row(s) before running the bedToBigBed program.