I tend to go with stacked barplots because it's what my supervisors expect - I show the most relevant dozen or so taxa with everything else grouped into 'Other'. I'd be keen to hear your thoughts on krona plots (they could be an improvement over stacked barplots if online journals could embed them with their interactivity intact).
@@Riffomonas heatmaps generated by ampvis2 give more information to the reader but maybe there is a better way? Looking forward to finding other options
@@coralpardo8825 We'll definitely get to heatmaps in the next few episodes to stay tuned! I'm not a huge fan, but they do have a place in your data viz toolkit
Can you tell me what the name of the tutorial is that comes before this one that explains the setting up of the initial code that is shown in the first few minutes of the video. Or provide the link. Thanks Mark Hodson
Hi Mark - thanks for watching! The episodes are all numbered (this is CC102) to try to make it easier to find other episodes. CC101 is here: ua-cam.com/video/e3rKYipvdJo/v-deo.html. Also, you can find the full listing on the blog: riffomonas.org/code_club/
I love your channels. A questions to you and fellow fans, is there a tutorial that walks us throw basic vegan package functions in R to calculate basic relative abundance for each taxonomic levels to start with?
I am trying to create a stacked bar chart for soil carbon inventories with two stacked bars (organic and inorganic C) for each site. Any guidance there? I can get one stacked chart but can't seem to get the second one to show up
Hi Kendall - two ideas: are you using scale_x_discrete? Make sure you’re using the correct values for the breaks. Are you sure you have two x-axis values? Maybe double check by running count() on the column you’re mapping to x
Thank you professor for this video. I have one question. In this figure, there is a legend "Cyanobacteria/chloroplast". As far as I understand chloroplast and cyanobacteria are two different things in microbiome data. Could you tell me why it's written "Cyanobacteria/chloroplast"?
Thank you for the wonderful tutorials, please i have an issue with joining columns at data entering stage I don’t know how you arranged the OTU table, metadata and taxa tables. Need your help
Hi Sauban - thanks for watching! I'd encourage you to check out the previous episode to this one that goes over where the data came from and how the joins and dplyr steps were carried out ua-cam.com/video/e3rKYipvdJo/v-deo.html
@@Riffomonas I followed the video, it is interesting and understandable thank you Sir. my problem is my OTU table is totally different from the one you used. if i can get your email i will be glad to send you the table format. it is showing me that "join column must be present in data". thank you
I order the groups by frequencies, so you kinda know if a group is more frequent in a bar or another. But yeah, I think this is the worst way to represent relative frequencies except for all the other ways that I know of.
Ah, don't be so pessimistic! Tomorrow's episode will demonstrate how to do what you're describing. Eventually, we'll get to strip charts and jitter plots for each OTU arrayed across the x-axis (or y-axis). That's my favorite approach
Hi Pat. Great videos, helping massively with my PhD here in the UK. Is it possible to create two different stacked bar chart charts from the same ‘cleaned data’ (generated in CC101)? For example, in relation to your videos, I have two time points. So for your data I would have NonDC1, DC1, C1 (as in timepoint 1) as well as NonDC2, DC2, C2 (as in timepoint 2). I am interested in seeing only timepoint 1 variables in one chart, and timepoint 2 variables in another chart (ie 3 variables only on one chart, but I want to generate both using one string of commands). I have tried editing your code to do this but I’m a newbie so still learning. For now, I will create two ‘clean up data’ codes to account for both timepoint and create both sets of charts separately, but I’m sure what I have described can be done from one ‘clean up data’ (otu_rel_abund collation) Thanks in advance James
Thanks James! Just to be super clear I hate stacked barcharts 🤓. Regardless you could process all the data together and then use filters to make separate data frames with the data you want in each figure
@@rishikeshdash12 You should look at the different legend arguments for theme. I think you want the legend.position argument for the theme function. Also, if it wasn't clear from the video, I think stacked bar charts are pretty horrible 🤣
Hi Pat, Great tutorial. Thank you for making it available! How did you group the OTUs that could not be assigned into phylum level into "Bacteria_unclassified"? I have OTUs that could not be assigned at phylum level and are therefore "blank" at phylum level. This appears in my figure with "blank" instead of "Bacteria_unclassified". Kind regards, Martin
What is your favorite way to represent relative abundance data?
I tend to go with stacked barplots because it's what my supervisors expect - I show the most relevant dozen or so taxa with everything else grouped into 'Other'. I'd be keen to hear your thoughts on krona plots (they could be an improvement over stacked barplots if online journals could embed them with their interactivity intact).
Check out the next video where I’ll show how to make the stacked bar charts you’re describing
@@Riffomonas When do you use relative abundance in metagenomics sequencing vs. blast x hit results? Which one is more accurate?
@@Riffomonas Is there a color palette for 39 organisms?
@@lucyintheskyzzz1 hah - no. Really shouldn't be using more than 5-7 colors
Thank you so much, Dr. Schloss!
Looking forward to learning other ways of presenting this type of data. Thank you for these videos, I have learned a lot!
My pleasure! Holler if you have any ideas you want me to demonstrate
@@Riffomonas heatmaps generated by ampvis2 give more information to the reader but maybe there is a better way? Looking forward to finding other options
@@coralpardo8825 We'll definitely get to heatmaps in the next few episodes to stay tuned! I'm not a huge fan, but they do have a place in your data viz toolkit
Can you tell me what the name of the tutorial is that comes before this one that explains the setting up of the initial code that is shown in the first few minutes of the video. Or provide the link. Thanks Mark Hodson
Hi Mark - thanks for watching! The episodes are all numbered (this is CC102) to try to make it easier to find other episodes. CC101 is here: ua-cam.com/video/e3rKYipvdJo/v-deo.html. Also, you can find the full listing on the blog: riffomonas.org/code_club/
Hi, thank you, professor. I have a problem I think I miss something. the y axis is scaled from 0-0.5 I have no clue how to fix it
Thanks for watching! You can use scale_y_continuous and set the limits=c(0,1) or you can also use the ylim function
I love your channels. A questions to you and fellow fans, is there a tutorial that walks us throw basic vegan package functions in R to calculate basic relative abundance for each taxonomic levels to start with?
I am trying to create a stacked bar chart for soil carbon inventories with two stacked bars (organic and inorganic C) for each site. Any guidance there? I can get one stacked chart but can't seem to get the second one to show up
Hi Kendall - two ideas: are you using scale_x_discrete? Make sure you’re using the correct values for the breaks. Are you sure you have two x-axis values? Maybe double check by running count() on the column you’re mapping to x
Thank you professor for this video. I have one question. In this figure, there is a legend "Cyanobacteria/chloroplast". As far as I understand chloroplast and cyanobacteria are two different things in microbiome data. Could you tell me why it's written "Cyanobacteria/chloroplast"?
Thanks for watching Monzur! Chloroplasts are/were a type of Cyanobacteria to their taxonomy gets a little messy
Thank you for the wonderful tutorials, please i have an issue with joining columns at data entering stage I don’t know how you arranged the OTU table, metadata and taxa tables. Need your help
Hi Sauban - thanks for watching! I'd encourage you to check out the previous episode to this one that goes over where the data came from and how the joins and dplyr steps were carried out ua-cam.com/video/e3rKYipvdJo/v-deo.html
@@Riffomonas Thank you so much for your reply
@@Riffomonas I followed the video, it is interesting and understandable thank you Sir. my problem is my OTU table is totally different from the one you used. if i can get your email i will be glad to send you the table format. it is showing me that "join column must be present in data". thank you
Thank you so much that I am trying to visualize. I learned a lot.
Wonderful! Glad you're finding the videos useful
I order the groups by frequencies, so you kinda know if a group is more frequent in a bar or another. But yeah, I think this is the worst way to represent relative frequencies except for all the other ways that I know of.
Ah, don't be so pessimistic! Tomorrow's episode will demonstrate how to do what you're describing. Eventually, we'll get to strip charts and jitter plots for each OTU arrayed across the x-axis (or y-axis). That's my favorite approach
Hi Pat. Great videos, helping massively with my PhD here in the UK.
Is it possible to create two different stacked bar chart charts from the same ‘cleaned data’ (generated in CC101)? For example, in relation to your videos, I have two time points. So for your data I would have NonDC1, DC1, C1 (as in timepoint 1) as well as NonDC2, DC2, C2 (as in timepoint 2).
I am interested in seeing only timepoint 1 variables in one chart, and timepoint 2 variables in another chart (ie 3 variables only on one chart, but I want to generate both using one string of commands).
I have tried editing your code to do this but I’m a newbie so still learning. For now, I will create two ‘clean up data’ codes to account for both timepoint and create both sets of charts separately, but I’m sure what I have described can be done from one ‘clean up data’ (otu_rel_abund collation)
Thanks in advance
James
Thanks James! Just to be super clear I hate stacked barcharts 🤓. Regardless you could process all the data together and then use filters to make separate data frames with the data you want in each figure
Hello, a question do you know how can fix this error in `geom_text()`: Can't find stat called "prop"?
assuming you wrote right the script, you might not have installed or called the package you need to do that stat.
i have two legends and i want to show them in the top right of the graph, but in legend.position only top, left, right and bottom is available
You can give legend.position=c(0.8, 0.7) where the 0.8 and 0.7 are hte relative positions on the plot
@@Riffomonas But sir I want To show Them Horizontally top of the Graph.
Like It will show Above the 100 % relative Abundance
@@rishikeshdash12 You should look at the different legend arguments for theme. I think you want the legend.position argument for the theme function.
Also, if it wasn't clear from the video, I think stacked bar charts are pretty horrible 🤣
@@Riffomonas Sir, It's done I explored it.
I got it what I want
Using legend.position = "top",
legend.justification = "right"
@@Riffomonas One more thing I want to say That... You are a great Human being 😇
Hi Pat,
Great tutorial. Thank you for making it available!
How did you group the OTUs that could not be assigned into phylum level into "Bacteria_unclassified"?
I have OTUs that could not be assigned at phylum level and are therefore "blank" at phylum level. This appears in my figure with "blank" instead of "Bacteria_unclassified".
Kind regards,
Martin
Thanks! That is the classification that came from mothur