select_samples_on_mutations: Filter dataset by samples' mutation count

View source: R/preprocessing.R

select_samples_on_mutationsR Documentation

Filter dataset by samples' mutation count

Description

Dataset filtering on samples, based on their mutation count

Usage

select_samples_on_mutations(mutmatrix, n, desc = TRUE)

Arguments

mutmatrix

input dataset (mutational matrix) to be reduced

n

number of samples to be kept

desc

T: select the n least mutated samples, F: select the n most mutated samples

Value

the modified dataset (mutational matrix)

Examples

require(dplyr)
# keep information on the 5 most mutated samples
select_samples_on_mutations(example_dataset(), 5)
# keep information on the 5 least mutated samples
select_samples_on_mutations(example_dataset(), 5, desc = FALSE)
# combine selections
select_samples_on_mutations(example_dataset() , 5, desc = FALSE) %>%
    select_genes_on_mutations(5)


redsnic/CIMICE documentation built on March 30, 2022, 2:46 a.m.