joey711 / shiny-phyloseq

An interactive web application for demonstrating and using phyloseq.
http://joey711.github.io/shiny-phyloseq
GNU General Public License v3.0
58 stars 45 forks source link

include ellipse to plot_ordination #58

Open locon833 opened 9 years ago

locon833 commented 9 years ago

Is there a command to add ellipse around cluster in your NMDS or PCoA plots?

x1=plot_ordination(sponge.scale1,unifrac.nmds,color="Day")+geom_point(size=3)

I tried following: https://www.biostars.org/p/126454/

but hit a roadblock at ord = ordinate(GP1~Day, "CCA", "bray") Error in eval(expr, envir, enclos) : object 'Day' not found In addition: Warning message: First argument, physeq, as formula is deprecated. There is now an explicit formula argument. Please revise method call accordingly.

joey711 commented 8 years ago

I'll add this very soon...

spholmes commented 8 years ago

Joey If you look at the code in the paper I wrote with Sue Huse and Ana on prevotella and lifestyle in microbiome, there are several ellipse examples to go on.

I used the ellipse package

Susan

On Mon, May 16, 2016 at 9:34 AM, Paul J. McMurdie notifications@github.com wrote:

I'll add this very soon...

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/joey711/shiny-phyloseq/issues/58#issuecomment-219474158

Susan Holmes Professor, Statistics and BioX John Henry Samter Fellow in Undergraduate Education Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

joey711 commented 8 years ago

Thanks @spholmes ! Actually, ellipses are finally natively supported in ggplot2, so I was simply going to add an ellipse layer. I think it takes function inputs as alternative ellipse definitions. If so, I may peak at your examples and the ellipse package to expose those alternatives.

Right now I'm a bit distracted adding the plotly/D3 interactive versions, on a separate branch ftm. I should add this to that branch as a working demo before pushing into the master.

orenkolodny commented 7 years ago

Have ellipses been added, by any chance? I don't see anything in the documentation. Thanks! Oren