Continued, in this present, to draw the customized UCSC gene Track With Gviz package.

In summary

Selected Genomes: Mouse Assembly _July 2007(NCBI/mm9)

Position/Search Term: chrX:65,921,878-65,980,988

Reference genes: Ensembl

Setup interested genomic location

1
2
from <- 65921878
to <- 65980988

Extract known genes in this region

1
2
3
4
5
6
7
knownGenes <- UcscTrack(genome = "mm9", chromosome = "chrX",
                        track = "knownGene", from = from, to = to,
                        trackType = "GeneRegionTrack",
                        rstarts = "exonStarts", rends = "exonEnds",
                        gene = "name", symbol = "name",
                        transcript = "name", strand = "strand",
                        fill = "#8282d2", name = "UCSC Genes")

Extract reference genes from Ensemble database

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
refGenes <- UcscTrack(genome = "mm9", chromosome = "chrX",
                      track = "xenoRefGene", from = from, to = to,
                      trackType = "GeneRegionTrack",
                      rstarts = "exonStarts", rends = "exonEnds",
                      gene = "name",  symbol = "name2",
                      transcript = "name", strand = "strand",
                      fill = "#8282d2", stacking = "dense",
                      name = "Other RefSeq")
ensGenes <- UcscTrack(genome = "mm9", chromosome = "chrX",
                      track = "ensGene", from = from, to = to,
                      trackType = "GeneRegionTrack",
                      rstarts = "exonStarts", rends = "exonEnds",
                      gene = "name", symbol = "name2",
                      transcript = "name", strand = "strand",
                      fill = "#960000", name = "Ensembl Genes")

Extract location for CpGIsland and SNP

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
cpgIslands <- UcscTrack(genome = "mm9", chromosome = "chrX",
                        track = "cpgIslandExt", from = from, to = to,
                        trackType = "AnnotationTrack",
                        start = "chromStart", end = "chromEnd",
                        id = "name", shape = "box", fill = "#006400",
                        name = "CpG Islands")
snpLocations <-  UcscTrack(genome = "mm9", chromosome = "chrX",
                           track = "snp128", from = from, to = to,
                           trackType = "AnnotationTrack",
                           start = "chromStart", end = "chromEnd",
                           id = "name", feature = "func",
                           strand = "strand", shape = "box",
                           stacking = "dense", fill = "black",
                           name = "SNPs")

conservation and GC content

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
conservation <- UcscTrack(genome = "mm9", chromosome = "chrX",
                          track = "Conservation",
                          table = "phyloP30wayPlacental",
                          from = from, to = to, trackType = "DataTrack",
                          start = "start", end = "end", data = "score",
                          type = "hist", window = "auto",
                          col.histogram = "darkblue",
                          fill.histogram = "darkblue",
                          ylim = c(-3.7, 4), name = "Conservation")
gcContent <- UcscTrack(genome = "mm9", chromosome = "chrX",
                       track = "GC Percent", table = "gc5Base",
                       from = from, to = to, trackType = "DataTrack",
                       start = "start", end = "end", data = "score",
                       type = "hist", window = -1, windowSize = 1500,
                       fill.histogram = "black", col.histogram = "black",
                       ylim = c(30, 70), name = "GC Percent")

lable information for aix and chromosome

1
2
axTrack <- GenomeAxisTrack()
idxTrack <- IdeogramTrack(genome="mm9", chromosome="chrX")

Finally, put all above information together

1
2
3
plotTracks(list(idxTrack, axTrack, knownGenes, refGenes, ensGenes,
                cpgIslands, gcContent, conservation, snpLocations),
           from = from, to = to, showTitle = TRUE)

output fig1