annoDF2GR {Repitools} | R Documentation

## Convert a `data.frame` to a `GRanges`.

### Description

Checks that the `data.frame` has the required columns, `chr`, `start`, `end`, then creates a `GRanges`, keeping all of the additional columns.

### Usage

      ## S4 method for signature 'data.frame'
    annoDF2GR(anno)

### Arguments

`anno` | An `data.frame`, describing some genomic features.

### Details

Extra columns are added to the `elementMetadata` of the `GRanges` object.

### Value

A `GRanges` of the annotation.

### Author(s)

Dario Strbenac

### Examples

      df <- data.frame(chr = c("chr1", "chr3", "chr7", "chr22"),
                       start = seq(1000, 4000, 1000),
                       end = seq(1500, 4500, 1000),
                       t = c(3.11, 0.93, 2.28, -0.18),
                       gc = c("High", "High", "Low", "High"))

      annoDF2GR(df)

[Package Repitools version 1.38.0 Index]