Search
Question: IRanges/ShortRead causing crash?
1
gravatar for pavitrarc
2.0 years ago by
pavitrarc20
United States/Seattle/Fred Hutch
pavitrarc20 wrote:

Has there been a recent update to IRanges and/or ShortRead? A script which was working fine before is now causing my R session to crash with a segfault error. The crash happens when I try to use sread() and vmatchPattern(). 

ADD COMMENTlink modified 2.0 years ago by Martin Morgan ♦♦ 20k • written 2.0 years ago by pavitrarc20

Please provide a reproducible example (or at least a minimal script) and the output of sessionInfo() (after loading ShortRead and IRanges); be sure that your packages are up-to-date for the release of Bioconductor you are using, via BiocInstaller::biocValid().

ADD REPLYlink written 2.0 years ago by Martin Morgan ♦♦ 20k
1

Sorry! Realized I should have done that right after I hit post. It looks like sread() first fails. Then running vmatchPattern() to look for a segment within rfa causes my session to crash. 

Example:

rm(list=ls()); 
source("http://bioconductor.org/biocLite.R");
biocLite(ask=FALSE); 
library('ShortRead'); 
sessionInfo()
f1 <- system.file("extdata", "someORF.fa", package="Biostrings")
rfa <- readFasta(f1)
sread(rfa)
vmatchPattern('GC',sread(rfa))

 

 

Output: 

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.1 (El Capitan)

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 
[5] grDevices utils     datasets  methods  
[9] base     

other attached packages:
 [1] ShortRead_1.28.0          
 [2] GenomicAlignments_1.6.1   
 [3] SummarizedExperiment_1.0.1
 [4] Biobase_2.30.0            
 [5] Rsamtools_1.22.0          
 [6] GenomicRanges_1.22.1      
 [7] GenomeInfoDb_1.6.1        
 [8] Biostrings_2.38.1         
 [9] XVector_0.10.0            
[10] IRanges_2.4.2             
[11] S4Vectors_0.8.3           
[12] BiocParallel_1.4.0        
[13] BiocGenerics_0.16.1       
[14] BiocInstaller_1.20.1      

loaded via a namespace (and not attached):
 [1] zlibbioc_1.16.0      lattice_0.20-33     
 [3] hwriter_1.3.2        tools_3.2.2         
 [5] grid_3.2.2           latticeExtra_0.6-26 
 [7] lambda.r_1.1.7       futile.logger_1.4.1 
 [9] RColorBrewer_1.1-2   futile.options_1.0.0
[11] bitops_1.0-6        

> sread(rfa)
  A DNAStringSet instance of length 7
    width seq
Error in x@pool[[x@ranges@group[i]]] : invalid subscript

> vmatchPattern('GC',sread(rfa))

 *** caught segfault ***
address 0x30, cause 'memory not mapped'

Traceback:
 1: .Call(.NAME, ..., PACKAGE = PACKAGE)
 2: .Call2("XStringSet_vmatch_pattern", pattern, subject, max.mismatch,     min.mismatch, with.indels, fixed, algo, ifelse(count.only,         "MATCHES_AS_COUNTS", "MATCHES_AS_ENDS"), PACKAGE = "Biostrings")
 3: .XStringSet.vmatchPattern(pattern, subject, max.mismatch, min.mismatch,     with.indels, fixed, algorithm)
 4: .local(pattern, subject, max.mismatch, min.mismatch, with.indels,     fixed, algorithm, ...)
 5: vmatchPattern("GC", sread(rfa))
 6: vmatchPattern("GC", sread(rfa))

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

ADD REPLYlink written 2.0 years ago by pavitrarc20
2
gravatar for Martin Morgan
2.0 years ago by
Martin Morgan ♦♦ 20k
United States
Martin Morgan ♦♦ 20k wrote:

Thanks for the code. A somewhat simpler example is

library(Biostrings)
f1 <- system.file("extdata", "someORF.fa", package="Biostrings")
vmatchPattern("GG", readDNAStringSet(f1))

Unfortunately, it looks like there was a bug introduced in IRanges 2.4.2 but fixed in 2.4.3, which should be available via biocLite() tomorrow (Thursday) after about 3pm Eastern.

ADD COMMENTlink written 2.0 years ago by Martin Morgan ♦♦ 20k

Thanks Martin!

ADD REPLYlink written 2.0 years ago by pavitrarc20

after update packages and restart R session. it is working now.

ADD REPLYlink written 22 months ago by tangming200590

Hi Martin,

I am still getting the same error for IRanges_2.4.6

 

getSeq(BSgenome.Hsapiens.UCSC.hg19,"chr7")
Error in NSBS(i, x, exact = exact, upperBoundIsStrict = !allow.append) : 
  subscript contains NAs or out-of-bounds indices


sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.1 (Yosemite)

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] BSgenome.Hsapiens.UCSC.hg19_1.4.0 BSgenome_1.38.0                   rtracklayer_1.30.1               
 [4] Biostrings_2.38.3                 XVector_0.10.0                    BiocInstaller_1.20.1             
 [7] ggplot2_2.0.0                     tidyr_0.3.1                       dplyr_0.4.3                      
[10] GenomicInteractions_1.4.1         GenomicRanges_1.22.2              GenomeInfoDb_1.6.1               
[13] IRanges_2.4.6                     S4Vectors_0.8.5                   BiocGenerics_0.16.1              

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.0.2 VariantAnnotation_1.16.4   reshape2_1.4.1            
 [4] splines_3.2.2              lattice_0.20-33            colorspace_1.2-6          
 [7] GenomicFeatures_1.22.7     chron_2.3-47               survival_2.38-3           
[10] XML_3.98-1.3               foreign_0.8-66             DBI_0.3.1                 
[13] BiocParallel_1.4.3         RColorBrewer_1.1-2         lambda.r_1.1.7            
[16] matrixStats_0.50.1         plyr_1.8.3                 stringr_1.0.0             
[19] zlibbioc_1.16.0            munsell_0.4.2              gtable_0.1.2              
[22] futile.logger_1.4.1        labeling_0.3               latticeExtra_0.6-26       
[25] Biobase_2.30.0             biomaRt_2.26.1             AnnotationDbi_1.32.3      
[28] proto_0.3-10               Rcpp_0.12.2                acepack_1.3-3.3           
[31] scales_0.3.0               Hmisc_3.17-1               Gviz_1.14.0               
[34] Rsamtools_1.22.0           gridExtra_2.0.0            digest_0.6.8              
[37] stringi_1.0-1              biovizBase_1.18.0          grid_3.2.2                
[40] tools_3.2.2                bitops_1.0-6               magrittr_1.5              
[43] lazyeval_0.1.10            RCurl_1.95-4.7             RSQLite_1.0.0             
[46] dichromat_2.0-0            Formula_1.2-1              cluster_2.0.3             
[49] futile.options_1.0.0       MASS_7.3-45                data.table_1.9.6          
[52] assertthat_0.1             R6_2.1.1                   rpart_4.1-10              
[55] igraph_1.0.1               GenomicAlignments_1.6.1    nnet_7.3-11       

 

ADD REPLYlink written 22 months ago by tangming200590

It is not the same error. Please ask this as a new question.

Thanks,

H.

ADD REPLYlink written 22 months ago by Hervé Pagès ♦♦ 13k
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: 235 users visited in the last hour