Learn R Programming

genoset (version 1.28.2)

chrIndices: Get a matrix of first and last index of features in each chromosome

Description

Sometimes it is handy to know the first and last index for each chr. This is like chrInfo but for feature indices rather than chromosome locations. If chr is specified, the function will return a sequence of integers representing the row indices of features on that chromosome.

Usage

chrIndices(object, chr = NULL)

## S3 method for class 'GenoSetOrGenomicRanges': chrIndices(object, chr = NULL)

Arguments

object
GenoSet or GRanges
chr
character, specific chromosome name

Value

  • data.frame with "first" and "last" columns

Examples

Run this code
data(genoset,package="genoset")
  chrIndices(genoset.ds)
  chrIndices(rowRanges(genoset.ds))  # The same

Run the code above in your browser using DataLab