Search
Question: readGAlignments + BamViews not working in BioC-Devel
0
gravatar for Arne Muller
3.4 years ago by
Arne Muller20
United States
Arne Muller20 wrote:

Hi All,

I'm wondering why the code below throws an error. I'm using R-devel (3.3.0) + BioC-devel. Is this a bug or did I miss something.

From the GenomicAlignments help:

## With a BamViews object:
fls <- system.file("extdata", "ex1.bam", package="Rsamtools",
                    mustWork=TRUE)
bv <- BamViews(fls,
               bamSamples=DataFrame(info="test", row.names="ex1"),
               auto.range=TRUE)
## Note that the "readGAlignments" method for BamViews objects
## requires the ShortRead package to be installed.
aln <- readGAlignments(bv)
Error in readGAlignments(bv) : 
  Assertion on 'more.args' failed: Vector must be named
> sessionInfo()
R Under development (unstable) (2015-07-07 r68639)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.6 (Santiago)
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] GenomicAlignments_1.5.11   Rsamtools_1.21.13         
 [3] Biostrings_2.37.2          XVector_0.9.1             
 [5] SummarizedExperiment_0.3.2 Biobase_2.29.1            
 [7] GenomicRanges_1.21.16      GenomeInfoDb_1.5.8        
 [9] IRanges_2.3.14             S4Vectors_0.7.10          
[11] BiocGenerics_0.15.3        BatchJobs_1.6             
[13] BiocParallel_1.3.34        BiocInstaller_1.19.8      

loaded via a namespace (and not attached):
 [1] magrittr_1.5         zlibbioc_1.15.0      brew_1.0-6          
 [4] sendmailR_1.2-1      stringr_1.0.0        tools_3.3.0         
 [7] fail_1.2             checkmate_1.6.0      DBI_0.3.1           
[10] lambda.r_1.1.7       futile.logger_1.4.1  digest_0.6.8        
[13] bitops_1.0-6         base64enc_0.1-2      futile.options_1.0.0
[16] RSQLite_1.0.0        stringi_0.5-5        BBmisc_1.9          

regards,
Arne

ADD COMMENTlink modified 3.4 years ago • written 3.4 years ago by Arne Muller20
0
gravatar for Vincent J. Carey, Jr.
3.4 years ago by
United States
Vincent J. Carey, Jr.6.2k wrote:

Note that Bioc-devel packages are only tested against R-release

http://bioconductor.org/checkResults/devel/bioc-LATEST/

This will be the case until the next release of bioc, at which point bioc devel will test against R-devel.

 

ADD COMMENTlink written 3.4 years ago by Vincent J. Carey, Jr.6.2k
0
gravatar for Arne Muller
3.4 years ago by
Arne Muller20
United States
Arne Muller20 wrote:

Hi - the error also occurs with R-3.2.0 and BiocDevel:

aln <- readGAlignments(bv)
Error in readGAlignments(bv) : 
  Assertion on 'more.args' failed: Vector must be named

Enter a frame number, or 0 to exit   

 1: readGAlignments(bv)
 2: readGAlignments(bv)
 3: Rsamtools:::.BamViews_delegate("readGAlignments", file, fun)
 4: bplapply(idx, fun, bamViews, ...)
 5: bplapply(idx, fun, bamViews, ...)
 6: bplapply(X, FUN, ..., BPREDO = BPREDO, BPPARAM = BPPARAM)
 7: bplapply(X, FUN, ..., BPREDO = BPREDO, BPPARAM = BPPARAM)
 8: suppressMessages(batchMap(reg, fun = FUN, X, more.args = list(...)))
 9: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessag
10: batchMap(reg, fun = FUN, X, more.args = list(...))
11: checkMoreArgs(more.args)
12: assertList(more.args, names = "strict")
13: makeAssertion(res, vname(x, .var.name))
14: mstop("Assertion on '%s' failed: %s", var.name, msg)

Seems there's a problem passing arguments from or to bplapply. Strange that this isn't picked up by the tests.

Arne

> sessionInfo()
R version 3.2.1 Patched (2015-07-06 r68635)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.6 (Santiago)

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] GenomicAlignments_1.5.11   Rsamtools_1.21.13         
 [3] Biostrings_2.37.2          XVector_0.9.1             
 [5] SummarizedExperiment_0.3.2 Biobase_2.29.1            
 [7] GenomicRanges_1.21.16      GenomeInfoDb_1.5.8        
 [9] IRanges_2.3.14             S4Vectors_0.7.10          
[11] BiocGenerics_0.15.3        BatchJobs_1.6             
[13] BiocParallel_1.3.34        BiocInstaller_1.19.8      

loaded via a namespace (and not attached):
 [1] magrittr_1.5         zlibbioc_1.15.0      brew_1.0-6          
 [4] sendmailR_1.2-1      stringr_1.0.0        tools_3.2.1         
 [7] fail_1.2             checkmate_1.6.0      DBI_0.3.1           
