Closed Marieag closed 6 years ago
Also, sort-of-related, when I try to do co-ocurrence networks, it seems a lot of packages need to be installed for it to work (haven't gotten that far yet), would you happen to have a list of packages that is needed to run it?
Many thanks for raising this @Marieag.
beta.div
is part of adespatial package which you can install directly from RStudio. Once you have that installed, plot_taxa
will work well.taxa_level
function which gives community data at a given taxonomic rank, for example, to obtain census data at Phylum level, use; physeq<-taxa_level(pitlatrine, "Phylum")
. I hope that helps.
Sorry for the late response. Thanks for your feedback - plot_taxa is working fine after installing adespatial, but I'm getting a persistent error when doing the co-occurence networks,
co_occr <- co_occurence_network(pitlatrine, grouping_column = "Country", rhos = 0.35, method="cor",
+qval_threshold=0.05, select.condition = "V", scale.vertex.size=4, scale.edge.width=10,
+plotNetwork=T, plotBetweennessEeigenvalue=F)
Error in membership(temp_comm) : could not find function "membership"
I get this error with the tutorial dataset as well as my own, and with or without using taxa_level
.
Any ideas?
@Marieag, membership
function is part of the igraph
package. Therefore, you can install igraph and load it. Thereafter, this error will not appear anymore.
@AlfredUg. Strange. I had igraph
called already. I tried deleting the igraph
library folder, reinstalling and recalling the package when doing the co-occurence networks, and it worked afterwards. Some possible masking going on?
I now have the network graph, but I can't seem to create the betweeness plot, when
plotBetweennessEeigenvalue=T
regardless of
plotNetwork=F
or plotNetwork=T
It doesn't give me an error message, it just does not output any plots. I looked through construct_network.R - it seems to accept my object as g1
for the network plot, but not the betweenness plot.
I tried running the function plot_betweenness_eigenvalue
separately, and got the error
Error in igraph::betweenness(g1) : Not a graph object
.
I suspect something is going wrong when calling the actual plot in the function?
I'd really love to be able to make this graph, it's perfect for our data, so I hope you won't mind helping me out again. Thanks!
@Marieag, plotBetweennessEeigenvalue=T
produces plots of Betweenness Versus Eigen value centrality of the network in the working directory. After running co_ocurrence_network
with plotBetweennessEeigenvalue=T
, navigate to the working directory to find these plots.
Hi, sorry I never got back to you - thank you so much for your help. You're right, they're in the WD. Sorry for bothering you before checking :$
Hi @Marieag, am glad that works fine.
Hello,
How to deal with this error while using the function co_occurence_network?
Error in vegan::rrarefy(abund_table, min(rowSums(abund_table))) : object 'do_rrarefy' not found
@BS2018, check that package vegan is loaded. This error is a result of R not finding rrarefy function.
I hope that helps.
I have loaded almost everything library(microbiomeSeq) library(ape) library(igraph) library(DESeq2) library(KMDA) library(vegan) library(phyloseq) library(WGCNA) library(fso) library(randomForest) library(data.table) library(reshape2) library(gtable) library(ggplot2) library(gridExtra)
Even then I get the same error.
After installing vegan again I got it. Thank you so much.
Good stuff @BS2018
Hello again.
I'm getting another issue when trying to run this command
I'm running the latest stable versions of R and Rstudio, and have updated all packages, but I'm getting the issue with both my own dataset and the tutorial pitlatrine dataset. Any idea how to work around it?
Thanks, Marie