[BioC] GenomicRanges flank function with ignore.strand=TRUE

Leonard Goldstein goldstein.leonard at gene.com
Thu May 9 20:47:49 CEST 2013


Dear all,

I recently encountered an unexpected behavior of the GenomicRanges flank function.

When using it with ignore.strand=TRUE the start argument seems to be ignored. 

> g <- GRanges("1", IRanges(1001, 2000), "+")
> ranges(flank(g, 100, start=TRUE, ignore.strand=TRUE))
IRanges of length 1
    start  end width
[1]   901 1000   100
> ranges(flank(g, 100, start=FALSE, ignore.strand=TRUE))
IRanges of length 1
    start  end width
[1]   901 1000   100

I would have expected it to behave as in the case where there is no strand information:

> h <- GRanges("1", IRanges(1001, 2000), "*")
> ranges(flank(h, 100, start=TRUE))
IRanges of length 1
    start  end width
[1]   901 1000   100
> ranges(flank(h, 100, start=FALSE))
IRanges of length 1
    start  end width
[1]  2001 2100   100

Is this behavior intended? Any help or comments would be much appreciated. 

Leonard

--
Leonard Goldstein, PhD
Postdoctoral Research Fellow
Department of Bioinformatics & Computational Biology
Genentech, Inc.


> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] GenomicRanges_1.13.7 IRanges_1.19.3       BiocGenerics_0.7.2  

loaded via a namespace (and not attached):
[1] stats4_3.0.0 



More information about the Bioconductor mailing list