biofiles (version 1.0.0)

ranges: Extract features as "'>GRanges" objects.

Description

Extract features as "'>GRanges" objects.

Usage

ranges(x, join = FALSE, key = TRUE, include = "none", exclude = "", ...)

# S4 method for gbFeature ranges(x, join = FALSE, key = TRUE, include = "none", exclude = "", ...)

# S4 method for gbFeatureTable ranges(x, join = FALSE, key = TRUE, include = "none", exclude = "", ...)

# S4 method for gbRecord ranges(x, join = FALSE, key = TRUE, include = "none", exclude = "", ...)

# S4 method for gbRecordList ranges(x, join = FALSE, key = TRUE, include = "none", exclude = "", ...)

Arguments

x

A '>gbFeature, '>gbFeatureTable, '>gbRecord, or '>gbRecordList object.

join

Join compound genomic locations into a single range.

key

Include feature keys with ranges.

include

Include qualifiers as metadata columns. Can be "none", "all", or a character vector of qualifier tags.

exclude

Exclude specific qualifiers.

...

Further arguments passed to methods.

Value

A '>GRanges or '>GRangesList object.

See Also

start, end, span, strand, location, key, qualif

Examples

Run this code
# NOT RUN {
load(system.file("extdata", "marine_metagenome.rda", package = "biofiles"))

## default "GRanges" object.
ranges(x)

## subset CDSs and include "product", "note", "protein_id" as metadata.
ranges(x["CDS"], include = c("product", "note", "protein_id"))

## subset CDSs and exclude "translation"
ranges(x["CDS"], include = "all", exclude = "translation")
# }

Run the code above in your browser using DataLab