During testing CAGEr package, following is the error message from `bam2CTSS` function.
> i.bam <- CAGEr:::import.bam("/path/to/file.bam",filetype="bam") -> Filtering out low quality reads... > > i.ctss <- CAGEr:::bam2CTSS(i.bam,removeFirstG=TRUE,correctSystematicG=FALSE,genome="BSgenome.Bterrestris.bcm.bter1") -> Removing the first base of the reads if 'G' and not aligned to the genome... Error in checkSlotAssignment(object, name, value) : assignment of an object of class "IRanges" is not valid for slot 'ranges' in an object of class "GPos"; is(value, "IPos") is not TRUE
Could anyone help me out?
> sessionInfo() R version 3.5.0 (2018-04-23) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux Server release 6.5 (Santiago) Matrix products: default BLAS: /histor/kang/yangpc/soft/R/R_soft/lib64/R/lib/libRblas.so LAPACK: /histor/kang/yangpc/soft/R/R_soft/lib64/R/lib/libRlapack.so locale: [1] C attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets [8] methods base other attached packages: [1] BSgenome.Bterrestris.bcm.bter1_1.1 BSgenome_1.48.0 [3] rtracklayer_1.40.6 GenomicAlignments_1.16.0 [5] SummarizedExperiment_1.10.1 DelayedArray_0.6.6 [7] BiocParallel_1.14.2 matrixStats_0.54.0 [9] Biobase_2.40.0 Rsamtools_1.32.3 [11] Biostrings_2.48.0 XVector_0.20.0 [13] GenomicRanges_1.32.7 GenomeInfoDb_1.16.0 [15] IRanges_2.14.12 S4Vectors_0.18.3 [17] BiocGenerics_0.26.0 CAGEr_1.22.3 loaded via a namespace (and not attached): [1] Rcpp_0.12.19 stringdist_0.9.5.1 [3] lattice_0.20-35 gtools_3.8.1 [5] digest_0.6.17 mime_0.6 [7] R6_2.3.0 plyr_1.8.4 [9] ggplot2_3.0.0 pillar_1.3.0 [11] zlibbioc_1.26.0 rlang_0.2.2 [13] lazyeval_0.2.1 data.table_1.11.8 [15] vegan_2.5-2 Matrix_1.2-14 [17] splines_3.5.0 RCurl_1.95-4.11 [19] munsell_0.5.0 shiny_1.1.0 [21] compiler_3.5.0 httpuv_1.4.5 [23] mgcv_1.8-23 htmltools_0.3.6 [25] tibble_1.4.2 GenomeInfoDbData_1.1.0 [27] XML_3.98-1.16 reshape_0.8.7 [29] permute_0.9-4 crayon_1.3.4 [31] later_0.7.5 MASS_7.3-49 [33] bitops_1.0-6 grid_3.5.0 [35] nlme_3.1-137 xtable_1.8-3 [37] gtable_0.2.0 magrittr_1.5 [39] scales_1.0.0 KernSmooth_2.23-15 [41] stringi_1.2.4 som_0.3-5.1 [43] promises_1.0.1 MultiAssayExperiment_1.0.1 [45] tools_3.5.0 colorspace_1.3-2 [47] cluster_2.0.7-1 shinydashboard_0.7.0 [49] beanplot_1.2 memoise_1.1.0 [51] VGAM_1.0-6
Please do not use the
import.bam
function directly: it is a private function that is not exported in the namespace, and is not intended for direct use. Instead, create a CAGEr object as explained in the package's vignette. In case you do not need the complexity of a CAGEr object, have a look at more generic packages, such asGenomicAlignments
orRSamtools
.Hi Charles Plessy, I have tested the example code for create
CAGEexp
, but failed with the following error message:invalid name for slot of class "CAGEexp": colData
Thank you!As explained in point 3.1 of the vignette, you also need:
Hi Charles Plessy, the error remain after I loaded the two packages.
Judging from their version numbers, the
SummarizedExperiment
andMultiAssayExperiment
packages seem quite outdated on your system. Can you update them to the current Bioconductor release ?Hi Charless Plessy, I have updated
MultiAssayExperiment
from 1.0.1 to 1.6.0, andSummarizedExperiment
has already in the latest version 1.10.1. But the error remain.Hi Charless Plessy, I have updated all the packages (after I have update the R version from 4.3 to 5.0), but the error remained the same.
Please confirm that you are updating packages using BiocInstaller::biocLite(), and that your package installation is correct based on BiocInstaller::biocValid().
Please also start a new R session and load only the packages required for the commands that you are trying to execute, to simplify the situation during debugging.
Hi Martin Morgan, thank you for your comments. I have updated (reinstalled) all the packages after updating R from 4.3 to 5.0 with install.packages(). This issue has been reported else (https://community.rstudio.com/t/rcpp-was-installed-by-an-r-version-with-different-internals/9968 ). The
biocValid()
pointed out that three packages were outdated. These three packages can not be updated due to the gcc verision conflict. However, they don't influence the running ofCAGEr
. The error remain the same.Thank you all! There maybe some error of my installation.
In a new session, I have
What do you have?
Hi Martin Morgan, maybe this is the reason. In my case the slots contain "pData", but "colData" in your case.
Perhaps you need to restart in a fresh R session so that the upgrade of MultiAsssayExperiment and SummarizedExperiment has its effect.
After switch CAGEr from version 1.22.3 to 1.22.0, I got the same as Martin's.