sum_exon_widths: Given a data frame of exon counts and annotation information,...

View source: R/annotation_gff.R

sum_exon_widthsR Documentation

Given a data frame of exon counts and annotation information, sum the exons.

Description

This function will merge a count table to an annotation table by the child column. It will then sum all rows of exons by parent gene and sum the widths of the exons. Finally it will return a list containing a df of gene lengths and summed counts.

Usage

sum_exon_widths(
  data = NULL,
  gff = NULL,
  annotdf = NULL,
  parent = "Parent",
  child = "row.names"
)

Arguments

data

Count tables of exons.

gff

Gff filename.

annotdf

Dataframe of annotations (probably from load_gff_annotations).

parent

Column from the annotations with the gene names.

child

Column from the annotations with the exon names.

Value

List of 2 data frames, counts and lengths by summed exons.

Author(s)

Keith Hughitt with some modifications by atb.

See Also

[rtracklayer] [load_gff_annotations()]

Examples

## Not run: 
 summed <- sum_exon_widths(counts, gff = "reference/xenopus_laevis.gff.xz")

## End(Not run)

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