guigolab / ggsashimi

Command-line tool for the visualization of splicing events across multiple samples
MIT License
122 stars 42 forks source link

Change font size of transcript id when using `-gtf` #5

Closed ManavalanG closed 6 years ago

ManavalanG commented 6 years ago

I would like to change the size of transctipt id when using --gtf, but I am not sure which part of the R script needs to be modified to achieve this. Could you point to the part of the script that controls this? Thanks!

dgarrimar commented 6 years ago

Hi @ManavalanG, currently to change the size of the annotation labels you can use the option --base-size, but this will also change the size of the rest of the text in the plot. As a quick workaround, you can substitute line 420 of sashimi-plot.py:

gtfp = gtfp + theme(axis.line = element_blank(), axis.text.x = element_blank(), axis.ticks = element_blank())

by (for instance):

gtfp = gtfp + theme(axis.line = element_blank(), axis.text.x = element_blank(), axis.ticks = element_blank(), text = element_text(size=20))

This will set size=20 only to the annotation labels. Please let me know if you managed to solve it!

dgarrimar commented 6 years ago

Hi @ManavalanG, did this work for you?

ManavalanG commented 6 years ago

Thanks @dgarrimar! --base-size does what I need. Its description in --help was not readily apparent for me. Perhaps mention of the word "font" could be helpful.

emi80 commented 6 years ago

Maybe we should update the help message before closing this

dgarrimar commented 6 years ago

Ups.. indeed!