Error in zlm function model matrix
0
0
Entering edit mode
jka8119 ▴ 10
@jka8119-15080
Last seen 4.5 years ago

Hi,

I getting an error below with MAST:

scaRaw <- FromMatrix(as.matrix(fibronorm), fibroidentities, subset(genes, genes$primerid %in% row.names(fibronorm)))
cdr2 <-colSums(assay(scaRaw)>0)
colData(scaRaw)$cngeneson <- scale(cdr2)

cond<-factor(colData(scaRaw)$proinflammatoryvector)
cond<-relevel(cond,"cd55low")
colData(scaRaw)$condition<-cond
zlmCond <- zlm(~condition+cngeneson, scaRaw)

Error in object@modelMatrix[pos, , drop = FALSE] :
  (subscript) logical subscript too long

 

Not sure what the reason is. I never encountered this error before when using the zlm function.

>sessionInfo()

R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.6 (Santiago)

Matrix products: default
BLAS/LAPACK: /local/system/opt/R/3.4.2/lib/libopenblas_nehalemp-r0.2.20.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets
[8] methods   base

other attached packages:
 [1] scran_1.6.2                BiocParallel_1.12.0
 [3] scater_1.6.0               ggplot2_2.2.1
 [5] MAST_1.6.0                 SingleCellExperiment_1.0.0
 [7] SummarizedExperiment_1.8.0 DelayedArray_0.4.1
 [9] matrixStats_0.53.1         Biobase_2.38.0
[11] GenomicRanges_1.30.0       GenomeInfoDb_1.14.0
[13] IRanges_2.12.0             S4Vectors_0.16.0
[15] BiocGenerics_0.24.0

loaded via a namespace (and not attached):
 [1] dynamicTreeCut_1.63-1   viridis_0.4.0           httr_1.3.1
 [4] edgeR_3.20.1            splines_3.4.2           bit64_0.9-7
 [7] viridisLite_0.2.0       shiny_1.0.5             assertthat_0.2.0
[10] statmod_1.4.30          blob_1.1.0              GenomeInfoDbData_0.99.1
[13] vipor_0.4.5             progress_1.1.2          RSQLite_2.0
[16] lattice_0.20-35         glue_1.2.0              limma_3.34.1
[19] digest_0.6.12           XVector_0.18.0          colorspace_1.3-2
[22] htmltools_0.3.6         httpuv_1.3.5            Matrix_1.2-11
[25] plyr_1.8.4              XML_3.98-1.9            pkgconfig_2.0.1
[28] biomaRt_2.34.2          zlibbioc_1.24.0         xtable_1.8-2
[31] scales_0.5.0            tibble_1.3.4            DT_0.2
[34] lazyeval_0.2.1          magrittr_1.5            mime_0.5
[37] memoise_1.1.0           FNN_1.1                 beeswarm_0.2.3
[40] shinydashboard_0.6.1    tools_3.4.2             data.table_1.10.4-3
[43] prettyunits_1.0.2       stringr_1.2.0           munsell_0.4.3
[46] locfit_1.5-9.1          AnnotationDbi_1.40.0    bindrcpp_0.2
[49] compiler_3.4.2          rlang_0.1.4             rhdf5_2.22.0
[52] grid_3.4.2              RCurl_1.95-4.8          tximport_1.6.0
[55] htmlwidgets_0.9         rjson_0.2.15            igraph_1.2.1
[58] bitops_1.0-6            gtable_0.2.0            abind_1.4-5
[61] DBI_0.7                 reshape2_1.4.2          R6_2.2.2
[64] zoo_1.8-0               gridExtra_2.3           dplyr_0.7.4
[67] bit_1.1-12              bindr_0.1               stringi_1.1.5
[70] ggbeeswarm_0.6.0        Rcpp_0.12.16

MAST • 1.4k views
ADD COMMENT
0
Entering edit mode

It looks like you have a mismash of Bioconductor 3.7 and 3.6.  What does `BiocInstaller::biocValid()` report?  Did you install MAST off of github, or via Bioconductor?

ADD REPLY
0
Entering edit mode

Thanks. I installed the source package using 'install.packages'. BiocInstaller::biocValid() reports it to be too new.

ADD REPLY
0
Entering edit mode

Yup.  Downgrade MAST to version 1.4.1 (here: http://bioconductor.org/packages/3.6/bioc/html/MAST.html) or upgrade to R 3.5 and Bioconductor 3.7.

ADD REPLY
0
Entering edit mode

Still getting the same issue after reinstalling MAST (v 1.4.1). Perhaps i am having an issue with the version of limma i have?

ADD REPLY
0
Entering edit mode

Restart R, verify that you are running bioconductor 3.6 with BiocInstaller::biocValid() and make sure you aren't reloading from disk any "stale" objects that were created when you had mismatched package versions.  Checking that you can run the equivalent code in the MAITAnalysis vignette should serve a positive control.  I still suspect version mismatching of some sort is at fault here.

ADD REPLY
0
Entering edit mode

I ended up upgrading to Bioconductor 3.7 and R 3.5, MAST 1.6.0. That eventually solved the problem. Thanks for the help.

ADD REPLY

Login before adding your answer.

Traffic: 919 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6