Question: ELMER::createMAE() Error: $ operator is invalid for atomic vectors
0
gravatar for D
3 months ago by
D0
UK
D0 wrote:

Hi all,

I'm trying to get ELMER running on some of my own EPIC/RNAseq data but first I need to get the example working.

I'm encountering an error simply following the example, am I missing packages? (sessioninfo below):

> library(ELMER)
> # example input
> met <- matrix(rep(0,15),ncol = 5)
> colnames(met) <- c("Sample1",
+                    "Sample2", 
+                    "Sample3",
+                    "Sample4",
+                    "Sample5")
> rownames(met) <- c("cg26928153","cg16269199","cg13869341")
> 
> exp <- matrix(rep(0,15),ncol = 5)
> colnames(exp) <- c("Sample1",
+                    "Sample2", 
+                    "Sample3",
+                    "Sample4",
+                    "Sample5")
> rownames(exp) <- c("ENSG00000073282","ENSG00000078900","ENSG00000141510")
> 
> 
> assay <- c(rep("DNA methylation", ncol(met)),
+            rep("Gene expression", ncol(exp)))
> primary <- c(colnames(met),colnames(exp))
> colname <- c(colnames(met),colnames(exp))
> sampleMap <- data.frame(assay,primary,colname)
> 
> distal.probes <- get.feature.probe(genome = "hg19", 
+                                    met.platform = "EPIC")
Accessing grch37.ensembl.org to get TSS information
Downloading transcripts information from http://grch37.ensembl.org:80/biomart/martservice. Using: Human genes (GRCh37.p13)
Loading from disk
Returning distal probes: 341894
> 
> colData <- data.frame(sample = colnames(met))
> rownames(colData) <- colnames(met)
> 
> mae <- createMAE(exp = exp, 
+                  met = met,
+                  save = TRUE,
+                  filter.probes = distal.probes,
+                  colData = colData,
+                  sampleMap = sampleMap,
+                  linearize.exp = TRUE,
+                  save.filename = "mae.rda",
+                  met.platform = "EPIC",
+                  genome = "hg19",
+                  TCGA = FALSE)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Creating a SummarizedExperiment from gene expression input
Accessing grch37.ensembl.org to get gene information
Downloading genome information (try:0) Using: Human genes (GRCh37.p13)
Error: $ operator is invalid for atomic vectors

Any suggestions appreciated!

Cheers,

Dean

> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 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_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8   
 [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] biomaRt_2.40.1              sva_3.32.1                  genefilter_1.66.0           mgcv_1.8-28                 nlme_3.1-139               
 [6] edgeR_3.26.5                limma_3.40.2                ELMER_2.8.0                 ELMER.data_2.8.0            MultiAssayExperiment_1.10.4
[11] SummarizedExperiment_1.14.0 DelayedArray_0.10.0         BiocParallel_1.18.0         matrixStats_0.54.0          Biobase_2.44.0             
[16] GenomicRanges_1.36.0        GenomeInfoDb_1.20.0         IRanges_2.18.1              S4Vectors_0.22.0            BiocGenerics_0.30.0        

loaded via a namespace (and not attached):
  [1] backports_1.1.4             circlize_0.4.6              Hmisc_4.2-0                 corrplot_0.84               aroma.light_3.14.0         
  [6] plyr_1.8.4                  selectr_0.4-1               ConsensusClusterPlus_1.48.0 lazyeval_0.2.2              splines_3.6.0              
 [11] ggplot2_3.2.0               digest_0.6.20               foreach_1.4.4               ensembldb_2.8.0             htmltools_0.3.6            
 [16] magrittr_1.5                checkmate_1.9.4             memoise_1.1.0               BSgenome_1.52.0             cluster_2.0.8              
 [21] doParallel_1.0.14           ComplexHeatmap_2.0.0        Biostrings_2.52.0           readr_1.3.1                 annotate_1.62.0            
 [26] R.utils_2.9.0               prettyunits_1.0.2           colorspace_1.4-1            blob_1.1.1                  rvest_0.3.4                
 [31] ggrepel_0.8.1               xfun_0.8                    dplyr_0.8.3                 crayon_1.3.4                RCurl_1.95-4.12            
 [36] jsonlite_1.6                zoo_1.8-6                   survival_2.44-1.1           VariantAnnotation_1.30.1    iterators_1.0.10           
 [41] glue_1.3.1                  survminer_0.4.4             gtable_0.3.0                zlibbioc_1.30.0             XVector_0.24.0             
 [46] GetoptLong_0.1.7            shape_1.4.4                 scales_1.0.0                DESeq_1.36.0                DBI_1.0.0                  
 [51] ggthemes_4.2.0              Rcpp_1.0.1                  viridisLite_0.3.0           cmprsk_2.2-8                xtable_1.8-4               
 [56] progress_1.2.2              htmlTable_1.13.1            clue_0.3-57                 foreign_0.8-71              bit_1.1-14                 
 [61] matlab_1.0.2                km.ci_0.5-2                 Formula_1.2-3               htmlwidgets_1.3             httr_1.4.0                 
 [66] RColorBrewer_1.1-2          acepack_1.4.1               reshape_0.8.8               pkgconfig_2.0.2             XML_3.98-1.20              
 [71] R.methodsS3_1.7.1           Gviz_1.28.0                 nnet_7.3-12                 locfit_1.5-9.1              tidyselect_0.2.5           
 [76] rlang_0.4.0                 AnnotationDbi_1.46.0        munsell_0.5.0               tools_3.6.0                 downloader_0.4             
 [81] generics_0.0.2              RSQLite_2.1.1               broom_0.5.2                 evaluate_0.14               stringr_1.4.0              
 [86] yaml_2.2.0                  knitr_1.23                  bit64_0.9-7                 survMisc_0.5.5              purrr_0.3.2                
 [91] AnnotationFilter_1.8.0      TCGAbiolinks_2.12.2         EDASeq_2.18.0               R.oo_1.22.0                 xml2_1.2.0                 
 [96] compiler_3.6.0              rstudioapi_0.10             plotly_4.9.0                curl_3.3                    png_0.1-7                  
