microsud / microbiomeutilities

The is mostly a wrapper tool using phyloseq and microbiome R packages.
https://microsud.github.io/microbiomeutilities/
Other
33 stars 7 forks source link

Error in `check_aesthetics()`: ! plot_ordination_utils #178

Closed imonteroo closed 2 years ago

imonteroo commented 2 years ago

I am trying with my own phyloseq object (that works with plot_ordination) but when I try :+1:

nmordinationbray = ordinate(ps_aa, method="NMDS", distance = "bray") plot_ordination_utils(ps_aa, nmordinationbray, color = "group", plot.arrow = TRUE, scale.arrow = NULL, top.taxa = 5)

I receive:

Error incheck_aesthetics(): ! Aesthetics must be either length 1 or the same as the data (1): xend and yend Runrlang::last_error()to see where the error occurred.

imonteroo commented 2 years ago

I fix it by adding format_to_besthit() function before ordinate(), but I would like to change the arrow labels, they are all the taxonomy form kingdom to species.

microsud commented 2 years ago

This somehow missed my attention. My Apologies. For future reference I suggest checking the microViz package for high level functionality for ordination plots. https://david-barnett.github.io/microViz/articles/web-only/ordination.html

Best wishes, Sudarshan