MENU

Fun & Interesting

Using the R system function to run another program and create lefse LDA plots (CC114)

Riffomonas Project 11,333 4 years ago
Video Not Working? Fix It Now

In this episode of Code Club, we'll show how you can call another program from within R using the system function. We'll call the lefse function from the mothur software package. Pat will then create an LDA score plot with ggplot2 and discuss the strengths and weaknesses of this popular data visualizaton technique. Pat will use RStudio, the #system function and the #geom_col function from the #ggplot2 package to create the LDA score plots. The accompanying blog post can be found at https://www.riffomonas.org/code_club/2021-06-10-lefse. The paper describing lefe can be found here: https://genomebiology.biomedcentral.com/articles/10.1186/gb-2011-12-6-r60 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! If you're interested in taking an upcoming 3 day R workshop, email me at [email protected]! R: https://r-project.org RStudio: https://rstudio.com Raw data: https://github.com/riffomonas/raw_data/releases/latest Workshops: https://www.mothur.org/wiki/workshops You can also find complete tutorials for learning R with the tidyverse using... Microbial ecology data: https://www.riffomonas.org/minimalR/ General data: https://www.riffomonas.org/generalR/ 0:00 Introduction 5:34 Creating files to run lefse 10:03 Installing mothur and running in R/Rstudio 13:53 Creating function to setup files and run lefse 16:53 Creating lefse LDA plot 19:32 Improving appearace of LDA plot 24:34 Critique of LDA plots

Comment