[BioC] howto plot a figure like UCSC genome browser by Gviz

Ou, Jianhong Jianhong.Ou at umassmed.edu
Tue Sep 10 19:58:43 CEST 2013


Dear Robert,

Thanks a lot. It works great.

Yours sincerely,

Jianhong Ou

LRB 670A
Program in Gene Function and Expression
364 Plantation Street Worcester,
MA 01605




On 9/10/13 11:22 AM, "Robert Ivanek" <robert.ivanek at unibas.ch> wrote:

>Dear Jianhong,
>
>The parameter fill.mountain has to be a vector with 2 elements - colors.
>First one is used for negative values and second one for positive ones.
>
>Following piece of code should fill in the area in "black":
>
>
>gcContent <- UcscTrack(genome = "mm9", chromosome = "chrX",
>    track = "GC Percent", table = "gc5Base", from = from,
>    to = to, trackType = "DataTrack", start = "start",
>    end = "end", data = "score", type = "mountain", window = -1,
>    windowSize = 1500, fill.mountain = c("black", "black"),
>    col.mountain = "black", name = "GC Percent")
>
>
>Best
>Robert
>
>On 09/09/13 18:30, Ou, Jianhong wrote:
>> Dear all,
>> 
>> I want to plot a track via Gviz in mountain type. However, it looks
>>like that fill.mountain does not work. How do I fill the area under the
>>curve in black? Thanks.
>> 
>>> library(Gviz)
>> Loading required package: grid
>>> from <- 65921878
>>> to <- 65980988
>>> gcContent <- UcscTrack(genome = "mm9", chromosome = "chrX",
>> +  track = "GC Percent", table = "gc5Base", from = from,
>> +  to = to, trackType = "DataTrack", start = "start",
>> +  end = "end", data = "score", type = "mountain", window = -1,
>> +  windowSize = 1500, fill.mountain = "black",
>> +  col.mountain = "black", name = "GC Percent")
>>> plotTracks(list(gcContent), from=from, to=to, showTitle=F)
>>> sessionInfo()
>> R version 3.0.1 (2013-05-16)
>> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>> 
>> locale:
>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>> 
>> attached base packages:
>> [1] grid      stats     graphics  grDevices utils     datasets  methods
>>  base
>> 
>> other attached packages:
>> [1] Gviz_1.4.5
>> 
>> loaded via a namespace (and not attached):
>>  [1] AnnotationDbi_1.22.6   Biobase_2.20.1         BiocGenerics_0.6.0
>>  biomaRt_2.16.0         Biostrings_2.28.0
>>  [6] biovizBase_1.8.1       bitops_1.0-6           BSgenome_1.28.0
>>  cluster_1.14.4         colorspace_1.2-2
>> [11] DBI_0.2-7              dichromat_2.0-0
>>GenomicFeatures_1.12.3 GenomicRanges_1.12.5   Hmisc_3.12-2
>> [16] IRanges_1.18.3         labeling_0.2           lattice_0.20-23
>>  munsell_0.4.2          parallel_3.0.1
>> [21] plyr_1.8               RColorBrewer_1.0-5     RCurl_1.95-4.1
>>  rpart_4.1-3            Rsamtools_1.12.4
>> [26] RSQLite_0.11.4         rtracklayer_1.20.4     scales_0.2.3
>>  stats4_3.0.1           stringr_0.6.2
>> [31] tools_3.0.1            XML_3.95-0.2           zlibbioc_1.6.0
>> 
>> 
>> Yours sincerely,
>> 
>> Jianhong Ou
>> 
>> LRB 670A
>> Program in Gene Function and Expression
>> 364 Plantation Street Worcester,
>> MA 01605
>> 
>> 	[[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>>http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>_______________________________________________
>Bioconductor mailing list
>Bioconductor at r-project.org
>https://stat.ethz.ch/mailman/listinfo/bioconductor
>Search the archives:
>http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list