getLabels: Generate a GRanges of labels 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 labels which can then be plotted with the label_data argument of many functions in this package such as gmovizInitialise, insertionDiagram or featureDiagram.

Usage

1
2
getLabels(gff_file, colour_code = TRUE,
  colours = bright_colours_opaque)

Arguments

gff_file

Location of the gff file to read in.

colour_code

If TRUE, the labels will be assigned colours according to the 'type' field of the gff file. If FALSE, colours will not be assigned.

colours

A character vector of colours to be used to colour code the labels (if colour_code is TRUE).

Value

A GRanges containing the gene label data. See gmovizInitialise for a detailed description of the format.

See Also

getFeatures for a function which reads the entries of a .gff file into 'features' rather than labels. Also gmovizInitialise, insertionDiagram and featureDiagram for functions which can plot this data.

Examples

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

## colour coded
getLabels(path)

## not colour coded (all black)
getLabels(path, colour_code=FALSE)

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