toGenomeOrder: Set a GRanges or GenoSet to genome order

Description Usage Arguments Details Value See Also Examples

Description

Returns a re-ordered object sorted by chromosome and start position. If strict=TRUE, then chromosomes must be in order specified by chrOrder. If ds is already ordered, no re-ordering is done. Therefore, checking order with isGenomeOrder, is unnecessary if order will be corrected if isGenomeOrder is FALSE.

Usage

1
toGenomeOrder(ds, strict = TRUE)

Arguments

ds

GenoSet or GRanges

strict

logical, should chromosomes be in order specified by chrOrder?

Details

toGenomeOrder for GRanges differs from sort in that it orders by chromsome and start position only, rather than chromsome, strand, start, and width.

Value

re-ordered ds

See Also

Other "genome ordering": chrOrder, isGenomeOrder

Examples

1
2
3
4
  data(genoset,package="genoset")
  toGenomeOrder( genoset.ds, strict=TRUE )
  toGenomeOrder( genoset.ds, strict=FALSE )
  toGenomeOrder( rowRanges(genoset.ds) )


Search within the genoset package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.