On Tue, Aug 30, 2011 at 1:36 PM, Cook, Malcolm <MEC@stowers.org> wrote:

> Janet, Michael, and fellow Bioconductors,
>
> I am trying to follow the helpful suggestion Michael made to Janet, found
> here  https://stat.ethz.ch/pipermail/bioconductor/2011-August/040729.html
>
> for obtaining a Rle encoding of the contents of a bigWig file.
>
> But instead get an error: "  'weight' must be a non-empty list of integers"
>
>
The scores in that file are numeric, not integers. The coverage() function
only supports integer weights. In general though, the score column will
always come back as numeric (because bigwig stores it as doubles). One could
argue that coverage,RangesList is being too strict about requiring an
IntegerList but not a NumericList (coverage,IRanges coerces a numeric vector
to an integer vector).

I'll leave this up to people with stronger opinions about this type of thing
but he might be on vacation.... so I just made that change.

Michael


> As per the following session.
>
> I would appreciate any advice/hints.
>
> Thanks,
>
> -Malcolm Cook
> Computational Biology - Stowers Institute for Medical Research
>
>
>
> > library(IRanges)
> > library(rtracklayer)
> > bw <- import(test.bw.file, ranges = GenomicRanges::GRanges("chr19",
> IRanges(1, 6e7)))
> > coverage(bw,weight="score")
> Error in .local(x, shift, width, weight, ...) :
>  'weight' must be a non-empty list of integers
>
>
> > sessionInfo()
> R version 2.13.1 (2011-07-08)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] IRanges_1.10.6     rtracklayer_1.13.3 RCurl_1.5-0        bitops_1.0-4.1
>
> loaded via a namespace (and not attached):
> [1] BSgenome_1.20.0     Biostrings_2.20.3   GenomicRanges_1.4.8
> [4] XML_3.4-0
> >
>
>
>
>

	[[alternative HTML version deleted]]

