[Bioc-devel] ordering GenomicRanges without regard for strand

Hervé Pagès hpages at fhcrc.org
Fri Dec 13 01:19:20 CET 2013


Hi Michael,

Feels like Christmas is not far away ;-)

Right now only the "match" method in the GenomicRanges-comparison.R
family supports the 'ignore.strand' arg and I think it would be a good
thing to have other "comparison" methods support it. It's too bad
for order() though (but maybe there is a way to hack the definition of
the generic in BiocGeneric?). Should be easy for sort(). Will do.

Cheers,
H.


On 12/12/2013 01:44 PM, Michael Lawrence wrote:
> It is very common to want to order a GenomicRanges by *position* but not
> strand. Would be nice to have an ignore.strand argument for ordering
> GenomicRanges. I realize that this is not possible by the order generic.
> But it would be possible for sort().
>
> I also realize that someone could do this:
>
> gr2 <- gr
> strand(gr2) <- "*"
> gr[order(gr2)]
>
> But that is long-winded. Perhaps there could be an unstrand()?
>
> gr[order(unstrand(gr))]
>
> But this is still better:
>
> sort(gr, ignore.strand=TRUE)
>
> Sound like a good thing?
>
> Michael
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list