Hi all,

Just ran into this - flank() takes notice of the strand for GRanges objects,
whilst shift() doesn't.
Would it make sense for shift to use the strand in the GRanges method, or is
there a nice alternative? (at the moment I'm doing a shift per strand)


> g1 <- GRanges(rep("chr1", 3), IRanges(rep(5, 3), width=1), c("+","-","*"))
> g1
GRanges with 3 ranges and 0 elementMetadata values
    seqnames    ranges strand |
       <Rle> <IRanges>  <Rle> |
[1]     chr1    [5, 5]      + |
[2]     chr1    [5, 5]      - |
[3]     chr1    [5, 5]      * |

seqlengths
 chr1
   NA
> flank(g1,3)
GRanges with 3 ranges and 0 elementMetadata values
    seqnames    ranges strand |
       <Rle> <IRanges>  <Rle> |
[1]     chr1    [2, 4]      + |
[2]     chr1    [6, 8]      - |
[3]     chr1    [2, 4]      * |

seqlengths
 chr1
   NA
> shift(g1,3)
GRanges with 3 ranges and 0 elementMetadata values
    seqnames    ranges strand |
       <Rle> <IRanges>  <Rle> |
[1]     chr1    [8, 8]      + |
[2]     chr1    [8, 8]      - |
[3]     chr1    [8, 8]      * |

seqlengths
 chr1
   NA

R version 2.11.0 (2010-04-22)
x86_64-unknown-linux-gnu

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=C              LC_MESSAGES=en_AU.UTF-8
 [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] GenomicRanges_1.0.7 IRanges_1.6.15

Thanks,
Aaron

-- 
Aaron Statham
Postgraduate Scholar, Cancer Epigenetics
Garvan Institute of Medical Research   Tel: (02) 9295 8393
384 Victoria St Darlinghurst 2010   Fax: (02) 9295 8316
NSW Australia         email: [email protected]

        [[alternative HTML version deleted]]

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

Reply via email to