Skip to contents

Sorts a GRanges-class objects by seqname (chromosome), start, and position.

Usage

sortByChromAndStart(x)

sortByChromAndEnd(x)

Arguments

x

GRanges object

Value

GRanges-class object or from the original object class.

Details

Objects that inherits from a GRanges-class can be sorted as well.

Examples

GR <- as(c("chr2:1-1", "chr1:1-1"), "GRanges")
GR <- sortByChromAndStart(GR)