plot_mapping_categories: Plot annotation category percentages for alignments

View source: R/rnaseq_workflow_qc.R

plot_mapping_categoriesR Documentation

Plot annotation category percentages for alignments

Description

Create stacked barplots with percentages for types of genomic annotations.

Usage

plot_mapping_categories(
  data,
  fill = NULL,
  sort = F,
  ids = NULL,
  invert = F,
  consolidate = F,
  return_data = F
)

Arguments

data

A data frame with annotation data in the same format as rseqc_alignment_category returned by load_paired_end_qc_data.

fill

A string vector with 3 or 6 colors corresponding to cateogires for the barplot.

sort

A logical. Should the x-axis be ordered by coding sequence/exonic alignment percentage?

ids

A vector of rownames for subsetting data for plotting.

invert

A logical. Should ids be used for excluding rows from plotting instead?

consolidate

A logical. Should mapping categories be consolidated into the three more general categories of exonic, intronic, and intergenic?

return_data

A logical. Should plot data be returned instead of a ggplot object?

Details

Create barplots with the percentage of alignments that map to a genomic region with annotations of intergenic, proximally down and upstream of genes, intronic, UTRs or coding sequence. Includes the option to consolidate categories into more general categories for intergenic, intronic, and exonic regions.

Value

A ggplot object. If return_data is TRUE, then a data frame with the plot data values for each genomic annotation category as columns.

See Also

load_paired_end_qc_data


bryancquach/omixjutsu documentation built on Jan. 29, 2023, 3:47 p.m.