subset_musica_by_annotation: Creates a new musica object subsetted to only one value of a...

Description Usage Arguments Value Examples

View source: R/main_class.R

Description

Creates a new musica object subsetted to only one value of a sample annotation

Usage

1
subset_musica_by_annotation(musica, annot_col, annot_names)

Arguments

musica

A musica object.

annot_col

Annotation class to use for subsetting

annot_names

Annotational value to subset to

Value

Returns a new musica 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
8
data(musica_sbs96)
annot <- read.table(system.file("extdata", "sample_annotations.txt", 
package = "musicatk"), sep = "\t", header=TRUE)

samp_annot(musica_sbs96, "Tumor_Subtypes") <- annot$Tumor_Subtypes

musica_sbs96 <- subset_musica_by_annotation(musica_sbs96, "Tumor_Subtypes", 
"Lung")

musicatk documentation built on Nov. 8, 2020, 5:16 p.m.