trans_cor: transform one hg coordinates to another

Description Usage Arguments Value Examples

View source: R/transform_cor.R

Description

Convert coordinates between different genomes when necessary.

Usage

1
trans_cor(peak, hg_from, hg_to)

Arguments

peak

A GRange object. The genome, the coordinates of which need to be coverted.

hg_from

The genome are coverting from. This parameter can be "hg18", "hg19" or "hg38", etc.

hg_to

Which type the genome is converting to. This parameter can be "hg18", "hg19" or "hg38", etc. NOTICE hg_from and hg_to should be different from each other.

Value

A GRanges object.

Examples

1
2
3
4
5
6
7
peak_df <- data.frame(chrom = c("chr7", "chr7", "chr7"),
                      chromStart = c(128043908, 128045075, 128046242),
                      chromEnd = c(128045074, 128046241, 128047408),
                      stringsAsFactors = FALSE)
peak <-  as(peak_df, "GRanges")

trans_cor(peak, "hg19", "hg38")

primirTSS documentation built on Nov. 8, 2020, 7:11 p.m.