Giter Club home page Giter Club logo

netcomi's People

Contributors

daydream-boost avatar stefpeschel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

netcomi's Issues

Comparison of groups

Dear Stefanie,

Thank you for developing such a nice tool. I was able to plot single network for my data.
I have taxonomy count data obtained from QIIME2 analysis. Now I want to plot network for 2 groups separately and then want to compare them. Now my questions are:

  1. Is there any minimum number of samples which is required in single group?
  2. netcomi takes count matrix as input then how to assign samples to particular group?

Please help me reaching my aim.
Thank you.

Error using spring as measure

This error occurred with my data so I tried using the tutorial data as well and got the same error.

data("soilrep")
soil_warm <- metagMisc::phyloseq_sep_variable(soilrep, "warmed")
net_seas_p <- netConstruct(soil_warm$yes, soil_warm$no,
                            filtTax = "highestVar",
                            filtTaxPar = list(highestVar = 500),
                            verbose = 3, measure = "spring", 
                            zeroMethod = "pseudo",
                            normMethod = "clr")

Infos regarding changed arguments:
Zero handling included in 'spring'.
Normalization ignored for measure 'spring'.
Sparsification included in 'spring'.

Data filtering ...
Intersection of taxa selected.
0 samples removed in data set 1.
0 samples removed in data set 2.
7812 taxa removed in each data set.
229 taxa and 28 samples remaining in data set 1.
229 taxa and 28 samples remaining in data set 2.

Calculate 'spring' associations ...
The input is identified as the covariance matrix.
Conducting Meinshausen & Buhlmann graph estimation (mb)....done
The input is identified as the covariance matrix.
Conducting Meinshausen & Buhlmann graph estimation (mb)....done
The input is identified as the covariance matrix.
Conducting Meinshausen & Buhlmann graph estimation (mb)....done
The input is identified as the covariance matrix.
Conducting Meinshausen & Buhlmann graph estimation (mb)....done
The input is identified as the covariance matrix.
Conducting Meinshausen & Buhlmann graph estimation (mb)....done
Error in mixedCCA::estimateR(data, type = type, method = Rmethod, tol = tol, :
There are variables in the data that have only zeros. Filter those variables before continuing.
In addition: Warning message:
In Matrix::nearPD(R, corr = TRUE) :
'nearPD()' did not converge in 100 iterations

Also, I would like to know how to obtain the number of nodes, edges from the network generated by netConstruct and number of clusters from netAnalyze output.

NetCoMi not recognizing SPRING?

I've installed SPRING (and all the other dependencies) and confirmed:

library(spring)
Loading required package: Rcpp
Loading required package: ggplot2
Loading required package: Matrix

Then when I run the suggested install command using R 4.1.1 or Rstudio 1.4.1717 on MacOSX Big Sur 11.5.2:

devtools::install_github("stefpeschel/NetCoMi", dependencies = TRUE, repos = c("https://cloud.r-project.org/", BiocManager::repositories()))

I get the following ERROR:

Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo stefpeschel/NetCoMi@HEAD
'getOption("repos")' replaces Bioconductor standard
repositories, see '?repositories' for details

replacement repositories:
CRAN: https://cran.rstudio.com/

✓ checking for file ‘/private/var/folders/44/328tj6qx57v92q1rs1skzm8c0000gn/T/Rtmp4iYQym/remotes2e033eecdfcd/stefpeschel-NetCoMi-387ec62/DESCRIPTION’ ...
─ preparing ‘NetCoMi’:
✓ checking DESCRIPTION meta-information ...
─ installing the package to process help pages
-----------------------------------
ERROR: dependency ‘SPRING’ is not available for package ‘NetCoMi’
─ removing ‘/private/var/folders/44/328tj6qx57v92q1rs1skzm8c0000gn/T/RtmpRo0XG4/Rinst2eb252a012df/NetCoMi’
-----------------------------------
ERROR: package installation failed
Error: Failed to install 'NetCoMi' from GitHub:
System command 'R' failed, exit status: 1, stdout + stderr:
E> * checking for file ‘/private/var/folders/44/328tj6qx57v92q1rs1skzm8c0000gn/T/Rtmp4iYQym/remotes2e033eecdfcd/stefpeschel-NetCoMi-387ec62/DESCRIPTION’ ... OK
E> * preparing ‘NetCoMi’:
E> * checking DESCRIPTION meta-information ... OK
E> * installing the package to process help pages
E> -----------------------------------
E> ERROR: dependency ‘SPRING’ is not available for package ‘NetCoMi’
E> * removing ‘/private/var/folders/44/328tj6qx57v92q1rs1skzm8c0000gn/T/RtmpRo0XG4/Rinst2eb252a012df/NetCoMi’
E> -----------------------------------
E> ERROR: package installation failed

Any thoughts?

Aitchison or Bray

Hello everyone,

I have a doubt about the correct approach to use for my data: I have performed shotgun metagenomic and classification using Kraken2/Bracken, than I have imported Bracken genera table into a phyloseq object. The otu table of this object have been already transformed to relative abundance (thus it not contains raw counts), is it right to use Aitchison distance in this case to create construct the network in the function "netConstruct"?
thank you in advance for your help

minimum number of samples for net construct?

Hi,

I am wondering whether you need a minimus number of samples when you run this:
net_single <- netConstruct(amgut1.filt,
filtTax = "highestFreq",
filtTaxPar = list(highestFreq = 100),
filtSamp = "totalReads",
filtSampPar = list(totalReads = 1000),
measure = "spring",
measurePar = list(nlambda=10,
rep.num=10),
normMethod = "none",
zeroMethod = "none",
sparsMethod = "none",
dissFunc = "signed",
verbose = 3,
seed = 123456)
I have changed the nlamba and rep.num to 50 for my data.

The thing is I have four samples and then I get this message for my data: Error in netAnalyze(net_singlehal, clustMethod = "cluster_fast_greedy") :
Network is empty.

Thanks a lot

Error on zero treatment

Hello Stefanie,
Thanks for your cool package. I am quite new in network analysis and R. I was trying using netconstruct on my own dataset.
However, error developed when I used zeroMethod="multRepl", but not zeroMethod="pseudo" .
Would you help me to work out the problem?

The codes ad error messages are the following:
"> net <- netConstruct(physeq,

  •                 measure = "pearson",
    
  •                 normMethod = "clr", 
    
  •                 zeroMethod = "multRepl",
    
  •                 sparsMethod = "threshold", 
    
  •                 thresh = 0.3,
    
  •                 verbose = 3)
    

