joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
569 stars 187 forks source link

How to add taxa data and environmental data together using plot_network #757

Open slvrshot opened 7 years ago

slvrshot commented 7 years ago

image

Hi @joey711 I am trying to use the network feature to explore co-occurence of drug and antibiotic genes detected from four sampling locations. I am able to plot the network using the environmental data but I can't figure out a way to get the shapes to correspond to my top 10 genes (or taxa).

This is my code: data(testdata) ig = make_network(testdata,dist.fun="jaccard",max.dist = 0.3) plot_network(ig, testdata, color = "Description", shape = "Gut_Location", line_weight = 0.4, label = NULL)

I am able to show just the genes (taxa) using this code: jg = make_network(testdata, "taxa", "jaccard", 0.3) plot_network(jg, testdata, "taxa", color = "Family", shape = "Description", line_weight = 0.4, label = NULL)

But I cannot figure how to show information from both in one graph.

Also when summarizing this data how should it read..."We explored co-occurrence of drug and antibiotic genes at the four locations using a jaccard max distance of 0.3"....does that sound right and what exactly does that mean? Is there a way to show how well correlated samples are using Pearson or Spearman?

Thanks!!

Stabilo12 commented 6 years ago

Hi Slvrshot, Do you know already some answers? I'm curious, as well.

slvrshot commented 6 years ago

@Stabilo12

I ended up using SparCC and importing the network into Cytoscape. There may be a way to do it but I never got an answer for phyloseq.