zhengxwen / SeqArray

Data management of large-scale whole-genome sequence variant calls (Development version only)
http://www.bioconductor.org/packages/SeqArray
43 stars 12 forks source link

potential bug with SeqArray #48

Closed thierrygosselin closed 5 years ago

thierrygosselin commented 5 years ago

Hi Xiuwen,

Is it me doing it wrong or it's a bug in SeqArray:

The idea is to get the missing data from a stratified dataset.

The data and strata sent by email to reproduce the bug:

data <- SeqArray::seqOpen("data_thierry.gds", readonly = FALSE)
strata <- split(x = SeqArray::seqGetData(data, "sample.id"), f = readLines(con = "strata"))

#function:
mis <- function(strata, data) {
  # message("POP: ", names(strata.split))

  # set filter
  SeqArray::seqSetFilter(
    object = data,
    sample.id = strata,
    action = "push+set",
    verbose = TRUE)

  res <- SeqArray::seqMissing(
    gdsfile = data,
    per.variant = TRUE,
    .progress = FALSE,
    parallel = FALSE)

  # reset filter
  SeqArray::seqSetFilter(object = data, action = "pop", verbose = TRUE)
  message("done!")
  return(res)
}
test <- lapply(strata, mis, data)

Crashes R Sometimes it run fine Any idea ?

Best Thierry

zhengxwen commented 5 years ago

Show me sessionInfo() please.

thierrygosselin commented 5 years ago

Yes sorry about that

clean session:

R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.3

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

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

loaded via a namespace (and not attached):
[1] compiler_3.5.2 tools_3.5.2    yaml_2.2.0

after library(SeqArray

R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.3

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

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

other attached packages:
[1] SeqArray_1.22.3 gdsfmt_1.18.1  

loaded via a namespace (and not attached):
 [1] IRanges_2.16.0         Biostrings_2.50.2      bitops_1.0-6           GenomeInfoDb_1.18.2    stats4_3.5.2          
 [6] zlibbioc_1.28.0        XVector_0.22.0         S4Vectors_0.20.1       tools_3.5.2            RCurl_1.95-4.11       
[11] yaml_2.2.0             parallel_3.5.2         compiler_3.5.2         BiocGenerics_0.28.0    GenomicRanges_1.34.0  
[16] GenomeInfoDbData_1.2.0
thierrygosselin commented 5 years ago

I've tested outside RStudio GUI more details is given:

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

Traceback:
 1: SeqArray::seqSetFilter(object = data, action = "pop", verbose = TRUE)
 2: FUN(X[[i]], ...)
 3: lapply(strata, mis, data)
thierrygosselin commented 5 years ago

Hi Xiuwen, Are you able to reproduce the error I get with your Linux ? Thierry

zhengxwen commented 5 years ago

Please update the SeqArray package immediately from GitHub.

thierrygosselin commented 5 years ago

Works! thank you for the quick fix.

cmatKhan commented 1 year ago

I am getting a similar error using 1.36.3 -- what version was this fix applied to?

zhengxwen commented 1 year ago

Show sessionInfo() please.

cmatKhan commented 1 year ago

^^ thank you for the reply on a closed issue -- i appreciate that.

I was getting a very similar error, but the problem was my own mistake, not the software.