Im trying to plot my PCOA with qiime2R and ggplot2 since I find 2D UniFrac plots more informative than those given with Emperor in 3D. So I followed the qiime2R tutorial, but Im having trouble adding different aesthetics, I have seen other post but I don’t really understand the issue. Here's my code
Hi @jose_gacia,
I reclassified this as an "other bioinformatics tools" topic and gave it a more fitting title because this is not actually an error from QIIME 2 — you transferred your data into an R dataframe using qiime2r, but now you are trying to plot with ggplot. Others may be able to provide support but this is not a QIIME 2 technical support issue as originally classified.
Ok, the folfs at stack Overflow gave me the solution.
I had two errors.
In the first place the variable name is size=shannon_entropy instead of size=shannon like I had
The other error was in the scale_shape_manual function (where each value indicates the shape of the element: circles, triangles etc.). The length of the vector has to be equal to the number of elements in the variable. In my case, it was 3. As you can see the vector has two elements c(16,1). So an extra element had to be added c(18,16,17), for instance.
In any case, here´s the final code I managed to compile