Test whether GRanges are disjoint (non-overlapping)

jam_isDisjoint(x)

Arguments

x

GRanges or GRangesList object

Value

logical vector indicating whether the input x contains disjoint ranges. When input x is a GRangesList then the vector represents each GenomicRanges object in the GRangesList and should therefore be length(x). When input x is GRanges this function returns one value representing the full GRanges object. The output for this function changed in version 0.0.64.900 to be consistent with GenomicRanges::isDisjoint().

Details

This function is a simple alternative to GenomicRanges::isDisjoint() that is intended to produce identical output while being markedly more efficient. For large GRangesList objects the result from GenomicRanges::isDisjoint() was returned in 100+ seconds, and the result from jam_isDisjoint() was returned in 0.5 seconds.

Note that this function forces ignore.strand=FALSE, which means all comparisons are strand-specific. To force non-stranded comparisons, update the strand of the input object to "*".

See also