Open rsmote opened 6 years ago
I am happy to look into this, but could you give me a small dataset that can reproduce the error. It's hard to guess from the error message itself.
Best,
Thanks for the reply! I have attached two small example datasets. One is the metabolome and the other is 16S abundances for 100 rows each. I hope this helps.
Hi, I don't see a problem, below is what I did. You can see if you can reproduce. If there's still an error, please paste the output of "sessionInfo()", you might have a different version.
library(omicade4) library(matrixStats)
make matrices
dataA<-read.delim("Example_metabolome.txt",header=T, stringsAsFactors = FALSE) dataB<-read.delim("Example_Relabund.txt",header=T, stringsAsFactors = FALSE) dA<-apply(dataA[-1, -1], 2, as.numeric) rownames(dA) <- make.names(dataA$Sample[-1], unique = TRUE) dB<-apply(dataB[-1, -1], 2, as.numeric) rownames(dB) <- make.names(dataB$Sample[-1], unique = TRUE)
remove constant rows
dA <- dA[rowVars(dA) > 0, ] dB <- dB[rowVars(dB) > 0, ] df.list<-list(d1=dA,d2=dB)
MCIA
BFT.mcia <- mcia(df.list, cia.nf=2,cia.scan=FALSE,nsc=T,svd=TRUE)
plot
plot(BFT.mcia)
sessionInfo
sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.2 LTS
Matrix products: default BLAS: /usr/lib/libblas/libblas.so.3.6.0 LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=de_DE.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=Cattached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] matrixStats_0.52.2 omicade4_1.18.0 ade4_1.7-11 BiocInstaller_1.28.0
loaded via a namespace (and not attached): [1] MASS_7.3-47 compiler_3.4.1 tools_3.4.1 made4_1.52.0
I was able to reproduce. Thanks so much for this! Sorry for the delay in response!
Hello,
I'm trying to use MCIA for 16S and metabolomics data integration, but am getting an error.
The error reported is: ''svd' fail to convergence, 'eigen' used to perform singular value decompositionError in if (tab[i, i] < 0) { : missing value where TRUE/FALSE needed"
Here is the code I'm using: library(omicade4)
dataA<-read.csv("Final_metabolome.csv",header=T) dataB<-read.csv("Final_Relabund.csv",header=T) dataA<-dataA[,-1] dataB<-dataB[,-1] df.list<-list(dataA,dataB) BFT.mcia <- mcia(df.list,cia.nf=2,cia.scan=FALSE,nsc=T,svd=TRUE)"
This is where the error is reported. Any guidance would be appreciated. Thanks!