[BioC] Export a BigWig with rtracklayer

Dario Strbenac D.Strbenac at garvan.org.au
Wed Apr 11 04:00:40 CEST 2012


I have the latest versions now, but I get a new error message.

> summary(bws[[1]])
    Length      Class       Mode 
        25 RangedData         S4
> bws[[1]]
RangedData with 154014720 rows and 1 value column across 25 spaces
             space         ranges   |       score
          <factor>      <IRanges>   |   <numeric>
1             chr1     [  1,  20]   |  0.04206303
2             chr1     [ 21,  40]   |  0.04206303
...            ...            ... ...         ...
> export.bw(bws[[1]], filename)
Error in export(rd, con, "BigWig", ...) : 
  error in evaluating the argument 'object' in selecting a method for function 'export': Error: object 'rd' not found
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8    
 [5] LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] BSgenome.Hsapiens.UCSC.hg18_1.3.17 BSgenome_1.24.0                   
[3] Biostrings_2.24.1                  rtracklayer_1.16.0                
[5] GenomicRanges_1.8.3                IRanges_1.14.2                    
[7] BiocGenerics_0.2.0                

loaded via a namespace (and not attached):
[1] bitops_1.0-4.1  RCurl_1.91-1    Rsamtools_1.8.0 stats4_2.15.0  
[5] tools_2.15.0    XML_3.9-4       zlibbioc_1.2.0

---- Original message ----
>Date: Tue, 10 Apr 2012 07:07:20 -0700
>From: Michael Lawrence <lawrence.michael at gene.com>  
>Subject: Re: [BioC] Export a BigWig with rtracklayer  
>To: D.Strbenac at garvan.org.au
>Cc: bioconductor at r-project.org
>
>   On Mon, Apr 9, 2012 at 10:00 PM, Dario Strbenac
>   <D.Strbenac at garvan.org.au> wrote:
>
>     Hello,
>
>     I'm having trouble exporting a real-sized BigWig
>     file. It is of hg18 with a score every 20 bases on
>     the 25 real chromosomes. It was created from
>     reading in two different BigWig files, then
>     subtracting their scores :
>
>     score(bws[[1]]) <- score(bws[[2]]) -
>     score(bws[[1]])
>
>     then
>
>     export.bw(bws[[1]], filename, "bedGraph",
>     seqlengths(Hsapiens)[1:25])
>
>     After some minutes, I get the error message
>     Error: serialization is too large to store in a
>     raw vector
>
>     I also tried "auto" for dataFormat. If importing
>     then exporting a single BigWig without any
>     modifications to its data, the code works.
>
>     What is a better technique ?
>
>   Could you please paste the output of sessionInfo()?
>   It looks like you're using an older version of
>   rtracklayer, which is very likely broken somehow.
>    
>   Thanks,
>   Michael
>
>     --------------------------------------
>     Dario Strbenac
>     Research Assistant
>     Cancer Epigenetics
>     Garvan Institute of Medical Research
>     Darlinghurst NSW 2010
>     Australia
>
>     _______________________________________________
>     Bioconductor mailing list
>     Bioconductor at r-project.org
>     https://stat.ethz.ch/mailman/listinfo/bioconductor
>     Search the archives:
>     http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list