Question: Celaref error relating to MAST DE ananlysis
gravatar for hamid.bolouri
6 months ago by
hamid.bolouri0 wrote:

I get an error running Celaref's "contrasteachgrouptothe_rest()" (details below). Traceback() suggests the problem is related to how data is passed to MAST. This is my first time using celaref, so I guess my inputs are not correctly configured. But I can't see the issue. Can anyone offer any insights?




cellInfoTbl <- data.frame(cellId=names(clusterIDs), Sample="blank" , Cluster=clusterIDs, group="group")

datasetse <- loadsefromtables(countsmatrix = normalizedPBMC, + cellinfotable = cellInfoTbl, + groupcol_name = "group")

datasetse <- trimsmallgroupsandlowexpressiongenes(datasetse, + minlibsize = 100, # set low to keep all cells! + mingroupmembership = 5,
+ mindetectedbyminsamples = 5)

detablequery <- contrasteachgrouptotherest(datasetse, "PBMC3K", num_cores = 4)

Error in checkArrayNames(exprsArray, cData, fData) : exprsArray must be numeric


7: stop("exprsArray must be numeric")

6: checkArrayNames(exprsArray, cData, fData)

5: MAST::FromMatrix(loggedcounts, cData = coldataforMAST, fData = rowData(dataset_se))

4: FUN(X[[i]], ...)

3: lapply(X = X, FUN = FUN, ...)

2: parallel::mclapply(groups2test, FUN = contrastthegrouptotherest, datasetse = datasetse, mc.cores = numcores)

1: contrasteachgrouptotherest(datasetse, "PBMC3K", num_cores = 4) >


Factor w/ 10 levels "0","1","2","3",..: 6 4 2 5 7 2 6 6 6 5 ...



[1] "dgCMatrix" attr(,"package") [1] "Matrix" >


4 x 4 sparse Matrix of class "dgCMatrix"


NOC2L . . . .

HES4 . . . .

ISG15 . . 0.6931472 2.197225

TNFRSF18 . 0.6931472 . .


sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Mojave 10.14.4

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.5/Resources/lib/libRlapack.dylib

locale: [1] enUS.UTF-8/enUS.UTF-8/enUS.UTF-8/C/enUS.UTF-8/en_US.UTF-8

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

other attached packages: [1] celarefData1.0.0 ExperimentHub1.8.0 AnnotationHub2.14.2 celaref1.0.1 SummarizedExperiment1.12.0 DelayedArray0.8.0
[7] BiocParallel1.16.5 matrixStats0.54.0 GenomicRanges1.34.0 GenomeInfoDb1.18.1 lsa0.73.1 SnowballC0.6.0
[13] Hmisc4.2-0 Formula1.2-3 survival2.43-3 lattice0.20-38 CellMix1.6.2 GSEABase1.44.0
[19] graph1.60.0 annotate1.60.0 XML3.98-1.16 stringr1.4.0 csSAM1.2.4 NMF0.21.0
[25] cluster2.0.7-1 rngtools1.3.1 pkgmaker0.27 registry0.5 pathview1.22.3
[31] AnnotationDbi1.44.0 IRanges2.16.0 S4Vectors0.20.1 Biobase2.42.0 BiocGenerics0.28.0 gage2.32.1
[37] clusterProfiler3.10.1 ggplot23.1.0 dplyr0.8.0.1 Seurat3.0.0

