Question: Plot just one y label in gtrellis
0
gravatar for Vinicius Henrique da Silva
2.9 years ago by
Brazil

I would like to plot just one y-axis label for each different track instead one for each chromosome in gtrellis package (In the manual example exemplified below the title "density" is repeated several times). I tried to modify the track_ylab parameter but it don't allows to specify which tracks must be named. There is any idea how to perform that? 

tiff("text.tiff")
gene = readRDS(system.file("extdata", "gencode_v19_protein_coding_genes.rds", package = "gtrellis"))
gene_density = genomicDensity(gene)

gtrellis_layout(byrow = FALSE, n_track = 2, ncol = 4, 
                add_ideogram_track = TRUE, add_name_track = TRUE,
                track_ylim = c(0, max(gene_density[[4]]), 0, 1), track_axis = c(TRUE, FALSE),
                track_height = unit.c(unit(1, "null"), unit(4, "mm")),
                track_ylab = c("density", ""))

add_lines_track(gene_density, gene_density[[4]])

col_fun = circlize::colorRamp2(seq(0, max(gene_density[[4]]), length = 11), 
                               rev(brewer.pal(11, "RdYlBu")))
add_heatmap_track(gene_density, gene_density[[4]], fill = col_fun)
dev.off()

 

> sessionInfo()

R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] tidyr_0.5.1          reshape_0.8.5        Biostrings_2.40.2    XVector_0.12.0      
 [5] circlize_0.3.7       RColorBrewer_1.1-2   gtrellis_1.4.2       GenomicRanges_1.24.2
 [9] GenomeInfoDb_1.8.3   IRanges_2.6.1        S4Vectors_0.10.2     BiocGenerics_0.18.0 

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.6          assertthat_0.1       plyr_1.8.4           magrittr_1.5        
 [5] GlobalOptions_0.0.10 zlibbioc_1.18.0      GetoptLong_0.1.3     rjson_0.2.15        
 [9] tools_3.3.0          colorspace_1.2-6     shape_1.4.2          tibble_1.1 

gtrellis • 357 views
ADD COMMENTlink modified 2.9 years ago • written 2.9 years ago by Vinicius Henrique da Silva40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 338 users visited in the last hour