You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I constructed a network at the family level for my microbial data set, but I want to color the dots by Phylum. I'm having a lot of trouble doing this.
First of all, don't do this ⬆️ . spiec.easi applies a clr transformation with a pseudocount addition so the data you are supplying is incorrect.
plot_network is a phyloseq function, so I'm not entire sure what's going on. If I had to guess, the Phylum column contains all missing values or something. Without the looking at your data, I can't be sure.
Hi there, I constructed a network at the family level for my microbial data set, but I want to color the dots by Phylum. I'm having a lot of trouble doing this.
Here's my code:
**xt<-microbiome::transform(ex1, 'clr')
mb<-spiec.easi(xt, method='mb', lambda.min.ratio=1e-2, nlambda=20, pulsar.params=list(rep.num=50))
ig2.mb <-adj2igraph(getRefit(mb), vertex.attr = list(name=as.vector(tax_table(xt)[,"Family'])))
plot_network(ig2.mb, xt, type='taxa')**
My code successfully creates the network at the family level, but I can't color by phylum. I have tried:
plot_network(ig2.mb, xt, type='taxa', color="Phylum")
which gives me
Error: Must request at least one colour from a hue palette.
Then I've tried,
plot_network(ig2.mb, xt, type='taxa', color=tax_table(xt)[,"Phylum"])
which gives me
Error in
parse_expr()
:!
x
must contain exactly 1 expression, not 26.Help!
Thanks
The text was updated successfully, but these errors were encountered: