Creates a new musica object subsetted to only one value of a sample annotation
Source:R/class_musica.R
subset_musica_by_annotation.Rd
Creates a new musica object subsetted to only one value of a sample annotation
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
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"
)