[Bioc-devel] Fast check of GenomicRanges equality to speed up cbind, SummarizedExperiment
Peter Hickey
peter.hickey at gmail.com
Tue Aug 30 14:57:20 CEST 2016
The cbind,SummarizedExperiment-method checks that the rowRanges slots
are equal by calling `all(x == x1)`, where x and x1 are GenomicRanges
objects. This can be kind of slow and makes a large, temporary vector
when length(x) is large.
I wrote a fast method to check equality of two GenomicRanges objects,
see https://gist.github.com/PeteHaitch/13787125a165928e652dcfea2a8d166a.
It takes it from 13.7 seconds to 0.004 seconds for a GenomicRanges
object with 100M elements on my machine. It uses identical() on key
slots of the GenomicRanges objects, and I'm not sure if this could
return false negatives, so I fall back to all(x == x1) if the fast
method returns FALSE.
Could cbind,SummarizedExperiment-method be updated to use something like this?
Cheers,
Pete
More information about the Bioc-devel
mailing list