[BioC] IRanges: the width argument of the coverage function
Nicolas Delhomme
delhomme at embl.de
Tue Jul 3 16:39:07 CEST 2012
Hi,
I thought I saw a mention on the mailing list that coverage and similar functions would support a named vector for providing the width instead of just a list. The documentation states so too:
For RangesList and RangedData objects, a list or vector of
the same length as ‘x’ to be used for the corresponding
element in ‘x’.
However, using a named vector does not work (my aln.ranges is a RangesList object):
> class(aln.ranges)
[1] "CompressedIRangesList"
attr(,"package")
[1] "IRanges"
> coverage(aln.ranges,width=chrSize(obj))
Error in .local(x, shift, width, weight, ...) :
'width' must be a non-empty list
> str(chrSize(obj)) # that's my width
Named int [1:2518] 48367220 21538349 8012 10863 7999 7999 7991 8236 7962 8324 ...
- attr(*, "names")= chr [1:2518] "scaffold_1" "scaffold_10" "scaffold_1000" "scaffold_1001" ...
Changing the width to a list works:
> coverage(aln.ranges,width=as.list(chrSize(obj)))
So, I'm just curious what the status is.
Thanks,
Nico
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] easyRNASeq_1.3.6 ShortRead_1.15.9 latticeExtra_0.6-19
[4] RColorBrewer_1.0-5 lattice_0.20-6 Rsamtools_1.9.18
[7] DESeq_1.9.7 locfit_1.5-8 BSgenome_1.25.3
[10] GenomicRanges_1.9.28 Biostrings_2.25.6 edgeR_2.7.24
[13] limma_3.13.7 biomaRt_2.13.1 Biobase_2.17.6
[16] genomeIntervals_1.13.2 intervals_0.13.3 IRanges_1.15.17
[19] BiocGenerics_0.3.0
loaded via a namespace (and not attached):
[1] annotate_1.35.3 AnnotationDbi_1.19.15 bitops_1.0-4.1
[4] DBI_0.2-5 genefilter_1.39.0 geneplotter_1.35.0
[7] grid_2.15.1 hwriter_1.3 RCurl_1.91-1
[10] RSQLite_0.11.1 splines_2.15.1 stats4_2.15.1
[13] survival_2.36-14 tools_2.15.1 XML_3.9-4
[16] xtable_1.7-0 zlibbioc_1.3.0
---------------------------------------------------------------
Nicolas Delhomme
Genome Biology Computational Support
European Molecular Biology Laboratory
Tel: +49 6221 387 8310
Email: nicolas.delhomme at embl.de
Meyerhofstrasse 1 - Postfach 10.2209
69102 Heidelberg, Germany
More information about the Bioconductor
mailing list