trans_cor {primirTSS} | R Documentation

## transform one hg coordinates to another

### Description

Convert coordinates between different genomes when necessary.

### Usage

    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

    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")

[Package primirTSS version 1.6.1 Index]