annoGR2DF {Repitools} | R Documentation

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

### Description

Converting a `GRanges` that might be annotated with some kind of results to a `data.frame` is useful, because it allows easier writing to file and viewing in other programs, like a spreadsheet program.

### Usage

      ## S4 method for signature 'GRanges'
    annoGR2DF(anno)

### Arguments

`anno` | A `GRanges`, describing some genomic features.

### Details

The column name `seqnames` is changed to `chr`, and if all the strands are `*`, then the `strand` column is dropped.

### Value

A `data.frame` of the annotation.

### Author(s)

Dario Strbenac

### Examples

      require(GenomicRanges)
      chrs <- c("chr1", "chr3", "chr7", "chr22")
      starts <- seq(1000, 4000, 1000)
      ends <- seq(1500, 4500, 1000)
      t <- c(3.11, 0.93, 2.28, -0.18)
      gc <- c("High", "High", "Low", "High")
      gr <- GRanges(chrs, IRanges(starts, ends), strand = '*', t, gc)

      annoGR2DF(gr)

[Package Repitools version 1.36.0 Index]