i faced a problem while i was running qiime2r
i applied codes present in this Tutorial in the following link:
[qiime2r toturial]( Tutorial: Integrating QIIME2 and R for data visualization and analysis using qiime2R - Community Contributions / Tutorials - QIIME 2 Forum)
#shannon diversity
drawing shannon diversity versus time by this code:
metadata %>%
filter(!is.na(shannon)) %>%
ggplot(aes(x=
days-since-experiment-start
, y=shannon, color=body-site
)) +stat_summary(geom="errorbar", fun.data=mean_se, width=0) +
stat_summary(geom="line", fun.data=mean_se) +
stat_summary(geom="point", fun.data=mean_se) +
xlab("Days") +
ylab("Shannon Diversity") +
theme_q2r() + # try other themes like theme_bw() or theme_classic()
scale_color_viridis_d(name="Body Site") # use different color scale which is color blind friendly
ggsave("Shannon_by_time.pdf", height=3, width=4, device="pdf") # save a PDF 3 inches by 4 inches
results in this error:
Error: Problem with filter()
input ..1
.
i Input ..1
is !is.na(shannon)
.
x Input ..1
must be of size 34 or 1, not size 31.
qiime2r tutorial
sample-metadata.tsv (2.0 KB) qiime2rshannon.qza (69.1 KB) qiime2rtable.qza (52.9 KB) qiime2rtaxonomy.qza (92.4 KB)