Commit 0fad9a56 authored by Bernd Klaus's avatar Bernd Klaus

finalized samples plot

parent 72aecb63
......@@ -531,16 +531,39 @@ count_boxplot <- ggplot(counts_crc_tidy,
fill = sample_id) ) +
geom_boxplot() +
ylim(c(0, 10)) +
scale_fill_brewer(palette = "Paired") +
theme(axis.text.x = element_text(angle = 90, hjust = 1))
count_boxplot
```
We can see that the count distributions are not very different between the
samples. Here, limited the y--axis in order to ignore the outliers and tilted
the x--Axis labels, so that we can actually read them.
the x--Axis labels, so that we can actually read them. `r CRANpkg("ggplot2") `
allows you to directly use palettes from the [Colorbrewer project](http://colorbrewer2.org).
Here, we use a qualitative paletter called "Paired" instead of the default one.
## Exercise: Adapt the boxplot
Experiment with the color variable and try to create faceted plots using
`r facet_wrap()` or `r facet_grid()` : Do you see a pattern if you color / wrap the
boxplots by tissue and or patient ?
```{r exp_boxplot}
count_boxplot_tissue <- ggplot(counts_crc_tidy,
aes(x = sample_id_by_median,
y = log2(count),
fill = tissue)) +
geom_boxplot() +
ylim(c(0, 10)) +
theme(axis.text.x = element_text(angle = 90, hjust = 1))
count_boxplot_tissue
## Exercise:
count_boxplot_tissue + facet_grid( patient ~ .)
```
<!-- the median gene expression per sample relative to a reference -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment