Hi,
I had code to extract exons, introns and exon-intron boundaries from about a year ago. However, when I went to re-run it I now get the following two errors. Did the behavior of these functions change? I'd like to take the range of exons in a gene (union of all isoforms) and define everything in between as introns. I'd also like to find exon-intron junctions which I was doing by extending exons and introns by 1 and looking for the intersection.
unable to find an inherited method for function ‘psetdiff’ for signature ‘"GRangesList", "GRangesList"’ unable to find an inherited method for function ‘pintersect’ for signature ‘"GRangesList", "GRangesList"’
Full code:
library('GenomicFeatures') library('rtracklayer') gencode <- loadDb('gencode_m9_basic.sqlite') # get exons and introns exonAll <- exonsBy(gencode, by = 'gene') exonAll <- reduce(exonAll) intronAll <- psetdiff(range(exonAll), exonAll) intronAll <- intronAll[!elementNROWS(intronAll) == '0'] # find exon-intron junctions exonExtended <- resize(exonAll, width(exonAll) + 1, fix = 'start') exonExtended <- resize(exonExtended, width(exonExtended) + 1, fix = 'end') intronExtended <- resize(intronAll, width(intronAll) + 1, fix = 'start') intronExtended <- resize(intronExtended, width(intronExtended) + 1, fix = 'end') exonExtended <- exonExtended[names(exonExtended) %in% names(intronExtended)] boundary <- pintersect(exonExtended, intronExtended) > sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-apple-darwin16.1.0 (64-bit) Running under: macOS Sierra 10.12.3 locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base other attached packages: [1] rtracklayer_1.34.2 GenomicFeatures_1.26.3 AnnotationDbi_1.36.2 Biobase_2.34.0 [5] GenomicRanges_1.26.4 GenomeInfoDb_1.10.3 IRanges_2.8.2 S4Vectors_0.12.2 [9] BiocGenerics_0.20.0 loaded via a namespace (and not attached): [1] Rcpp_0.12.10 XVector_0.14.1 zlibbioc_1.20.0 [4] GenomicAlignments_1.10.1 BiocParallel_1.8.1 lattice_0.20-34 [7] tools_3.3.2 grid_3.3.2 SummarizedExperiment_1.4.0 [10] DBI_0.6 digest_0.6.12 Matrix_1.2-8 [13] bitops_1.0-6 RCurl_1.95-4.8 biomaRt_2.30.0 [16] memoise_1.0.0 RSQLite_1.1-2 Biostrings_2.42.1 [19] Rsamtools_1.26.1 XML_3.98-1.5