get_genesizes: Grab gene length/width/size from an annotation database.

View source: R/annotation_shared.R

get_genesizesR Documentation

Grab gene length/width/size from an annotation database.

Description

This function tries to gather an appropriate gene length column from whatever annotation data source is provided.

Usage

get_genesizes(
  annotation = NULL,
  type = "gff",
  gene_type = "gene",
  type_column = "type",
  key = NULL,
  length_names = NULL,
  ...
)

Arguments

annotation

There are a few likely data sources when getting gene sizes, choose one with this.

type

What type of annotation data are we using?

gene_type

Annotation type to use (3rd column of a gff file).

type_column

Type identifier (10th column of a gff file).

key

What column has ID information?

length_names

Provide some column names which give gene length information?

...

Extra arguments likely for load_annotations()

Value

Data frame of gene IDs and widths.

See Also

[rtracklayer] [load_gff_annotations()]

Examples

 pa_gff <- system.file("share", "paeruginosa_pa14.gff", package = "hpgldata")
 pa_genesizes <- get_genesizes(gff = pa_gff)
 head(pa_genesizes)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.