loaded via a namespace (and not attached): [1] R.methodsS31.7.1 tidyr0.8.2 acepack1.4.1 bit640.9-7 knitr1.21 irlba2.3.3
[7] R.utils2.7.0 data.table1.12.0 rpart4.1-13 KEGGREST1.22.0 RCurl1.95-4.11 doParallel1.0.14
[13] metap1.0 preprocessCore1.44.0 callr3.1.1 cowplot0.9.4 usethis1.4.0 RSQLite2.1.1
[19] RANN2.6.1 europepmc0.3 future1.11.0 bit1.1-14 enrichplot1.2.0 httpuv1.4.5.1
[25] xml21.2.0 assertthat0.2.0 viridis0.5.1 xfun0.4 hms0.4.2 promises1.0.1
[31] evaluate0.13 BiocInstaller1.32.1 fansi0.4.0 progress1.2.0 caTools1.17.1.1 Rgraphviz2.26.0
[37] igraph1.2.2 DBI1.0.0 htmlwidgets1.3 purrr0.3.0 backports1.1.3 gbRd0.4-11
[43] gridBase0.4-7 SingleCellExperiment1.4.1 remotes2.0.2 ROCR1.0-7 abind1.4-5 withr2.1.2
[49] ggforce0.2.2 triebeard0.3.0 checkmate1.9.1 sctransform0.2.0 prettyunits1.0.2 DOSE3.8.2
[55] ape5.3 lazyeval0.2.1 crayon1.3.4 genefilter1.64.0 pkgconfig2.0.2 labeling0.3
[61] tweenr1.0.1 nlme3.1-137 pkgload1.0.2 nnet7.3-12 devtools2.0.2 rlang0.3.1
[67] globals0.12.4 rsvd1.0.0 rprojroot1.3-2 polyclip1.10-0 lmtest0.9-36 Matrix1.2-15
[73] urltools1.7.3 zoo1.8-4 base64enc0.1-3 beeswarm0.2.3 ggridges0.5.1 processx3.2.1
[79] png0.1-7 viridisLite0.3.0 bitops1.0-6 R.oo1.22.0 KernSmooth2.23-15 Biostrings2.50.2
[85] blob1.1.1 qvalue2.14.1 gridGraphics0.3-0 scales1.0.0 lpSolve5.6.13 memoise1.1.0
[91] magrittr1.5 plyr1.8.4 ica1.0-2 gplots3.0.1 bibtex0.4.2 gdata2.18.0
[97] zlibbioc1.28.0 lsei1.2-0 RColorBrewer1.1-2 KEGGgraph1.42.0 fitdistrplus1.0-14 cli1.0.1
[103] XVector0.22.0 listenv0.7.0 pbapply1.3-4 ps1.3.0 htmlTable1.13.1 MASS7.3-51.1
[109] limSolve1.5.5.3 tidyselect0.2.5 MAST1.8.2 stringi1.3.1 yaml2.2.0 GOSemSim2.8.0
[115] latticeExtra0.6-28 ggrepel0.8.0 grid3.5.2 fastmatch1.1-0 tools3.5.2 future.apply1.1.0
[121] rstudioapi0.9.0 foreach1.4.4 foreign0.8-71 gridExtra2.3 farver1.1.0 Rtsne0.15
[127] ggraph1.0.2 digest0.6.18 rvcheck0.1.3 BiocManager1.30.4 shiny1.2.0 quadprog1.5-5
[133] Rcpp1.0.0 SDMTools1.1-221 later0.7.5 httr1.4.0 npsurv0.4-0 Rdpack0.10-1
[139] colorspace1.4-0 fs1.2.6 reticulate1.10 splines3.5.2 ggplotify0.0.3 plotly4.8.0
[145] sessioninfo1.1.1 xtable1.8-3 jsonlite1.6 corpcor1.6.9 UpSetR1.3.3 R62.4.0
[151] mime0.6 pillar1.3.1 htmltools0.3.6 glue1.3.0 interactiveDisplayBase1.20.0 codetools0.2-16
[157] fgsea1.8.0 utf81.1.4 pkgbuild1.0.2 tsne0.1-3 tibble2.0.1 curl3.3
[163] gtools3.8.1 GO.db3.7.0 rmarkdown1.11 desc1.2.0 munsell0.5.0 GenomeInfoDbData1.2.0
[169] DO.db2.9 iterators1.0.10 reshape21.4.3 gtable0.2.0

ADD COMMENTlink modified 6 months ago by sarah.williams120 • written 6 months ago by hamid.bolouri0

see below, should be answer.

ADD REPLYlink modified 6 months ago • written 6 months ago by sarah.williams120
Answer: Celaref error relating to MAST DE ananlysis
gravatar for sarah.williams1
6 months ago by
Melbourne, Monash University
sarah.williams120 wrote:

Hi Hamid, apologies for missing this issue. Just adding this response for record, as per our email.

Yes, that is an issue with the first version that you've got there (1.0.1) - sparse matrices weren't handled properly. A slight oversight!

That has been fixed now though - so I'd suggest updating the celaref package. You can get celaref v1.2.0 from the just released bioconductor 3.9 following instructions at: Or, if you don't want to update your bioconductor version, you could also upgrade to v1.1.10 (exactly the same as 1.2.0) directly from github with:

install.packages(devtools) #if devtools not already installed
ADD COMMENTlink written 6 months ago by sarah.williams120
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 304 users visited in the last hour