Search
Question: Getting error using GenomicRanges::setdiff
0
gravatar for rubi
11 months ago by
rubi90
rubi90 wrote:

Hi,

 

I'm trying to use GenomicRanges::setdiff and getting an error:

Error in validObject(.Object) : ))
  invalid class “XIntegerViews” object: undefined class for slot "elementMetadata" ("DataTable_OR_NULL")For example,

exon.df <- data.frame(seqnames=rep("chr1",12),id=c(rep("id1",4),rep("id2",3),rep("id3",5)),
                      start=c(10,20,30,40,100,200,300,1000,2000,3000,4000,5000),
                      end=c(15,25,35,45,150,250,350,1500,2500,3500,4500,5500))

cds.df <- data.frame(seqnames=rep("chr1",9),id=c(rep("id1",3),rep("id2",3),rep("id3",3)),
                      start=c(20,30,40,125,200,305,2250,3000,4000),
                      end=c(25,35,45,150,250,325,2500,3500,4250))

utrs.df <- as.data.frame(GenomicRanges::setdiff(makeGRangesFromDataFrame(exon.df,seqnames.field="seqnames"),
                                                makeGRangesFromDataFrame(cds.df,seqnames.field="seqnames")))


Error in validObject(.Object) :
  invalid class “XIntegerViews” object: undefined class for slot "elementMetadata" ("DataTable_OR_NULL")

> sessionInfo()

R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /usr/local/R-3.4.1/lib64/R/lib/libRblas.so
LAPACK: /usr/local/R-3.4.1/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
 [1] dplyr_0.5.0          data.table_1.10.4    doParallel_1.0.10
 [4] iterators_1.0.8      foreach_1.4.3        snpEnrichment_1.7.0
 [7] rtracklayer_1.34.2   GenomicRanges_1.26.4 GenomeInfoDb_1.10.3
[10] stringi_1.1.2        Biostrings_2.42.0    XVector_0.14.1
[13] IRanges_2.8.2        S4Vectors_0.12.2     BiocGenerics_0.23.0
[16] BiocInstaller_1.24.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.11               compiler_3.4.1
 [3] plyr_1.8.4                 bitops_1.0-6
 [5] tools_3.4.1                zlibbioc_1.20.0
 [7] tibble_1.2                 gtable_0.2.0
 [9] lattice_0.20-34            Matrix_1.2-7.1
[11] DBI_0.6                    snpStats_1.24.0
[13] grid_3.4.1                 Biobase_2.34.0
[15] R6_2.2.0                   XML_3.98-1.4
[17] survival_2.40-1            BiocParallel_1.10.1
[19] magrittr_1.5               ggplot2_2.2.1
[21] Rsamtools_1.26.1           scales_0.4.1
[23] codetools_0.2-15           GenomicAlignments_1.10.0
[25] splines_3.4.1              assertthat_0.1
[27] SummarizedExperiment_1.4.0 colorspace_1.2-7
[29] RCurl_1.95-4.8             lazyeval_0.2.0
[31] munsell_0.4.3

 
ADD COMMENTlink modified 11 months ago by Michael Lawrence10k • written 11 months ago by rubi90
2
gravatar for Michael Lawrence
11 months ago by
United States
Michael Lawrence10k wrote:

I'm guessing that you might have to reinstall some packages, like S4Vectors.

ADD COMMENTlink written 11 months ago by Michael Lawrence10k

BiocInstaller::biocValid() might help remove some of the guess-work.

ADD REPLYlink written 11 months ago by Martin Morgan ♦♦ 22k

Thanks a lot.

 

This, however, returns also the introns. Is it possible to get only the UTRs or to systematically remove the introns?

ADD REPLYlink written 11 months ago by rubi90

I think you replied to the wrong post. But anyway, sure, you just have to use the range() of the CDSs instead.

ADD REPLYlink written 11 months ago by Michael Lawrence10k

Right, sorry about that and thanks a lot for the help.

ADD REPLYlink written 11 months ago by rubi90
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 2.2.0
Traffic: 286 users visited in the last hour