Learn R Programming

Repitools (version 1.18.0)

annoDF2GR: 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

"annoDF2GR"(anno)

Arguments

anno
An data.frame, describing some genomic features.

Value

A GRanges of the annotation.

Details

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

Examples

Run this code
  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)

Run the code above in your browser using DataLab