Entering edit mode
Hello
I have a GRanges object representing CpG islands, that I want to
subdivide
so that each island will be represented by 10 ranges of equal width.
To do this, I created a vector containing the widths of the islands
divided
by ten:
swidth<-as.integer(width(islandshg19)/10)
and then called subdivideGRanges():
islandshg19<-subdivideGRanges(islandshg19,
subsize=as.integer(width/10))
and got a multitude of warnings.
This approach did work when I tried it on a GRanges object containing
a
single range, and a width vector of length 1. When I tried to extend
the
sample to include two objetcs, I got these warning message:
1: In if (widths[i] < 2 * subsize) { ... :
the condition has length > 1 and only the first element will be used
2: In if (width < 2 * subsize) { ... :
the condition has length > 1 and only the first element will be used
3: In 0:(nchunks - 1) : numerical expression has 2 elements: only the
first used
Which makes me think that the problem may be related to assigning the
right
subszie to the the rigth range.
Does anyone have an idea how to do that?
Thanks in advance
Dolev Rahat
sessionInfo(if required):
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United
States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] exomeCopy_1.2.0 Rsamtools_1.8.6 Biostrings_2.24.1
rtracklayer_1.16.3 taRifx_1.0.4 reshape2_1.2.1
plyr_1.7.1
[8] XML_3.9-4.1 GenomicRanges_1.9.54 IRanges_1.15.40
BiocGenerics_0.3.1 BiocInstaller_1.4.7
loaded via a namespace (and not attached):
[1] bitops_1.0-4.1 BSgenome_1.25.7 RCurl_1.91-1.1 stats4_2.15.1
stringr_0.6.1 tools_2.15.1 zlibbioc_1.2.0
[[alternative HTML version deleted]]