jianhong / ChIPpeakAnno

11 stars 4 forks source link

invalid class "CompressedGRangesList" object #10

Open GBeattie opened 3 years ago

GBeattie commented 3 years ago

Hey,

Having an issue with 'toGranges', which doesn't seem to like the TxDb objects I've passed to it. I've tried both human and mouse TxDb objects to make sure it wasn't an issue with the TxDb object itself (both commands below), just showing the error log for the human command (error logs were identical)

annoData <- toGRanges(TxDb.Hsapiens.UCSC.hg38.knownGene, feature="gene")
annoData <- toGRanges(TxDb.Mmusculus.UCSC.mm10.knownGene, feature="gene")
> annoData <- toGRanges(TxDb.Hsapiens.UCSC.hg38.knownGene, feature="gene")
  348 genes were dropped because they have exons located on both strands of the same reference
  sequence or on more than one reference sequence, so cannot be represented by a single genomic
  range.
  Use 'single.strand.genes.only=FALSE' to get all the genes in a GRangesList object, or use
  suppressMessages() to suppress this message.
Error in validObject(.Object) : 
  invalid class "CompressedGRangesList" object: 
    improper partitioning
In addition: Warning message:
In normarg_mcols(value, class(x), length(x)) :
  You supplied a metadata column of length 197382 to set on an object of length 247541. However
  please note that the latter is not a multiple of the former.
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

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

other attached packages:
 [1] TxDb.Hsapiens.UCSC.hg38.knownGene_3.10.0  ChIPpeakAnno_3.22.4                      
 [3] Biostrings_2.58.0                         XVector_0.29.3                           
 [5] org.Mm.eg.db_3.11.4                       TxDb.Mmusculus.UCSC.mm10.knownGene_3.10.0
 [7] GenomicFeatures_1.42.0                    AnnotationDbi_1.52.0                     
 [9] Biobase_2.50.0                            bumphunter_1.30.0                        
[11] locfit_1.5-9.4                            iterators_1.0.13                         
[13] foreach_1.5.1                             GenomicRanges_1.40.0                     
[15] GenomeInfoDb_1.26.0                       IRanges_2.24.0                           
[17] S4Vectors_0.28.0                          BiocGenerics_0.36.0                      
[19] dplyr_1.0.2                              

loaded via a namespace (and not attached):
 [1] ProtGenerics_1.22.0         bitops_1.0-6                matrixStats_0.57.0         
 [4] bit64_4.0.5                 progress_1.2.2              httr_1.4.2                 
 [7] tools_4.0.3                 doRNG_1.8.2                 R6_2.5.0                   
[10] DBI_1.1.0                   lazyeval_0.2.2              ade4_1.7-16                
[13] tidyselect_1.1.0            prettyunits_1.1.1           bit_4.0.4                  
[16] curl_4.3                    compiler_4.0.3              VennDiagram_1.6.20         
[19] graph_1.68.0                formatR_1.7                 xml2_1.3.2                 
[22] DelayedArray_0.16.0         rtracklayer_1.50.0          RBGL_1.66.0                
[25] askpass_1.1                 rappdirs_0.3.1              stringr_1.4.0              
[28] digest_0.6.27               Rsamtools_2.6.0             pkgconfig_2.0.3            
[31] MatrixGenerics_1.2.0        dbplyr_1.4.4                ensembldb_2.14.0           
[34] limma_3.44.3                BSgenome_1.58.0             regioneR_1.20.1            
[37] rlang_0.4.8                 rstudioapi_0.11             RSQLite_2.2.1              
[40] generics_0.0.2              BiocParallel_1.24.0         RCurl_1.98-1.2             
[43] magrittr_1.5                GO.db_3.11.4                GenomeInfoDbData_1.2.4     
[46] futile.logger_1.4.3         Matrix_1.2-18               Rcpp_1.0.5                 
[49] lifecycle_0.2.0             stringi_1.5.3               MASS_7.3-53                
[52] SummarizedExperiment_1.20.0 zlibbioc_1.36.0             BiocFileCache_1.14.0       
[55] grid_4.0.3                  blob_1.2.1                  crayon_1.3.4               
[58] lattice_0.20-41             splines_4.0.3               multtest_2.44.0            
[61] hms_0.5.3                   pillar_1.4.6                seqinr_4.2-4               
[64] rngtools_1.5                codetools_0.2-16            biomaRt_2.46.0             
[67] futile.options_1.0.1        XML_3.99-0.5                glue_1.4.2                 
[70] lambda.r_1.2.4              BiocManager_1.30.10         idr_1.2                    
[73] vctrs_0.3.4                 openssl_1.4.3               purrr_0.3.4                
[76] assertthat_0.2.1            xfun_0.18                   AnnotationFilter_1.14.0    
[79] survival_3.2-7              tibble_3.0.4                GenomicAlignments_1.26.0   
[82] tinytex_0.26                memoise_1.1.0               ellipsis_0.3.1             
jianhong commented 3 years ago

try to reinstall your S4Vectors, IRanges, GenomicRanges, GenomicFeatures and try it again. Let me know if you still have troubles.