Skip to content

UCSC Genome Browser Tutorial

The UCSC Genome Browser provides a rapid and reliable display of any requested genomic region at any scale. It supports a wide range of genome assemblies across various species (eg. human GRCh38 and mouse mm10) and includes dozens of aligned annotation tracks.

genome_browser_sc  

Data TypeDescription
bam/cramCompressed Sequence Alignment/Map tracks
bigBedItem or region tracks
bigBarChartBar charts of categorical variables displayed over genomic regions
bigChainGenome-wide Pairwise Alignments
bigGenePredGene Annotations
bigInteractPairwise interactions
bigLollyLollipops
bigNarrowPeakPeaks
bigMafMulitple Alignments
bigPslPairwise Alignments
bigWigSignal graphing tracks
hic: Hi-CContact matrices
halSnakeHAL Snake Format
vcfTabixVariant Call Format
vcfPhasedTrioVariant Call Format Trios
 
  1. bigBed: Visualize regions such as varians, repeats, cCREs and ChIP-seq peaks. bigBed example

  2. bigWig: Visualize signals for assays such as ChIP-seq, ATAC-seq, DNase-seq and RNA-seq. bigWig

  3. bigInteract: Visualize pairwise interactions for assays such as HiC and ChIA-PET. 3D genome biginteract example  

Find the data you want to visualize on the ENCODE portal, right click the download logo and copy the data URL(copy link address) for Genome Browser visualization.

encode data  

UCSC developed various tools for data transformation.

BED (Browser Extensible Data) format

graph LR
  A[bed] --> B[bedToBigBed]
  B --> C[bigBed]

bedGraph format

graph LR
  A[bedGraph] --> B[bedGraphToBigWig]
  B --> C[bigWig]

bedpe format, bigInteract format

graph LR
  A[bedpe] --> B[bed5+13]
  B --> C[bedToBigBed]
  C --> D[bigInteract]

bedpe

biginteract  

Custom track is useful for quickly browse one or a few datasets. To add custom track, click Custom Tracks under the My Data tab and then click Add custom tracks. In the page, paste in the data URL or upload from local. ct1

ct2  

Track hubs enable quick and organized visualization of large datasets. They also make it easy to share data, since collaborators can view your tracks directly in the genome browser with a simple URL.

/zata/public_html_users/username is available as https://users.wenglab.org/username (eg. https://users.wenglab.org/gaomingshi).

  1. Classic 3-file style (useful if you have data from more than 1 genome assembly)

    • hub.txt (description of the track hub)
    • genomes.txt (specify the genome assemblies and corresponding trackDb.txt)
    • trackDb.txt (define the tracks)

track hub directory setup example: track hub folder set up

  1. 1-file style (easy setup for data from the same genome assembly, eg, GRCh38
    • hub.txt (add useOneFile on and genome xxx )

enter image description here  

Specify each track in the trackDb.txt.

define track  

5 basic parameters needed for a track are:

  • track (track id, needs to be unique)
  • type (data type)
  • bigDataUrl (the path of data, supports both local path and URL)
  • short label (label that shows up at the right side of the track in genome browser view)
  • long label (label that shows up above the track in genome browser view)

other useful parameters:

  • autoScale On (useful for scaling bigWig view)
  • maxHeightPixels (height of track)
  • negateValues On (useful for set - strand RNA-seq signal as negative value)
  • color (set track color, supports RGB)
  • visibility (set each track to ideal visibility)

To add an entry for each dataset, it’s helpful to use a loop to modify a template file by inserting each dataset’s unique metadata. Below is an example of how I created the ENCODE Epigenetics Collection hub.

  • Screenshot of ATAC-seq metadata file: metadata
  • Template file track.txt:
track.txt
track File_Type_FID
type bigWig
shortLabel EID
longLabel NAME File_Type signal
bigDataUrl https://www.encodeproject.org/files/FID/@@download/FID.bigWig
visibility full
maxHeightPixels 50
color RGB
autoScale on
  • Code to prepare trackDb.txt:
Terminal window
rm -f trackDb.txt
for File_Type in ATAC DNase CTCF H3K4me3 H3K27ac
do
cat ${File_Type}-List.txt | while IFS=$'\t' read -r EID FID name BIOTYPE Organ
do
NAME=$(echo $name | awk -F "_ENCDO" '{print $1}')
RGB=$(grep -wi "${File_Type}" signal.color.txt | cut -f 2)
echo -e "${File_Type}\t${OID}\t${EID}\t${BIOTYPE}\t${RGB}"
sed -e "s/EID/${EID}/g" -e "s/FID/${FID}/g" \
-e "s/File_Type/${File_Type}/" -e "s/RGB/${RGB}/" \
-e "s|NAME|${NAME}|" track.txt > trackDb.txt
done
done
  1. Share the URL of hub.txt for people to load at track hub page, eg. http://users.wenglab.org/gaomingshi/ENCODE_Reg/hub.txt
  2. Create a session and share session URL (for advanced users, need to create a UCSC Genome Browser account) see the following links for more details: https://genome.ucsc.edu/cgi-bin/hgSession https://genome.ucsc.edu/goldenPath/help/hgSessionHelp.html
  • shortLabel needs to be shorter than 17 characters,
  • trackDb.txt has trouble processing ’ (quotation mark). Avoid using it if you can.