Using a log scale for an axis using the ggplot2 R packge (CC110)

preview_player
Показать описание
Scaling an axis with the log scale is straightforward to achieve in R with the scale_x_log10 (or scale_y_log10) and coord_trans functions from ggplot2. In this episode of Code Club, Pat will discuss these two sets of functions and when to use each to help accentuate the differences between gropus that have low abundances. He'll also add a line to indicate the limit of detection using geom_vline/geom_hline.

Do you have a figure that you would like to receive a critique or help improving? Let me know and I'd be happy to arrange a guest appearance!

You can also find complete tutorials for learning R with the tidyverse using...

0:00 Introduction
4:03 Log scale
6:24 Fixing zeroes
10:42 scale_x_log10 vs coord_trans
15:46 Fixing threshold for which genera to show
17:03 Indicating the limit of detection
19:23 Fixing appearance of axis labels
20:48 Contrasting linear and log scales
Рекомендации по теме
Комментарии
Автор

Something I'm curious about - take the continuous and log-scaled versions of the plot generated in this episode and share it with a friend. Does their ability to interpret the plot differ if they are a scientists or not?

Riffomonas
Автор

Amazing video, is there a way to calculate the p value each taxon acros groups. I know the X-axis is log transformed but how can you show the difference beween groups in each taxon? Thank you for making this valuable tutorial!

abdimicro
Автор

Thanks for this video! How do you feel about using this method in comparison to a method like the R Corncob package for analyzing differential abundance in microbial communities? Corncob does not seem to work for small sample sizes (such as 3 biological replicates per condition), whereas this method does work for that sample size.

ColleenAhern
Автор

Dear professor, I did the subsampling of my data. However, the number of sequences are very slightly different from each other. The difference is only 5 (at most). Would it be allright if I continue the pipeline by taking min. number of sequence as nseqs_per_sample? OR :) Do you suggest me to obtain exactly same number of sequence by doing normalization?

tayyipkaraman
Автор

the code you given on your blog does not wok :(

monica
visit shbcf.ru