[10] lambda.r_1.1.7       futile.logger_1.4.1  digest_0.6.8        
[13] bitops_1.0-6         base64enc_0.1-2      futile.options_1.0.0
[16] RSQLite_1.0.0        stringi_0.5-5        BBmisc_1.9          
ADD COMMENTlink modified 3.4 years ago by Martin Morgan ♦♦ 22k • written 3.4 years ago by Arne Muller20

Hmm, looks like you're using BatchJobsParam() ? Can you provide a little detail on what you've done before this?

ADD REPLYlink written 3.4 years ago by Martin Morgan ♦♦ 22k
0
gravatar for Valerie Obenchain
3.4 years ago by
Valerie Obenchain ♦♦ 6.7k
United States
Valerie Obenchain ♦♦ 6.7k wrote:

Hi Arne,

I can't reproduce this error in release or devel.

As Vince mentioned, this cycle we're using R 3.2.1 in both release and devel. You can see the R info at the top of the build reports, currently 3.2.1 (2015-06-18) -- "World-Famous Astronaut" in both.

http://www.bioconductor.org/checkResults/devel/bioc-LATEST/

http://www.bioconductor.org/checkResults/release/bioc-LATEST/

To checkout the patched version ...

svn co https://svn.r-project.org/R/branches/R-3-2-branch/

Valerie

ADD COMMENTlink modified 3.4 years ago • written 3.4 years ago by Valerie Obenchain ♦♦ 6.7k
0
gravatar for Martin Morgan
3.4 years ago by
Martin Morgan ♦♦ 22k
United States
Martin Morgan ♦♦ 22k wrote:

Thanks, this was a bug in Rsamtools dispatch to BatchJobs back-end. It was introduced earlier in the 1.21.* series, and is fixed in version 1.21.14. For the record, the problem was reproducible with

library(GenomicAlignments)
library(BiocParallel)
register(BatchJobsParam())
fls <- system.file("extdata", "ex1.bam", package="Rsamtools", mustWork=TRUE)
bv <- BamViews(fls, bamSamples=DataFrame(info="test", row.names="ex1"),
               auto.range=TRUE)
aln <- readGAlignments(bv)

 

 

ADD COMMENTlink modified 3.4 years ago • written 3.4 years ago by Martin Morgan ♦♦ 22k
0
gravatar for Arne Muller
3.4 years ago by
Arne Muller20
United States
Arne Muller20 wrote:

Hi - thanks for this fix in Rsamtools, but this only fixes the problem in one place, there's another (and possibly more) in GenomicAlignments::summarizeOverlaps:

  mapq_filter <- function(features, reads, algorithm,
                             ignore.strand, inter.feature)
     { 
         require(GenomicAlignments) # needed for parallel evaluation
         Union(features, reads[mcols(reads)$mapq >= 20], algorithm,
               ignore.strand, inter.feature) 
     }

     genes <- GRanges("seq1", IRanges(seq(1, 1500, by=200), width=100))
     param <- ScanBamParam(what="mapq")
     fl <- system.file("extdata", "ex1.bam", package="Rsamtools")
     se <- summarizeOverlaps(genes, fl, mode=mapq_filter, param=param) 

Error in summarizeOverlaps(genes, fl, mode = mapq_filter, param = param) : 
  Assertion on 'more.args' failed: Vector must be named

To me it looks like bplapply has changed it's interface and all the consumers of it that do not use names arguments now fail.

regards,

  Arne

ADD COMMENTlink modified 3.4 years ago by Martin Morgan ♦♦ 22k • written 3.4 years ago by Arne Muller20

I'm not sure whether it was a change in BatchJobs / BiocParallel or just that this code wasn't used with BatchJobsParam(). But it seems like a better solution is to find a way to enable BiocParallel to pass this simple test case:

> bplapply(1:4, function(...) {}, "foo", BPPARAM=BatchJobsParam())
Error in bplapply(1:4, function(...) { : 
  Assertion on 'more.args' failed: Vector must be named

 

ADD REPLYlink written 3.4 years ago by Martin Morgan ♦♦ 22k

Now fixed in BiocParallel 1.3.45 and 1.2.17.

Valerie

ADD REPLYlink written 3.4 years ago by Valerie Obenchain ♦♦ 6.7k

I spoke too soon - sorry. More testing needed.

Valerie

ADD REPLYlink written 3.4 years ago by Valerie Obenchain ♦♦ 6.7k

OK, let's try again with 1.3.46 and 1.2.18. Let me know if you run into problems.

Valerie

ADD REPLYlink written 3.4 years ago by Valerie Obenchain ♦♦ 6.7k

Hi - I think there's still a problem. Bioc-Release still uses 1.2.9 whereas in the svn there's' already 1.2.18 for release (note, the build/check report says there's a timeout for 1.2.18).

ADD REPLYlink written 3.4 years ago by Arne Muller20

Just wanted to let you know I saw this and we are working on it.

ADD REPLYlink written 3.3 years ago by Valerie Obenchain ♦♦ 6.7k

1.2.20 built today and should be available via biocLite().

http://www.bioconductor.org/checkResults/release/bioc-LATEST/

ADD REPLYlink written 3.3 years ago by Valerie Obenchain ♦♦ 6.7k
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: 421 users visited in the last hour