-
Firstly, here's the R Project I'm working with: If you download that entire directory, you'll be able to reproduce everything. NOTE: You'll need to install So, if I generate a box plot using the following code, here's what it looks like: # Pull all transcript expression values stored in FPKM measurement from ballgown object
fpkm <- texpr(bg, meas = "FPKM")
# Log transform data and add 1 to all values to artificually prevent log2(0).
fpkm <-log2(fpkm+1)
# Set plot colors for F/M
myColors <- ifelse(phenotype_table$Sex=="F", rgb(0.8,0.1,0.3,0.6),
ifelse(phenotype_table$Sex=="M", rgb(0.1,0.1,0.7,0.5),
"grey90")
)
# Generate box plot.
boxplot(fpkm, col = myColors, las=2, ylab='log2(FPKM+1)') Now, if I want to edit the margins so that I can see the full text on the x-axis, I add this line and here's how the plot looks now: # Set box plot margins (extreme values to show no effect on boxplot)
par(mar=c(100,100,100,100))
# Generate box plot.
boxplot(fpkm, col = myColors, las=2, ylab='log2(FPKM+1)') So, anyone have any ideas on how to resolve this? The alternative (and, arguably better approach), is to use Would appreciate any/all assistance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
And, here's a link to a tab-delimited version of the |
Beta Was this translation helpful? Give feedback.
-
Done in tidyverse |
Beta Was this translation helpful? Give feedback.
Done in tidyverse
https://github.com/epigeneticstoocean/2018_L18-adult-methylation/blob/main/code/05-ballgown-boxplots.md