rmchr: Remove 'chr' from GRanges seqnames

Description Usage Arguments Details Value Examples

Description

rmchr takes a loops object or GRanges object and simply removes the 'chr' from seqnames, if is present

Usage

1
2
3
4
5
6
7
rmchr(dlo)

## S4 method for signature 'loops'
rmchr(dlo)

## S4 method for signature 'GRanges'
rmchr(dlo)

Arguments

dlo

A loops object or GRanges object

Details

Often times, performing functions on GRanges objects can go awry if the seqnames are systematically different. A common example of this is when some GRanges objects has the format of 'chr1' while the other has '1'. We can remove 'chr' from the first object

Value

An identical loops/GRanges object except 'chr' removed

Examples

1
2
3
4
5
6
library(GenomicRanges)
regA <- GRanges(c('1'),IRanges(c(36200000),c(36300000)))
addchr(regA)
regA
rmchr(regA)
regA

aryeelab/diffloop documentation built on May 12, 2019, 3:42 a.m.