8799 taxa and 84 samples remaining.

Zero treatment:
Execute multRepl() ... Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'as.matrix': Column(s) containing all zeros/unobserved values were found (check it out using zPatterns).

cran/bioconductor?

While this benchmark isn't currently attained by similar software (e.g., zdk123/SpiecEasi#90), are you planning on publishing NetCoMi on CRAN/Bioconductor? Conda would also be great, as done for SpiecEasi

New error with netAnalyze

Hello!

I ran script that worked yesterday, now today getting this error! Tried running the net_single (using amgut data) example in the Basic Usage and I get the same error when running netAnalyze.

Error in graph.adjacency.dense(adjmatrix, mode = mode, weighted = weighted, :
VECTOR_ELT() can only be applied to a 'list', not a 'NULL'

installation on R

Hi I am not able to install NetCoMi in R studio version 4.0.2. I have tried installing from a local Zip file as well as after turning this into a .tar.gz file. Here is the read-out of the R installation command, is there any way you can help with this? Thank you in advance.

system("R CMD build NetCoMi")

  • checking for file ‘NetCoMi/DESCRIPTION’ ... OK
  • preparing ‘NetCoMi’:
  • checking DESCRIPTION meta-information ... OK
  • installing the package to process help pages
    -----------------------------------
    ERROR: dependencies ‘SpiecEasi’, ‘WGCNA’, ‘doSNOW’, ‘propr’, ‘qgraph’, ‘SPRING’, ‘LaplacesDemon’, ‘cccd’ are not available for package ‘NetCoMi’
  • removing ‘/private/var/folders/_9/dvqyx4xcx3wwstdv74lh0xw00003ms/T/Rtmp54FxM5/Rinst16f8769578a36/NetCoMi’
    -----------------------------------
    ERROR: package installation failed

I tried installing the dependencies but still am not able to:

install.packages("~/Downloads/SpiecEasi_1.1.0.tar.gz", repos = NULL, type="source")
Installing package into ‘/Users/curanga/R/library’
(as ‘lib’ is unspecified)

  • installing source package ‘SpiecEasi’ ...
    ** using staged installation
    ** libs
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/curanga/R/library/Rcpp/include' -I'/Users/curanga/R/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c ADMM.cpp -o ADMM.o
    ADMM.cpp:25:9: warning: unused variable 'n' [-Wunused-variable]
    int n = A.n_cols;
    ^
    ADMM.cpp:36:9: warning: unused variable 'l' [-Wunused-variable]
    int l = k;
    ^
    ADMM.cpp:38:9: warning: unused variable 'n' [-Wunused-variable]
    int n = A.n_cols;
    ^
    3 warnings generated.
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/curanga/R/library/Rcpp/include' -I'/Users/curanga/R/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/curanga/R/library/Rcpp/include' -I'/Users/curanga/R/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c matops.cpp -o matops.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/curanga/R/library/Rcpp/include' -I'/Users/curanga/R/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c sqrtNewton.cpp -o sqrtNewton.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/curanga/R/library/Rcpp/include' -I'/Users/curanga/R/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c svthresh.cpp -o svthresh.o
    svthresh.cpp:11:9: warning: unused variable 'n' [-Wunused-variable]
    int n = A.n_cols;
    ^
    1 warning generated.
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o SpiecEasi.so ADMM.o RcppExports.o matops.o sqrtNewton.o svthresh.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
    ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
    ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
    ld: library not found for -lgfortran
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [SpiecEasi.so] Error 1
    ERROR: compilation failed for package ‘SpiecEasi’
  • removing ‘/Users/curanga/R/library/SpiecEasi’
    Warning in install.packages :
    installation of package ‘/Users/curanga/Downloads/SpiecEasi_1.1.0.tar.gz’ had non-zero exit status

nlambda and rep.num options

Great package - I was hoping for more insight into how to choose the appropriate nlambda and rep.num for the SPRING measure.

How do you determine which metric is best for your dataset? Increasing the nlambda changes the hubs in my dataset, but how do you know what number is the right one?

Any help would be greatly appreciated.

how many connection a node has

Hello,
I am new in using your package. I made a similar analysis like soil microbiome example in your tutorial but with my data.
I got a beautiful plot, but now I would like to know how strong are the nodes connected to each other / how many connection a node has.
Is there any tool to find out these connection?

Thanks in advantage

Issue with plot.microNetProps

Hi,
I am trying to plot the results of netAnalyze using plot.microNetProps, but I keep getting the error:

Error in grDevices::col2rgb(col) : invalid color name ''

I am feeding a chr vector to colorVec with the hex of the colors. I tried using grDevices::col2rgb with the same vector and it works outside of the plotting function. I have already tried updating my R version, the packages and the also restarting the session. No clue what is causing the error. Any idea?

Identify the members of a node

Hello,
First, thank you for developing such great tools!

But I wanted to know if it was possible to identify the components of a node?
With the summary function, I can see that my network is composed of 4 nodes, with a different number of species in each. But I have too many species to be able to read them correctly on the plot.
Is there a method to identify them directly?

Thanks, Mathisse

Question about plotting 2 data sets

Hi,
First of all, I love NetCoMi, but I have some basic math questions about how it works. I am comparing a "control" dataset with two other datasets separately. Why are the control layouts different depending on the dataset I am comparing it to? I would like to know if it is possible to keep the same layout in the control network plots or if the control network will change according to the compared dataset. What is the mathematical basis of this?

Best wishes,

Carla

error with featVecCol

Hello everyone and congratulation for this interesting package.
I am getting an error when trying to follow the tutorial to add phyla colors to my network. Particularly, when using the same commands in the turotial I get this error message:

Error in plot.microNetProps(props_single3, layout = "spring", repulsion = 0.6,  : 
  all(colnames(adja1) %in% names(featVecCol)) is not TRUE    

But i do not understand it very well can you give me an hand please? thanks

replacement has length zero error

Hi,

Thank you for developing this tool, it really facilitates the network analyses. I encountered an error:

> stat_SvsR = netCompare(netAn_SvsR, permTest = T, seed = 101, cores = 2)
Calculate network properties ... Done.
Execute permutation tests ... 
  |====================================================================| 100%Error in { : task 157 failed - "replacement has length zero"

Is it because the sample sizes are different between the two?

Thank you,

# split phyloseq object 
endo.split <- metagMisc::phyloseq_sep_variable(endo, 
                                                "Resistance")
endo.split$R # 2216 taxa and 97 samples
endo.split$S # 1990 taxa and 23 samples


net_SvsR = netConstruct(endo.split$S, endo.split$R,
                        filtTax = "highestFreq",
                        filtTaxPar = list(highestFreq = 100),
                        filtSamp = "totalReads",
                        filtSampPar = list(highestFreq = 1000),
                        zeroMethod = "none", 
                        normMethod = "none",
                        measure = "spring",
                        measurePar = list(nlambda = 10, rep.num = 10),
                        dissFunc = "signed",
                        sparsMethod = "none",
                        verbose = 3,
                        seed = 111)


# analysis

netAn_SvsR = netAnalyze(net_SvsR,
                        centrLCC = FALSE,
                        avDissIgnoreInf = TRUE,
                        sPathNorm = F, 
                        clustMethod = "cluster_fast_greedy",
                        hubPar = c("degree", "between", "closeness"),
                        hubQuant = 0.9,
                        weightDeg = FALSE,
                        lnormFit = TRUE,
                        normDeg = F,
                        normBetw = F,
                        normClose = F,
                        normEigen = F)

Network plot comparing two condition

I have got the network comparing two conditions using NetCoMi, but it shows ASVs name on the graph, how I can change it to genera name based on a column in taxonomy file and also I just want to mention hub taxa name on plot, not all.

Below is the complete code that I have used;

library("phyloseq")
library("biomformat")
library("ggplot2")
library("vegan")
library("grid")
library(plyr)
library(dplyr)
library(broom)
library('stringr')
library('DESeq2')
library('edgeR')
library('reshape2')
library('microbiome')
library(NetCoMi)
library(metagMisc)
#########################################################
otu <- read.table("asv.table.txt", row.names=1,sep="\t", header=T, blank.lines.skip=F, check.names=F)

otu <- as.matrix(otu)
metadata <- read.table("metadata.txt", header=T, row.names=1, stringsAsFactors=F, na.strings="NA")
taxa <- read.table("taxonomy.txt", row.names=1, sep="\t", header=F ,stringsAsFactors=F,quote="")
colnames(taxa) <- c("Kingdom","Phylum","Class","Order", "Family", "Genus", "Species")
## Create phyloseq objects
physeq <- phyloseq(otu_table(otu, taxa_are_rows=T),tax_table(as.matrix(taxa)),sample_data(metadata))
rank_names(physeq)
nsamples(physeq)
ntaxa(physeq)
###################
physeqN <- subset_samples(physeq, Compartment != "NC")
nsamples(physeqN)
physeqN <- subset_taxa(physeqN, (Order!="Chloroplast") | is.na(Order))
physeqN <- subset_taxa(physeqN, (Family!="Mitochondria") | is.na(Family))
physeqN <- subset_taxa(physeqN, (Kingdom!="Viridiplantae") | is.na(Kingdom))
physeqN <- filter_taxa(physeqN, function(x) sum(x) > 0, prune = TRUE)
physeqN <- subset_taxa(physeqN, Kingdom!="Unassigned")
physeqN <- subset_taxa(physeqN, Phylum!="P")
ntaxa(physeqN)
physeqN <- subset_taxa(physeqN, Phylum!="p")
ntaxa(physeqN)
depths <- sample_sums(physeqN)
summary(depths)


# remove BAU and take out singlets

physeqN <- subset_samples(physeqN, Region !="BAU")
physeqN <- subset_samples(physeqN, Region !="Barind")
physeqN = prune_taxa(taxa_sums(physeqN) > 1, physeqN)
physeqN <- subset_samples(physeqN, Compartment=="Soil")
#physeqN <- subset_samples(physeqN, Season=="Wet")

#######################################


ps1=tax_glom(physeqN,"Genus")

# Split the phyloseq object into two groups
amgut_split <- metagMisc::phyloseq_sep_variable(ps1, "Season")

# Network construction
net_season <- netConstruct(data = amgut_split$Wet, 
                           data2 = amgut_split$Dry,  
                           filtTax = "highestVar",
                           filtTaxPar = list(highestVar = 200),
                           measure = "spring",
                           measurePar = list(nlambda=10, 
                                             rep.num=10),
                           normMethod = "none", 
                           zeroMethod = "none",
                           sparsMethod = "none", 
                           dissFunc = "signed",
                           verbose = 3,
                           seed = 123456)



props_season <- netAnalyze(net_season, 
                           centrLCC = FALSE,
                           avDissIgnoreInf = TRUE,
                           sPathNorm = FALSE,
                           clustMethod = "cluster_fast_greedy",
                           hubPar = c("degree", "between", "closeness"),
                           hubQuant = 0.9,
                           lnormFit = TRUE,
                           normDeg = FALSE,
                           normBetw = FALSE,
                           normClose = FALSE,
                           normEigen = FALSE)

summary(props_season)
pdf("soil1.pdf", width = 12, height = 12)
plot(props_season, 
     sameLayout = TRUE, 
     layoutGroup = "union",
     rmSingles = "inboth", 
     nodeSize = "mclr", 
     labelScale = FALSE,
     cexNodes = 1.5, 
     cexLabels = 2.5,
     cexHubLabels = 3,
     cexTitle = 3.8,
     groupNames = c("Wet", "Dry"),
     hubBorderCol  = "gray40")

legend("bottom", title = "estimated association:", legend = c("+","-"), 
       col = c("#009900","red"), inset = 0.02, cex = 4, lty = 1, lwd = 4, 
       bty = "n", horiz = TRUE)

dev.off();

Labels of NetCoMi:::plot.microNetProps

Hi! I am using NetCoMi with SPRING these days and find it very useful when comparing different communities. While I was using NetCoMi:::plot.microNetProps, I found that an error came out when only one group (i.e., I just put one community inside) were analyzed as

Error in if (any(cexLabels1 == 0)) { :
missing value where TRUE/FALSE needed

when I set labels = FALSE. The error did not appear when I set different groups in and no labels were displayed in the plot.

What I want was to get a single network with no labels so I wrote like this:

plot(props_Rfr, 
     layout = "layout_with_fr",
     labels = FALSE,
     nodeColor = "feature",
     repulsion = 1.2,
     featVecCol = phyla,
     colorVec = phycol,
     rmSingles = "all",
     nodeSize = "mclr",
     cexNodes = 1.5,
     cexLabels = FALSE,
     cexHubLabels = 3,
     cexTitle = 3.8,
     nodeTransp = 20,
     borderWidth = 2
)

Why did it happen?

Thanks!

Trouble with netCompare() Permutation test

Hi!

I've been having trouble while performing netCompare() with permutation tests. With low number of permutation (30-40), everything flows smoothly, but I've been having trouble with 100L or higher permutations.

I've been running the following:

> comp_season <- netCompare(props_domos,permTest = T, nPerm = 100L, cores = 4L,verbose = T, logFile = "log.txt")
Calculate network properties ... Done.

I leave this process running overnight, and after that message, there was no further progress. No log file generated, neither.

In contrast, When performing the same command but with lower number of permutations, a message and a progress bar of permutations is displayed:

> comp_season <- netCompare(props_domos,permTest = T, nPerm = 10L, cores = 4L,verbose = T, logFile = "log.txt")
Calculate network properties ... Done.
Execute permutation tests ... 
starting worker for localhost:11328 
starting worker for localhost:11328 
starting worker for localhost:11328 
starting worker for localhost:11328 
  |                                                                              |   0%
Type: EXEC 

I've been running this on both Windows 10 and macOS Big Sur (11.6) systems, and I'm having the same issue. NetCoMi version 1.0.2, R version 4.0.2, Rstudio version 1.4.1717

Any idea what could be happening?

Thank you so much!
David

No hub node for group1

Hi authors,

I recently start using your package and find it very nice as it incorporate many potential workflows for microbiome data analysis.
But when I compare two networks, one did not have any hub node. Why does this happen? The hub node should be those above 95% quantile of the centrality distribution, then there should be some hubs exist. Could you explain this for me?

Thanks,
Danning

Issue during netConstruct

Hi, I'm just learning how to use NetCoMi, and after finally being able to install it because I had a couple of issues with some of the dependencies, I now have this issue after using the American Gut dataset and typing the same line of code for netConstruct as the tutorial. It seems like it's working and then I get the error message below. Has anyone experienced this or has this issue been brought before? Thanks

Data filtering ...
27 taxa removed.
100 taxa and 289 samples remaining.

Calculate 'spring' associations ...
Error in hatRupper[-ind_cutoff] <- bridgeInv(Kupper[-ind_cutoff], zratio1 = zratio1vec[-ind_cutoff], :
replacement has length zero

cores not working

Good evening Dr. Peschel

First of all I would like to express our appreciation for your great work!
I'm experimenting some issues about parallelization:
e.g
createAssoPerm(X, nPerm = 100, cores =3, computeAsso = FALSE, seed = 123456)
still works on single core.

our OS is Ubuntu 20.04
R version 4.1.1
Rstudio version 2021.09.0 builid 351
parallel version 4.1.1
NetCoMi version 1.0.2

many thanks for your kind attention

Simone

Error installation

Hello,

I have tried to install this package for 5 days no with continuous errors;

gcc -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Users/bioinformaticslabcomp1/Library/R/3.6/library/Rcpp/include" -I"/Users/bioinformaticslabcomp1/Library/R/3.6/library/RcppArmadillo/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fopenmp -fPIC -Wall -g -O2 -c C_SparCC.cpp -o C_SparCC.o
E> clang: error: unsupported option '-fopenmp'
E> make: *** [C_SparCC.o] Error 1
E> ERROR: compilation failed for package ‘NetCoMi’
E> * removing ‘/private/var/folders/rh/gg65ng2n2c150mh6_4slmpyw0000gn/T/RtmpJFpM9T/Rinst586549fefcb/NetCoMi’
E> -----------------------------------
E> ERROR: package installation failed

I have tried to install most of the packages manually. How can you help.

Error message when using netConstruct (measure=ccrepe)

Hi Stefanie,

Thank you for creating this really cool useful package.
I would like to create a microbiome network analysis of relative abundance OTUs and compare them between high and low values of Variable X.

I tried the following code:

net_single <- netConstruct(highVariableX, measure = "ccrepe" )
But the error message followed:

_Infos about changed arguments:
Measure 'ccrepe' needs fractions as input. 'normMethod' changed to 'fractions'.

Samples with NAs removed.
Error in netConstruct(highVariableX, measure = "ccrepe") :
No samples remaining after filtering._

However when I try using the ccrepe package, it manages to run with this code and produces a dataframe of p value, zstat, simscore, and q values, and the below warning messages:

testoutput <- ccrepe(x=highVariableX, iterations=20, min.subj=10)

Warning message:
In preprocess_data(CA) :
Excluding subject(s) 8, 120, 130, 226, 263, 280 from x because they have missing values.

Question:

  1. What am I doing wrong in the netConstruct?
  2. How can i then visualise my output from the ccrepe package in the next step of the NetCoMi package as it is not a microNet file?

(I would also like to confess that I am a very novice R user and apologies in advance if the solution is obvious)
Thanks much!
charlene

Is there a way to make 4 networks with the same layout?

Hello Stefanie,
I am quite new in network analysis. I would like to find out if the result that I got is a scale-free network or not? And I would like to measure modularity, is it possible to find out?
Could you please help me how to find out these informations?
I have a data set that can be divided into 4 categories. I would like to make 4 networks with the very same layout, to be more clear where are the differences. In the tutorial I found only 2 comparable categories, it didn’t work with 4 for me. Do you have a suggestion how to do this?
Thank you for your help
Peter

Installation error

Hi,
I have been encountering an error while trying to install the package. can you please help. Thanks

install_github("stefpeschel/NetCoMi")
Downloading GitHub repo stefpeschel/NetCoMi@HEAD
Error: Failed to install 'NetCoMi' from GitHub:
Command failed (128)
In addition: Warning message:
In system(full, intern = TRUE, ignore.stderr = quiet) :
running command ''/usr/bin/git' ls-remote https://git.bioconductor.org/packages/Biobase RELEASE_3_14 2>/dev/null' had status 128

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

Installation failure without error shown

Dear author,

I am new to network analysis for microbial data and hope try it with NetCoMi package.
I encountered some errors during installation, eventually came up with the following:

Downloading GitHub repo stefpeschel/NetCoMi@HEAD
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cran.rstudio.com/
Error: Failed to install 'NetCoMi' from GitHub:
Git does not seem to be installed on your system.

The error said Git does not seem to be installed, but I have installed it already...
Is it something like R cannot detect Git on my computer?
I have gone through several past issues regarding installation errors but with no success.

To ensure I have installed all dependencies, I followed recommendation in (#30) without difficulties. Besides, I once encountered error similar to (#48), but it somehow disappear.

May I get some advice on how to solve the issue? Any help would be highly appreciated!
Many thanks!

Node names truncated to 6 positions in netAnalyze plot

Hi Stefpeschel,
I've been making a lot of progress comparing networks using NetCoMI based on covariates and am trying to prepare figures showing results from my network analyses. One problem I'm stuck on is how to enable longer node names on the plots from function "netAnalyze". The ASV (or taxa) names are truncated to 6 positions so I have manny duplicate names. When I plot my differential networks (diffnet) I do not run into the same issue, the full ASV name is printed and not truncated to 6 positions. I tried changing the font size but that did not fix the problem.

#network analysis of netConstruct

C0204_netAnalyze<- netAnalyze(C0204_network, 
                           centrLCC = FALSE,
                           avDissIgnoreInf = TRUE,
                           sPathNorm = FALSE,
                           clustMethod = "cluster_fast_greedy",
                           hubPar = c("degree", "between", "closeness"),
                           hubQuant = 0.9,
                           lnormFit = TRUE,
                           normDeg = FALSE,
                           normBetw = FALSE,
                           normClose = FALSE,
                           normEigen = FALSE)
#for plotting
plot(C0204_netAnalyze, 
     sameLayout = TRUE, 
     layoutGroup="union",
     rmSingles="inboth",
     nodeColor = "cluster",
     nodeSize = "mclr",
     labelScale = FALSE,
     cexNodes = 1.5, 
     cexLabels = .5,
     cexHubLabels = 1,
     cexTitle = 1.5,
     groupNames = c("No", "Yes"),
     hubBorderCol  = "gray40")
``

Highlighting significant nodes

Hi, thanks for the useful tool, especially in quantitative comparison of 2 networks.

In my plot, I am trying to somehow highlight the nodes that have a significantly different eigenvector centrality calculated by netCompare. I am not so interested to highlight (eg. bold labels, thicker node circumference) the hubs of each network but rather the nodes that are significantly different between the networks as mentioned above.

I couldn't find out the trick from reading the manual... Thanks for any suggestion.

Automatically selecting intersection of taxa- how to override?

Hi there!
First off- thanks for making such an awesome package. This is an amazing tool.
I have an experimental design where I'm attempting to compare the structure of microbial networks between two different genotypes of mice. I'm constructing each network separately using a split physeq object.
My code is as follows:

net_geno <- netConstruct(data = physeq_split$B6, data2 = physeq_split$TCR, filtTax = "highestFreq", filtTaxPar = list(highestFreq = 100), measure = "spring", measurePar = list(nlambda=10, rep.num=10), normMethod = "none", zeroMethod = "none", sparsMethod = "none", dissFunc = "signed", verbose = 3, seed = 123456)

when I run it I get the message "Intersection of taxa selected" no matter what I do to modify the taxon filtering criteria. I know based on previous analyses that the microbiota of the knockout mice (TCR) contain some keystone taxa that are absent in the wild type mice (B6) which I would like to include in the analysis. How can I override this additional filtering?

Thanks!

Network is empty when trying to netAnalyze()

I am running a network with the following command which follows many of the settings you put in your tutorial:

net_single = netConstruct(cazyme_profile_reshape,
                          filtTax = "none",
                          filtSamp = "totalReads",
                          filtSampPar = list(totalReads = 1000),
                          measure = "spring",
                          measurePar = list(nlambda=50, 
                                            rep.num=50),
                          normMethod = "none", 
                          zeroMethod = "none",
                          sparsMethod = "none", 
                          dissFunc = "signed",
                          verbose = 3,
                          seed = 123456)

The input dataframe is:

> dim(cazyme_profile_reshape)
[1] 1689   25

When I try to analyse the network with netAnalyze() I get the following error:

Error in netAnalyze(net_single, centrLCC = TRUE, clustMethod = "cluster_fast_greedy",  : 
  Network is empty.

Would you have any insight as to why this is occurring? Is it perhaps because I am not filtering taxa?

Edge thickness in plot function

Dear NetCoMi devs,

First of all thank you for such wonderful package. I am having a lot of fun!

I have a question about the edgeWidth argument in the plot function. I am following the first part of the tutorial:

net_single <- netConstruct(amgut1.filt, verbose = 3, 
                           measure = "spieceasi",
                           measurePar = list(method = "mb", 
                                             nlambda=20, 
                                             pulsar.params=list(rep.num=20)),
                           normMethod = "none", zeroMethod = "none",
                           sparsMethod = "none", seed = 123456)
...

Untile the command line: plot(props_single, nodeColor = "cluster", nodeSize = "eigenvector")

By default edgeWidth = 1, but seems to be applied only to specific edges, i.e. those in bold. Why is that?

Thank you!

Installation error

Hi Stefanie,
I met a problem while installing NetCoMi as shown below. Are there any suggestions to solve this error?

Thank you so much.

Kai

devtools::install_github("stefpeschel/NetCoMi",

  •                      dependencies = c("Depends", "Imports"),
    
  •                      repos = c("https://cloud.r-project.org/",
    
  •                                BiocManager::repositories()))
    

_Error: Failed to install 'unknown package' from GitHub:
HTTP error 403.
API rate limit exceeded for 47.19.177.245. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

Rate limit remaining: 0/60
Rate limit reset at: 2022-04-09 17:12:55 UTC

To increase your GitHub API rate limit

  • Use usethis::create_github_token() to create a Personal Access Token.
  • Use usethis::edit_r_environ() and add the token as GITHUB_PAT._

Issue with netConstruct with knn algorithm

Hi!

I am trying to construct the graph with knn algorithm. My data is a pre-computed association matrix, and my parameters are listed below:

net <- netConstruct(data = matrix, 
                    dataType = "correlation", 
                    sparsMethod = "knn",
                    kNeighbor = 10,
                    knnMutual = FALSE)

But I get the error message:

Sparsify associations via 'knn' ... Done.
Error in if (all(x.tmp <= 1)) { : missing value where TRUE/FALSE needed
In addition: Warning message:
In sqrt(0.5 * (1 - xvec)) : NaNs produced

You give an tutorial example for knn using count data, but does it work for association matrix? If so, is there a way to fix this bug? In addition, the default value for kNeighbor is 3L, what's the point for "L" here? I am using version 1.0.2, and I got some success with threshold method for this data.

Many thanks!

Hang

Installation Error

Hi,

Trying to install this in R 4.1.2 and endlessly getting errors. I've gone through closed issues and tried various methods, but it keeps spitting back errors when installing. Any input on how to fix this? It does not work if I try to install SpiecEasi or SPRING separately.

Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo stefpeschel/NetCoMi@HEAD
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
CRAN: https://cran.rstudio.com/

These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: cli (3.1.0 -> 3.1.1) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 3
Downloading GitHub repo zdk123/SpiecEasi@HEAD
✓ checking for file ‘/private/var/folders/9_/tg2nr0d945v54g87153420bw0000gn/T/RtmphbGZp6/remotes2e8c113a4c11/zdk123-SpiecEasi-c463727/DESCRIPTION’ (3.3s)
─ preparing ‘SpiecEasi’:
✓ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts (657ms)
─ checking for empty or unneeded directories
Removed empty directory ‘SpiecEasi/inst’
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘SpiecEasi_1.1.2.tar.gz’

  • installing source package ‘SpiecEasi’ ...
    ** using staged installation
    ** libs
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c ADMM.cpp -o ADMM.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c matops.cpp -o matops.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c sqrtNewton.cpp -o sqrtNewton.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c svthresh.cpp -o svthresh.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o SpiecEasi.so ADMM.o RcppExports.o matops.o sqrtNewton.o svthresh.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
    ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
    ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
    ld: library not found for -lgfortran
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [SpiecEasi.so] Error 1
    ERROR: compilation failed for package ‘SpiecEasi’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/SpiecEasi’
    Warning in i.p(...) :
    installation of package ‘/var/folders/9_/tg2nr0d945v54g87153420bw0000gn/T//RtmphbGZp6/file2e8ca57f8ed/SpiecEasi_1.1.2.tar.gz’ had non-zero exit status
    Downloading GitHub repo GraceYoon/SPRING@HEAD
    These packages have more recent versions available.
    It is recommended to update all of them.
    Which would you like to update?

1: All
2: CRAN packages only
3: None
4: mixedCCA (1.4.6 -> 71da2060b...) [GitHub]
5: cli (3.1.0 -> 3.1.1 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 3
Downloading GitHub repo zdk123/SpiecEasi@HEAD
Skipping SpiecEasi, it is already being installed
Downloading GitHub repo zdk123/SpiecEasi@HEAD
Skipping SpiecEasi, it is already being installed
✓ checking for file ‘/private/var/folders/9_/tg2nr0d945v54g87153420bw0000gn/T/RtmphbGZp6/remotes2e8c3fb89924/GraceYoon-SPRING-470fe2d/DESCRIPTION’ (9.8s)
─ preparing ‘SPRING’: (529ms)
✓ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts (620ms)
─ checking for empty or unneeded directories
─ building ‘SPRING_1.0.4.tar.gz’

ERROR: dependency ‘SpiecEasi’ is not available for package ‘SPRING’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/SPRING’
    Warning in i.p(...) :
    installation of package ‘/var/folders/9_/tg2nr0d945v54g87153420bw0000gn/T//RtmphbGZp6/file2e8c770041d7/SPRING_1.0.4.tar.gz’ had non-zero exit status
    Downloading GitHub repo zdk123/SpiecEasi@HEAD
    Skipping SpiecEasi, it is already being installed
    Downloading GitHub repo GraceYoon/SPRING@HEAD
    Skipping SPRING, it is already being installed
    ✓ checking for file ‘/private/var/folders/9_/tg2nr0d945v54g87153420bw0000gn/T/RtmphbGZp6/remotes2e8c34c3ffe3/stefpeschel-NetCoMi-55cc678/DESCRIPTION’ (655ms)
    ─ preparing ‘NetCoMi’: (1.3s)
    ✓ checking DESCRIPTION meta-information
    ─ installing the package to process help pages
    -----------------------------------
    ERROR: dependencies ‘SpiecEasi’, ‘SPRING’ are not available for package ‘NetCoMi’
    ─ removing ‘/private/var/folders/9_/tg2nr0d945v54g87153420bw0000gn/T/RtmpW78sBw/Rinst311c204a035b/NetCoMi’
    -----------------------------------
    ERROR: package installation failed
    Error: Failed to install 'NetCoMi' from GitHub:
    System command 'R' failed, exit status: 1, stdout & stderr were printed

Can't change edge colour when plotting differential networks

Hi,

First of all thank you for this great package and it's amazing documentation.

I run into a issue when I try to use change the colors of the edges with the plot.diffnet() function with the following code:

diffnet_colors <- RColorBrewer::brewer.pal(6, "Paired")

netDiff_Gen3 <- diffnet(netComp_Gen3,
                        diffMethod = "discordant",
                        discordThresh = 0.8, #default
                        adjust = "lfdr" #default
                        )

plot(netDiff_Gen3, 
     cexNodes = 1, 
     cexLegend = 1,
     cexTitle = 2,
     edgeCol = diffnet_colors,,
     legendGroupnames = c("Sensitive", "Resistant"),
     legendPos = c(0.7,1.6))

I get the following error message:

Error in plot.diffnet(netDiff_Gen3, cexNodes = 1, cexLegend = 1, cexTitle = 2,  : 
  length(col) == 6 is not TRUE

I checked manually and the object diffnet_colors is a character vector of length 6 just as required with the discordant method. I also tried to use the edgeCol argument with its default values:

plot(netDiff_Gen3, 
     cexNodes = 1, 
     cexLegend = 1,
     cexTitle = 2,
     edgeCol = c("hotpink", "aquamarine", "red", "orange", "green", "blue"),
     legendGroupnames = c("Sensitive", "Resistant"),
     legendPos = c(0.7,1.6))

And I get the same error message. The function plot.diffnet() works very well if I don't use the edgeCol argument.

Am I doing something wrong or is it a bug?

Thank you for your help :-)

Vivien

Netcompare Error after permutation

Hi Stefanie,

Thank you for this amazing library.

No issue with the network construction, analysis, and plotting. However, I encountered two errors after setting permutation for the netCompare function running separately for the 16S and ITS data (See below). Hope you can provide some insights.

Best,
Xiao

Error 1 (16S networks):

Calculate network properties ... Done.
Files './Field_analysis_ver2/network/bac_assoPerm_nperm1000.bmat and ./Field_analysis_ver2/network/bac_assoPerm_nperm1000.desc.txt created. 
Execute permutation tests ... 
  |======================================================================================| 100%
Stopping socket cluster ... Done.
Calculating p-values ... Error in netCompare(netAna16S, permTest = T, storeAssoPerm = T, fileStoreAssoPerm = "./Field_analysis_ver2/network/bac_assoPerm_nperm1000",  : 
  'list' object cannot be coerced to type 'double'

Error2 (ITS networks)

Calculate network properties ... Done.
Files './Field_analysis_ver2/network/FUN_assoPerm_nperm1000.bmat and ./Field_analysis_ver2/network/FUN_assoPerm_nperm1000.desc.txt created. 
Execute permutation tests ... 
  |================================================| 100%
Stopping socket cluster ... Done.
Calculating p-values ... Error in absDiffsPermDeg[b, ] <- propsPerm[[b]]$absDiffsCentr$absDiffDeg : 
  replacement has length zero

My codes:

fdataITS.gen = readRDS("./RDSdata/fdataITS_phylo_genus.rds")
fITS.metam = subset_samples(fdataITS.gen, metamStatus=="Fumigated")
taxtab.metam = fITS.metam@[email protected]
rownames(fITS.metam@[email protected]) = taxtab.metam[, "Genus"]
fITS.no = subset_samples(fdataITS.gen, metamStatus=="No-fumigated")
taxtab.no = fITS.no@[email protected]
rownames(fITS.no@[email protected]) = taxtab.no[, "Genus"]

netITS.spie = netConstruct(data = fITS.metam,
                       data2 = fITS.no,
                       measure = "spieceasi",
                       measurePar = list(lambda.min.ratio=1e-2, nlambda=20, pulsar.params=list(rep.num=50)),
                       filtTax = "highestFreq",
                       filtTaxPar = list(highestFreq=80),
                       zeroMethod = "multRepl",
                       normMethod = "clr",
                       sparsMethod = "threshold",
                       cores = parallel::detectCores()/2,
                       thresh = 0.6,
                       verbose = 3,
                       seed = 123456)

netAnaITS = netAnalyze(netITS.spie,
                       centrLCC = TRUE,
                       hubPar = c("degree", "between", "closeness", "eigenvector"),
                       clustMethod = "cluster_fast_greedy",
                       lnormFit = T,
                       normDeg = T,
                       normBetw = T,
                       normClose = T,
                       normEigen = T)

netCompareITS = netCompare(netAnaITS, 
                        permTest = T,
                        storeAssoPerm = T,
                        fileStoreAssoPerm = "./Field_analysis_ver2/network/FUN_assoPerm_nperm1000",
                        nPerm = 1000,
                        cores = 2, 
                        seed = 123)

Error when measure = "sparcc"

library('NetCoMi')
data("amgut1.filt")
measures <- c("pearson", "spearman", "bicor", "sparcc", "cclasso", "ccrepe",
"propr","gcoda", "spieceasi", "spring" )
testnet <- netConstruct(amgut1.filt,
filtTax = "highestVar",
filtTaxPar = list(highestVar = 20),
filtSamp = "totalReads",
filtSampPar = list(totalReads = 1000),
zeroMethod = "none", normMethod = "none",
measure = measures[4],
sparsMethod = "threshold", thresh = 0.3,
seed = 20190101)
Data filtering ...
0 samples removed.
107 taxa removed.
20 taxa and 289 samples remaining.
Calculate 'sparcc' associations ... Done.
Sparsify associations via 'threshold' ... Done.
testprops <- netAnalyze(testnet, clustMethod = "cluster_fast_greedy",hubPar = "eigenvector")
Warning message:
In max(eigen_unnorm) : no non-missing arguments to max; returning -Inf
summary(testprops)
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
'data' must be of a vector type, was 'NULL'

Error in installing NetCoMi

Hi, I've been trying to install NetCoMi to analyze my microbiome data. However, I've ran into this error:

image

I've successfully installed "devtools" and "BiocManager" before, yet I had a problem installing SpiecEasi package.

image

I'm wondering if this is the reason why I cannot install NetCoMi?
I'm looking forward to your help. Thank you already!!

Differential Network at taxa level

Hi Stephanie,

Is it possible to create or analyze network of two groups at taxa level instead of ASV?

First, I tried to combine at genus level as mentioned in the document. Then I tried to split the phyloseq data as follows:

amgut_split <- metagMisc::phyloseq_sep_variable(amgut_genus,
"Intervention")

But got the error as:
Error in validObject(.Object) : invalid class “otu_table” object:
OTU abundance data must have non-zero dimensions.

Warning messages "'nearPD()' did not converge in 100 iterations" in netConstruct

Hi,

Thanks for developing this terrific package!

I got some warning messages in the netConstruct step, here is my code:

net_spring <- netConstruct(genus, 
                           group = groups_vec,
                           filtTax = "highestFreq",
                           filtTaxPar = list(highestFreq = 100),
                           filtSamp = "totalReads",
                           filtSampPar = list(totalReads = 1000),
                           zeroMethod = "none", normMethod = "none",
                           measure = "spring",
                           measurePar = list(nlambda = 100, 
                                             rep.num = 100),
                           verbose = 3,
                           seed = 20190101)

These are the warning messages:

Warning messages:
1: In mixedCCA::estimateR(qdat, type = "trunc", method = Rmethod, tol = Rtol, :
There are variables in the data that have only zeros or only the same values.
2: In Matrix::nearPD(R, corr = TRUE) :
'nearPD()' did not converge in 100 iterations
3: 101 jobs had warning: "'nearPD()' did not converge in 100 iterations"
101 jobs had warning: "There are variables in the data that have only zeros or only the same values."
4: In mixedCCA::estimateR(qdat, type = "trunc", method = Rmethod, tol = Rtol, :
There are variables in the data that have only zeros or only the same values.
5: In Matrix::nearPD(R, corr = TRUE) :
'nearPD()' did not converge in 100 iterations
6: 101 jobs had warning: "'nearPD()' did not converge in 100 iterations"
101 jobs had warning: "There are variables in the data that have only zeros or only the same values."

I was wondering what is the meaning of "nearPD()' did not converge in 100 iterations", could I proceed to the next step then?

Thank a lot for your help!

Installation ERROR: dependency 'SPRING' is not available for package 'NetCoMi'

Hello,

I am getting the following error while trying to install NetCoMi. Seems to be a problem related with the dependency SPRING. So, I have installed SPRING: https://github.com/jchiquet/spring, but NetCoMi installation still fail.

Thank you!

> devtools::install_github("stefpeschel/NetCoMi", dependencies = TRUE,
+                          repos = c("https://cloud.r-project.org/",
+                                    BiocManager::repositories()))
Downloading GitHub repo stefpeschel/NetCoMi@HEAD
√  checking for file 'C:\Users\user\AppData\Local\Temp\RtmpYNlaoT\remotesc5043d511f5\stefpeschel-NetCoMi-fe3bd76/DESCRIPTION' ... 
-  preparing 'NetCoMi': (384ms)
√  checking DESCRIPTION meta-information ... 
-  cleaning src
-  installing the package to process help pages
         -----------------------------------
   ERROR: dependency 'SPRING' is not available for package 'NetCoMi'
-  removing 'C:/Users/user/AppData/Local/Temp/RtmpiCjVn3/Rinstf6c38b2d39/NetCoMi'
         -----------------------------------
   ERROR: package installation failed
Error: Failed to install 'NetCoMi' from GitHub:
  System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr:
E> * checking for file 'C:\Users\user\AppData\Local\Temp\RtmpYNlaoT\remotesc5043d511f5\stefpeschel-NetCoMi-fe3bd76/DESCRIPTION' ... OK
E> * preparing 'NetCoMi':
E> * checking DESCRIPTION meta-information ... OK
E> * cleaning src
E> * installing the package to process help pages
E>       -----------------------------------
E> ERROR: dependency 'SPRING' is not available for package 'NetCoMi'
E> * removing 'C:/Users/user/AppData/Local/Temp/RtmpiCjVn3/Rinstf6c38b2d39/NetCoMi'
E>       -----------------------------------
E> ERROR: package installation failed

plot.microNetPros, edgefilter could not work on negative correlation value

Hi NetComi team,

We recently found that edgefilterPar option plot.microNetPros function could not use on negative value properly.

When we used spearman correlation to construct network, 2000+ edges were found and we had to filter them by |correlation threshold| > 0.6. But then we noticed that no red line anymore, it seems that the filter works on real number instead of absolute number.

Is there a way to filter correlation by its absolute value?

Many thanks.

Our netcomi version is NetCoMi_1.0.2

Yz

About the counting of number of postive/negative corrrelations in network

Dear Dr. Peschel,

The package is very useful for my analysis, and I would like to thank you.

I have a question regarding the counting of significant connections in network. Especially in the case of Pearson/Spearman correlation analysis based network analysis.

The list of netprops$centralities$degree1 shows each core's connection, but I am wondering if it is possible to count positive negative connections (for total and each OTUs).

Is it possible to check these numbers with NetCoMi? If so, could you explain how to perform this?

Sincerely,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.