subset_bagel_by_annotation: Creates a new bagel subsetted to only one value of a sample...

Description Usage Arguments Value Examples

View source: R/main_class.R

Description

Creates a new bagel subsetted to only one value of a sample annotation

Usage

1
subset_bagel_by_annotation(bay, annot_col, annot_names)

Arguments

bay

Input bagel

annot_col

Annotation class to use for subsetting

annot_names

Annotational value to subset to

Value

Returns a new bagel object with sample annotations, count tables, and variants subsetted to only contains samples of the specified annotation type

Examples

1
2
3
4
5
6
7
bay <- readRDS(system.file("testdata", "bagel_sbs96.rds", package = "BAGEL"))
sample_annotations <- read.table(system.file("testdata",
"sample_annotations.txt", package = "BAGEL"), sep = "\t", header=TRUE)
init_sample_annotations(bay)
add_sample_annotations(bay, sample_annotations, sample_column =
"Sample_Names", columns_to_add = "Tumor_Subtypes")
subset_bagel_by_annotation(bay, "Tumor_Subtypes", "Lung")

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