Search
Question: R session crash with SGSeq::convertToTxFeatures
0
gravatar for oolongoni
9 months ago by
oolongoni10
California
oolongoni10 wrote:

R session on macOS Sierra crashes when making a TxFeatures class from TxDb

library(SGSeq)

## make a TxDb object
hsaEnsembl <- makeTxDbFromBiomart(dataset="hsapiens_gene_ensembl")
## make a TxFeatures class
txf <- convertToTxFeatures(hsaEnsembl)

R behaves fine when using the TxDb downloaded from BioConductor

library(TxDb.Hsapiens.UCSC.hg38.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene

I've done all my RNA-Seq mapping by STAR using Ensembl annotations. Is this the best way to get TxFeatures object with Ensembl exon names?

> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

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] TxDb.Hsapiens.UCSC.hg38.knownGene_3.4.0 GenomicFeatures_1.28.5                  AnnotationDbi_1.38.2                    Biobase_2.36.2                         
[5] GenomicRanges_1.28.5                    GenomeInfoDb_1.12.2                     IRanges_2.10.3                          S4Vectors_0.14.4                       
[9] BiocGenerics_0.22.0                    

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.12               XVector_0.16.0             GenomicAlignments_1.12.2   zlibbioc_1.22.0            BiocParallel_1.10.1        bit_1.1-12                 lattice_0.20-35           
 [8] rlang_0.1.2                blob_1.1.0                 tools_3.4.1                grid_3.4.1                 SummarizedExperiment_1.6.4 DBI_0.7                    matrixStats_0.52.2        
[15] bit64_0.9-7                digest_0.6.12              tibble_1.3.4               Matrix_1.2-11              GenomeInfoDbData_0.99.0    rtracklayer_1.36.4         bitops_1.0-6              
[22] RCurl_1.95-4.8             biomaRt_2.32.1             memoise_1.1.0              RSQLite_2.0                DelayedArray_0.2.7         compiler_3.4.1             Rsamtools_1.28.0          
[29] Biostrings_2.44.2          XML_3.98-1.9               pkgconfig_2.0.1
ADD COMMENTlink modified 8 months ago by Leonard Goldstein70 • written 9 months ago by oolongoni10
1
gravatar for Leonard Goldstein
9 months ago by
United States
Leonard Goldstein70 wrote:

I could run this without any issues. If the problem persists maybe you can try reinstalling R and Bioconductor? 

> library(GenomicFeatures)
> library(SGSeq)
> hsaEnsembl <- makeTxDbFromBiomart(dataset="hsapiens_gene_ensembl")
> txf <- convertToTxFeatures(hsaEnsembl)
> 
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

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] SGSeq_1.10.0               SummarizedExperiment_1.6.4 DelayedArray_0.2.7         matrixStats_0.52.2         Rsamtools_1.28.0          
 [6] Biostrings_2.44.2          XVector_0.16.0             GenomicFeatures_1.28.5     AnnotationDbi_1.38.2       Biobase_2.36.2            
[11] GenomicRanges_1.28.5       GenomeInfoDb_1.12.2        IRanges_2.10.3             S4Vectors_0.14.4           BiocGenerics_0.22.0       

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.12             compiler_3.4.1           bitops_1.0-6             tools_3.4.1              zlibbioc_1.22.0         
 [6] biomaRt_2.32.1           digest_0.6.12            bit_1.1-12               RSQLite_2.0              memoise_1.1.0           
[11] tibble_1.3.4             lattice_0.20-35          pkgconfig_2.0.1          rlang_0.1.2              Matrix_1.2-11           
[16] igraph_1.1.2             DBI_0.7                  GenomeInfoDbData_0.99.0  rtracklayer_1.36.4       bit64_0.9-7             
[21] grid_3.4.1               XML_3.98-1.9             BiocParallel_1.10.1      magrittr_1.5             blob_1.1.0              
[26] GenomicAlignments_1.12.2 RUnit_0.4.31             RCurl_1.95-4.8          
>
ADD COMMENTlink written 9 months ago by Leonard Goldstein70

I decided to raze everything (~/.Rhistory; ~/.Rapp.history, ~/Library/R/3.x/, etc) and then re-installed R and the libraries. Now everything works!

> install.packages("RSQLite")

> source("https://bioconductor.org/biocLite.R")

> biocLite(c("GenomicFeatures", "AnnotationDbi", "SGSeq"))

ADD REPLYlink modified 8 months ago • written 8 months ago by oolongoni10
1
gravatar for oolongoni
8 months ago by
oolongoni10
California
oolongoni10 wrote:

I uninstalled R and RStudio, then re-installed both. The crash persists. Is there a workaround using other TxDb but annotated by ENSEMBL notations?

ADD COMMENTlink written 8 months ago by oolongoni10
1
gravatar for Leonard Goldstein
8 months ago by
United States
Leonard Goldstein70 wrote:

Hi, since I can't reproduce the problem it is difficult to troubleshoot. As an alternative to TxDb objects, the convertToTxFeatures function also accepts a GRangesList of exons grouped by transcript. So you could try something like this

> tx <- exonsBy(hsaEnsembl, "tx", use.names = TRUE)
> mcols(tx)$txName <- names(tx)
> df <- select(hsaEnsembl, names(tx), "GENEID", "TXNAME")
> mcols(tx)$geneName <- df$GENEID[match(names(tx), df$TXNAME)]
> txf <- convertToTxFeatures(tx)

Leonard

ADD COMMENTlink written 8 months ago by Leonard Goldstein70

Thank you! Learned something new!

ADD REPLYlink written 8 months ago by oolongoni10
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: 259 users visited in the last hour