getLabels {gmoviz} | R Documentation

## Generate a GRanges of labels from .gff files

### 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

    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

    ## example .gff
    path <- system.file('extdata', 'example.gff3', package='gmoviz')

    ## colour coded
    getLabels(path)

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

[Package gmoviz version 1.6.0 Index]