getFeatures: Generate a GRanges containing 'features' from .gff files

Description Usage Arguments Value See Also Examples

View source: R/gmoviz.R

Description

Uses a .gff file to create a GRanges of 'features' (e.g. genes or other regions of interest within the genome) which can then be plotted with the featureDiagram or drawFeatureTrack functions.

Usage

1
getFeatures(gff_file, colours = nice_colours, colour_by_type = TRUE)

Arguments

gff_file

Location of the gff file to read in.

colours

A character vector of colours to be used to colour code the features.

colour_by_type

If TRUE, the features will be coloured according to the 'type' field of the gff file. If FALSE, colours will be assigned based on the name of the feature (each uniquely named feature gets its own colour).

Value

A GRanges containing the 'features'. See drawFeatureTrack for a detailed description of the format.

See Also

getLabels for a function which reads the entries of a .gff file into labels rather than 'features'. Also featureDiagram or drawFeatureTrack for functions which can plot this data.

Examples

1
2
3
4
5
6
7
8
## the example .gff
path <- system.file('extdata', 'example.gff3', package='gmoviz')

## coloured by type
getFeatures(path)

## not coloured by type (each uniquely named feature gets its own colour)
getFeatures(path, colour_by_type=FALSE)

gmoviz documentation built on Nov. 8, 2020, 5:41 p.m.