Learn R Programming

diffloop (version 1.0.2)

bedToGRanges: Read a file and make a GRanges object

Description

bedToGRanges takes a string corresponding to a file and creates a GRanges object, retaining meta-data

Usage

bedToGRanges(file)

## S3 method for class 'character': bedToGRanges(file)

Arguments

file
A string specifiying .bed file location

Value

  • A GRanges object

Details

Useful function to read in a .bed file to create a GRanges object where the meta-data is presevered. Useful for later functions like annotateAnchors

Examples

Run this code
#Read in CTCF Jurkat peaks in
ctcf_j <- system.file('extdata','Jurkat_CTCF_chr1.narrowPeak',package = 'diffloop')
ctcf <- bedToGRanges(ctcf_j)

Run the code above in your browser using DataLab