[101] ggsignif_0.5.0              tibble_2.1.3                geneplotter_1.62.0          stringi_1.4.3               GenomicFeatures_1.36.3     
[106] lattice_0.20-38             ProtGenerics_1.16.0         Matrix_1.2-17               KMsurv_0.1-5                pillar_1.4.2               
[111] GlobalOptions_0.1.0         data.table_1.12.2           bitops_1.0-6                rtracklayer_1.44.0          R6_2.4.0                   
[116] latticeExtra_0.6-28         hwriter_1.3.2               ShortRead_1.42.0            gridExtra_2.3               codetools_0.2-16           
[121] dichromat_2.0-0             assertthat_0.2.1            rjson_0.2.20                GenomicAlignments_1.20.1    Rsamtools_2.0.0            
[126] GenomeInfoDbData_1.2.1      hms_0.4.2                   grid_3.6.0                  rpart_4.1-15                tidyr_0.8.3                
[131] rmarkdown_1.13              ggpubr_0.2.1                biovizBase_1.32.0           base64enc_0.1-3
elmer • 110 views
ADD COMMENTlink written 3 months ago by D0
Answer: C: ELMER::createMAE() Error: $ operator is invalid for atomic vectors
2
gravatar for Tiago Chedraoui Silva
3 months ago by
Brazil - University of São Paulo/ Los Angeles - Cedars-Sinai Medical Center
Tiago Chedraoui Silva240 wrote:

Please, can you update to the GitHub version with:

BiocManager::install(c("tiagochst/ELMER.data","tiagochst/ELMER"))

I believe that was solved recently, but the updates are not in Bioconductor yet.

ADD COMMENTlink written 3 months ago by Tiago Chedraoui Silva240

Hi Tiago,

Thanks for your reply, unfortunately it appears to be the same (versions are now ELMER2.9.2, ELMER.data2.9.3 )

> library(ELMER)
> # example input
> met <- matrix(rep(0,15),ncol = 5)
> colnames(met) <- c("Sample1",
+                    "Sample2", 
+                    "Sample3",
+                    "Sample4",
+                    "Sample5")
> rownames(met) <- c("cg26928153","cg16269199","cg13869341")
> 
> exp <- matrix(rep(0,15),ncol = 5)
> colnames(exp) <- c("Sample1",
+                    "Sample2", 
+                    "Sample3",
+                    "Sample4",
+                    "Sample5")
> rownames(exp) <- c("ENSG00000073282","ENSG00000078900","ENSG00000141510")
> 
> 
> assay <- c(rep("DNA methylation", ncol(met)),
+            rep("Gene expression", ncol(exp)))
> primary <- c(colnames(met),colnames(exp))
> colname <- c(colnames(met),colnames(exp))
> sampleMap <- data.frame(assay,primary,colname)
> 
> distal.probes <- get.feature.probe(genome = "hg19", 
+                                    met.platform = "EPIC")
Accessing grch37.ensembl.org to get TSS information
Downloading transcripts information from http://grch37.ensembl.org:80/biomart/martservice. Using: Human genes (GRCh37.p13)
Loading from disk
Returning distal probes: 346224
> 
> colData <- data.frame(sample = colnames(met))
> rownames(colData) <- colnames(met)
> 
> mae <- createMAE(exp = exp, 
+                  met = met,
+                  save = TRUE,
+                  filter.probes = distal.probes,
+                  colData = colData,
+                  sampleMap = sampleMap,
+                  linearize.exp = TRUE,
+                  save.filename = "mae.rda",
+                  met.platform = "EPIC",
+                  genome = "hg19",
+                  TCGA = FALSE)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Creating a SummarizedExperiment from gene expression input
Accessing grch37.ensembl.org to get gene information
Downloading genome information (try:0) Using: Human genes (GRCh37.p13)
Error: $ operator is invalid for atomic vectors
> 
> 
> 
> 
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 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_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8   
 [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] biomaRt_2.40.1              sva_3.32.1                  genefilter_1.66.0           mgcv_1.8-28                 nlme_3.1-139               
 [6] edgeR_3.26.5                limma_3.40.2                ELMER_2.9.2                 ELMER.data_2.9.3            MultiAssayExperiment_1.10.4
[11] SummarizedExperiment_1.14.0 DelayedArray_0.10.0         BiocParallel_1.18.0         matrixStats_0.54.0          Biobase_2.44.0             
[16] GenomicRanges_1.36.0        GenomeInfoDb_1.20.0         IRanges_2.18.1              S4Vectors_0.22.0            BiocGenerics_0.30.0
ADD REPLYlink written 3 months ago by D0
1

Thanks for the example, but it is working on my side that part of the code.

It is accessing ENSEMBL database using biomart. There was a change recently in one of the fields name. Please, could you try updating TCGAbiolinks and ELMER and try again. You should have ELMER 2.9.3 now.

BiocManager::install(c("BioinformaticsFMRP/TCGAbiolinks","tiagochst/ELMER"))
ADD REPLYlink written 3 months ago by Tiago Chedraoui Silva240

That seems to have sorted it, thanks!

ADD REPLYlink written 3 months ago by D0
Please log in to add an answer.

Help
Access

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