Hi there,
I am analyzing high-throughput metabolomics data.
The samples were run in 6 batches.
I previously used sva/combat to normalize for the batch effects. We have since re-run the feature finding, I am running my old script on new data and now getting an error. The rows are the samples, and the columns are the metabolites.
df_CmB<-ComBat(t(df),batch=df_MSBa,mod=NULL)
> str(df)
num [1:5771, 1:5164] 10.3 11.2 11.1 13 11.7 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:5771] "PA14_EM_1-1_A-10_1839" "PA14_EM_1-1_A-11_1840" "PA14_EM_1-1_A-12_1841" "PA14_EM_1-1_A-1_1830" ...
..$ : chr [1:5164] "nf_7526" "nf_3587" "nf_1096" "nf_4568" ...
> str( df_MSBa)
Factor w/ 6 levels "MSB1","MSB2",..: 1 1 1 1 1 1 1 1 1 1 ...
> length(df_MSBa)
[1] 5771
I"m getting 2 different error messages. The first time it said 0 covariates, the second 6.
Any help is appreciated.
> df_CmB<-ComBat(t(df),batch=df_MSBa,mod=NULL)
Found6batches
Adjusting for0covariate(s) or covariate level(s)
Standardizing Data across genes
Error in solve.default(crossprod(design), tcrossprod(t(design), as.matrix(dat))) :
Lapack routine dgesv: system is exactly singular: U[6,6] = 0
> df_CmB<-ComBat(t(df),batch=df_MSBa,mod=NULL)
Found6batches
Adjusting for-6covariate(s) or covariate level(s)
Standardizing Data across genes
Error in tcrossprod(t(design), as.matrix(dat)) :
non-conformable arguments
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] sva_3.26.0 BiocParallel_1.12.0 genefilter_1.60.0 mgcv_1.8-22
[5] nlme_3.1-131 plyr_1.8.4 dplyr_0.7.4 gdata_2.18.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.14 compiler_3.4.3 bindr_0.1
[4] bitops_1.0-6 tools_3.4.3 digest_0.6.13
[7] bit_1.1-12 annotate_1.56.1 RSQLite_2.0
[10] memoise_1.1.0 tibble_1.3.4 lattice_0.20-35
[13] pkgconfig_2.0.1 rlang_0.1.6 Matrix_1.2-12
[16] DBI_0.7 parallel_3.4.3 bindrcpp_0.2
[19] IRanges_2.12.0 S4Vectors_0.16.0 gtools_3.5.0
[22] stats4_3.4.3 bit64_0.9-7 grid_3.4.3
[25] glue_1.2.0 Biobase_2.38.0 R6_2.2.2
[28] AnnotationDbi_1.40.0 survival_2.41-3 XML_3.98-1.9
[31] limma_3.34.5 blob_1.1.0 magrittr_1.5
[34] matrixStats_0.52.2 splines_3.4.3 BiocGenerics_0.24.0
[37] assertthat_0.2.0 xtable_1.8-2 RCurl_1.95-4.9