Show the name of genetic elements and change the color according to its feature using UcscTrack
2
0
Entering edit mode
@tiphaine-martin-6416
Last seen 6.1 years ago
France

Dear Florian,

I would like to show the common name of genetic elements and not the UCSC's identifier (I think it is what we see).

In addition, I would like to know if it is possible to have the color of genetic elements that depends on the type of its features as you did for Ensembl data  via BiomartGeneRegionTrack.

 

Regards, Tiphaine

Currently, it is my code.

gen <- "hg19"
chr <- "chr13"
end <- 32507139
start <- 31264764

ucsc4 <-  UcscTrack(genome = gen, chromosome = chr,track = "knownGene", from = start, to = end, trackType = "GeneRegionTrack", rstarts = "exonStarts", rends = "exonEnds",
gene = "name", symbol = "name", transcript = "name", strand = "strand", id = "name", name = "UCSC Genes",stacking="pack", group="name", fontcolor="black", groupAnnotation = "group", just.group = "above",size=2, showId=TRUE, col.line = NULL, col = NULL)

plotTracks(ucsc4)

 

 sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
 [1] stats4    parallel  grid      stats     graphics  grDevices utils     datasets  methods  
[10] base     

other attached packages:
 [1] XVector_0.6.0        rtracklayer_1.26.2   BiocInstaller_1.16.1 coMET_0.99.8        
 [5] Gviz_1.10.9          GenomicRanges_1.18.4 GenomeInfoDb_1.2.4   IRanges_2.0.1       
 [9] S4Vectors_0.4.0      BiocGenerics_0.12.1  biomaRt_2.22.0
gviz ucsc • 1.7k views
ADD COMMENT
0
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.1 years ago
Switzerland

Hi Tiphaine,

the UCSC table that you are using here does not include gene symbols or common names or the like. You could either go for one that does (refGene does though the name2 property, I think), or create your GeneRegionTrack from TxDB object, or rely on the BiomartGeneRegionTrack Ensembl gene models. Please carefully read the section about UCSCTracks in the vignette and its documentation page for details. 

The same holds true for the type of genetic elements. UCSC does not expose this information readily through their web service API, so we can't use it in the visualisation.

I haven't really come across a convincing argument why the UCSC gene models should be any better than what Enseml has. To a large extend they are virtually identical, at least when it comes to the RefSeq subset. And since the Biomart interface is much cleaner and also much more flexible compared to UCSC I would strongly recommend switching over to BiomartGeneRegionTracks for your gene models. Its also much faster than UCSC.

Florian

ADD COMMENT
0
Entering edit mode
@tiphaine-martin-6416
Last seen 6.1 years ago
France

thanks for this information

ADD COMMENT

Login before adding your answer.

Traffic: 930 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6