construct_introns: Construct introns from gtf/gff objects

Description Usage Arguments Value See Also Examples

Description

This function generates intronic coordinates by extracting all the exons from a gtf or gff object.

Usage

1

Arguments

x

An object of class gtf/gff. It has to have exon feature present.

update

If TRUE (default), x is updated by reference and returned invisibily, else just the intron coordinates are returned.

Value

An object of class gtf/gff with updated intron coordinates or just the intron coordinates depending on update. They all inherit from GRanges.

See Also

supported_formats read_format extract as_granges

Examples

1
2
3
4
5
6
7
8
path <- system.file("tests", package="gread")
gtf_file <- file.path(path, "sample.gtf")
gtf <- read_format(gtf_file)
# update gtf with intron coordinats from the exon gaps 
# and return the updated object
ans <- construct_introns(gtf, update=TRUE)[] # default
# same as above, but returns only constructed introns
introns <- construct_introns(gtf, update=FALSE)

openanalytics/gread documentation built on May 24, 2019, 2:29 p.m.