Error:no method for coercing this S4 class to a vector
1
0
Entering edit mode
@jananisundaresan-19303
Last seen 2.3 years ago

Hi,

I annotated my data using:

genomation_annot<-genomation::annotateWithGeneParts(chip_clean.DB, gene.parts, intersect.chr = TRUE)

this creates a S4 class object.

from what I understood, the following functions should be able to work with this object.

plotGeneAnnotation(genomation_annot, cluster = TRUE)
heatTargetAnnotation(genomation_annot, cluster = TRUE)

but insteadd I get the error message:

Error in as.list.default(X) : no method for coercing this S4 class to a vector

How can I fix this?

Thanks in advance, JS

annotation genomation • 409 views
ADD COMMENT
0
Entering edit mode
> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

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

other attached packages:
 [1] readr_1.3.1                 genomation_1.14.0           annotatr_1.8.0              GenomicAlignments_1.18.1   
 [5] Rsamtools_1.34.0            Biostrings_2.50.2           XVector_0.22.0              edgeR_3.24.3               
 [9] limma_3.38.3                DESeq2_1.22.2               DiffBind_2.10.0             SummarizedExperiment_1.12.0
[13] DelayedArray_0.8.0          BiocParallel_1.16.2         matrixStats_0.54.0          Biobase_2.42.0             
[17] GenomicRanges_1.34.0        GenomeInfoDb_1.18.1         IRanges_2.16.0              S4Vectors_0.20.1           
[21] BiocGenerics_0.28.0        

loaded via a namespace (and not attached):
  [1] amap_0.8-16                   colorspace_1.3-2              rjson_0.2.20                  hwriter_1.3.2                
  [5] htmlTable_1.13                base64enc_0.1-3               rstudioapi_0.8                ggrepel_0.8.0                
  [9] bit64_0.9-7                   interactiveDisplayBase_1.20.0 AnnotationDbi_1.44.0          splines_3.5.2                
 [13] impute_1.56.0                 geneplotter_1.60.0            knitr_1.21                    Formula_1.2-3                
 [17] seqPattern_1.14.0             gridBase_0.4-7                annotate_1.60.0               cluster_2.0.7-1              
 [21] GO.db_3.7.0                   pheatmap_1.0.12               graph_1.60.0                  shiny_1.2.0                  
 [25] BiocManager_1.30.4            compiler_3.5.2                httr_1.4.0                    GOstats_2.48.0               
 [29] backports_1.1.3               assertthat_0.2.0              Matrix_1.2-15                 lazyeval_0.2.1               
 [33] later_0.7.5                   htmltools_0.3.6               acepack_1.4.1                 prettyunits_1.0.2            
 [37] tools_3.5.2                   bindrcpp_0.2.2                gtable_0.2.0                  glue_1.3.0                   
 [41] GenomeInfoDbData_1.2.0        Category_2.48.0               reshape2_1.4.3                systemPipeR_1.16.1           
 [45] dplyr_0.7.8                   ShortRead_1.40.0              Rcpp_1.0.0                    gdata_2.18.0                 
 [49] rtracklayer_1.42.1            xfun_0.4                      stringr_1.3.1                 mime_0.6                     
 [53] gtools_3.8.1                  XML_3.98-1.16                 AnnotationHub_2.14.2          zlibbioc_1.28.0              
 [57] scales_1.0.0                  BSgenome_1.50.0               promises_1.0.1                hms_0.4.2                    
 [61] RBGL_1.58.1                   RColorBrewer_1.1-2            BBmisc_1.11                   yaml_2.2.0                   
 [65] memoise_1.1.0                 gridExtra_2.3                 ggplot2_3.1.0                 biomaRt_2.38.0               
 [69] rpart_4.1-13                  latticeExtra_0.6-28           stringi_1.2.4                 RSQLite_2.1.1                
 [73] genefilter_1.64.0             plotrix_3.7-4                 checkmate_1.8.5               GenomicFeatures_1.34.1       
 [77] caTools_1.17.1.1              rlang_0.3.0.1                 pkgconfig_2.0.2               BatchJobs_1.7                
 [81] bitops_1.0-6                  lattice_0.20-38               purrr_0.2.5                   bindr_0.1.1                  
 [85] htmlwidgets_1.3               bit_1.1-14                    tidyselect_0.2.5              GSEABase_1.44.0              
 [89] AnnotationForge_1.24.0        plyr_1.8.4                    magrittr_1.5                  sendmailR_1.2-1              
 [93] R6_2.3.0                      gplots_3.0.1                  Hmisc_4.1-1                   DBI_1.0.0                    
 [97] pillar_1.3.1                  foreign_0.8-71                survival_2.43-3               RCurl_1.95-4.11              
[101] nnet_7.3-12                   tibble_2.0.0                  crayon_1.3.4                  KernSmooth_2.23-15           
[105] progress_1.2.0                locfit_1.5-9.1                data.table_1.11.8             blob_1.1.1                   
[109] Rgraphviz_2.26.0              digest_0.6.18                 xtable_1.8-3                  regioneR_1.14.0              
[113] httpuv_1.4.5.1                brew_1.0-6                    munsell_0.5.0                
>
ADD REPLY
0
Entering edit mode
@altuna-akalin-7813
Last seen 2.3 years ago
Germany/Berlin/MDC-BIMSB

try using plotTargetAnnotation()

ADD COMMENT
0
Entering edit mode

it still gives me error. The function plotGeneAnnotation() is deprecated and s4 class coercion error still persists.

plotGeneAnnotation(genomation_annot) Error in as.list.default(X) : no method for coercing this S4 class to a vector In addition: Warning message: 'plotGeneAnnotation' is deprecated. Use 'heatTargetAnnotation ' instead. See help("Deprecated") Blockquote

ADD REPLY
0
Entering edit mode

I updated the answer, I meant plotTargetAnnotation. Could you please let me know which part of the documentation is confusing, assuming you got the idea somewhere from the docs ?

ADD REPLY
0
Entering edit mode

I updated the answer, I meant plotTargetAnnotation. Could you please let me know which part of the documentation is confusing, assuming you got the idea somewhere from the docs ?

ADD REPLY

Login before adding your answer.

Traffic: 446 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