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

Valerie Obenchain vobencha at fhcrc.org
Mon May 13 06:03:55 CEST 2013


Hi Leonard,

Thanks for reporting the bug. The problem was that when 
'ignore.strand=TRUE', 'start' was being set to TRUE. Now fixed in 
GenomicRanges 1.12.13 in release and 1.13.10 in devel. Both versions are 
available in svn now or through biocLite() Tuesday after 9am PST.

Valerie



On 05/09/2013 11:47 AM, Leonard Goldstein wrote:
> 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
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list