build_custom_table: Builds a custom table from specified user variants

Description Usage Arguments Value Examples

View source: R/table_utils.R

Description

Builds a custom table from specified user variants

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
build_custom_table(
  bay,
  variant_annotation,
  name,
  description = "",
  data_factor = NA,
  annotation_df = NULL,
  features = NULL,
  type = NULL,
  color_variable = NULL,
  color_mapping = NULL,
  return_instead = FALSE,
  overwrite = FALSE
)

Arguments

bay

Input samples

variant_annotation

User column to use for building table

name

Table name to refer to (must be unique)

description

Optional description of the table content

data_factor

Full set of table values, in case some are missing from the data. If NA, a superset of all available unique data values will be used

annotation_df

A data.frame of annotations to use for plotting

features

A data.frame of the input data from which the count table will be built

type

The type of data/mutation in each feature as an Rle object

color_variable

The name of the column of annotation_df used for the coloring in plots

color_mapping

The mapping from the values in the selected color_variable column to color values for plotting

return_instead

Instead of adding to bagel object, return the created table

overwrite

Overwrite existing count table

Value

If return_instead = TRUE then the created table object is returned, otherwise the table object is automatically added to the bagel's count_tables list and nothing is returned

Examples

1
2
3
4
bay <- readRDS(system.file("testdata", "bagel.rds", package = "BAGEL"))
annotate_transcript_strand(bay, "19", build_table = FALSE)
build_custom_table(bay, "Transcript_Strand", "Transcript_Strand",
data_factor = factor(c("T", "U")))

campbio/BAGEL documentation built on Oct. 6, 2020, 3:59 a.m.