gr.sub: Apply 'gsub' to seqlevels of a 'GRanges'

gr.subR Documentation

Apply gsub to seqlevels of a GRanges

Description

Apply gsub to seqlevels of gr, by default removing 'chr', and "0.1" suffixes, and replacing "MT" with "M"

Usage

gr.sub(gr, a = c("^chr", "MT"), b = c("", "M"))

Arguments

gr

GRanges to switch out seqlevels for

a

vector of regular expressions of things to substitute out (default = c("^chr", "MT"))

b

vector of values to substitute in (default = c("", "M"))

Value

GRanges with substitutions


mskilab/gUtils documentation built on June 6, 2023, 12:08 a.m.