Hi,
I'd like to point out that resize extends beyond the start of a chromosome, for
reads that are close to the start, and on the negative strand.
> gr
GRanges with 1 range and 0 elementMetadata values
seqnames ranges strand |
<Rle> <IRanges> <Rle> |
[1] chr2 [250, 285] - |
> resize(gr, 300)
GRanges with 1 range and 0 elementMetadata values
seqnames ranges strand |
<Rle> <IRanges> <Rle> |
[1] chr2 [-14, 285] - |
seqlengths
chr2
NA
Would the desirable behaviour be to only extend to base 1 ?
One more question. In the user manual (page 12, bottom), it says lapply can be
used on a GRangesList, but it's not working for me.
> grl
GRangesList of length 3
$gr1
GRanges with 1 range and 2 elementMetadata values
seqnames ranges strand | score GC
<Rle> <IRanges> <Rle> | <integer> <numeric>
[1] chr2 [3, 6] + | 5 0.45
$gr2
GRanges with 2 ranges and 2 elementMetadata values
seqnames ranges strand | score GC
<Rle> <IRanges> <Rle> | <integer> <numeric>
[1] chr1 [ 7, 9] + | 3 0.3
[2] chr1 [13, 15] - | 4 0.5
$gr3
GRanges with 2 ranges and 2 elementMetadata values
seqnames ranges strand | score GC
<Rle> <IRanges> <Rle> | <integer> <numeric>
[1] chr1 [1, 3] - | 6 0.4
[2] chr2 [4, 9] - | 2 0.1
seqlengths
chr2 chr1
NA NA
> lapply(grl, cat, "Hello")
Error in as.list.default(X) :
no method for coercing this S4 class to a vector
--------------------------------------
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia
_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing