Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

asBED

Coerce to BED structure


Description

Coerce the structure of an object to one following BED-like conventions, i.e., with columns for blocks and thick regions.

Usage

asBED(x, ...)
## S4 method for signature 'GRangesList'
asBED(x)
## S4 method for signature 'GAlignments'
asBED(x)

Arguments

x

Generally, a tabular object to structure as BED

...

Arguments to pass to methods

Details

The exact behavior depends on the class of object.

GRangesList

This treats object as if it were a list of transcripts, i.e., each element contains the exons of a transcript. The blockStarts and blockSizes columns are derived from the ranges in each element. Also, add name column from names(object).

GAlignments

Converts to GRangesList via grglist and procedes accordingly.

Value

A GRanges, with the columns name, blockStarts and blockSizes added.

Author(s)

Michael Lawrence

Examples

## Not run: 
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
exons <- exonsBy(TxDb_Hsapiens_UCSC_hg19_knownGene)
mcols(asBED(exons))

## End(Not run)

rtracklayer

R interface to genome annotation files and the UCSC genome browser

v1.50.0
Artistic-2.0 + file LICENSE
Authors
Michael Lawrence, Vince Carey, Robert Gentleman
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.