get_variable_regions: Get variable regions

Description Usage Arguments Value Examples

View source: R/get_variable_regions.R

Description

given a data.frame of genomic regions enrichments, the function returns the number of variable regions across all samples. The resulting matrix can be directly used with PCAtools or ComplexHeatmap for further downstream explorative analysis e.g. unsupervised clustering

Usage

1
2
get_variable_regions(enrichments_df, log_transform = TRUE,
  scale = TRUE, num_regions = 500)

Arguments

enrichments_df

a data.frame o enrichments at genomic regions. Output of multiBigwig_summary or a similar format is compatible

log_transform

logical, whether to log2 transform the counts, default TRUE

scale

logical, whether to scale the variable regions before returning the results, default TRUE

num_regions

number of variable regions to return, default 500

Value

a data.frame of scaled variable regions

Examples

1
2
3
4
5
6
7
8
mat <- matrix(sample.int(15, 9*100, TRUE), 9, 100) %>% as.data.frame()
mat <- mat %>%
tibble::rowid_to_column(var = 'start') %>%
dplyr::mutate(end = start + 1000) %>%
dplyr::mutate(chr = 'chr1') %>%
dplyr::select(chr, start, end, dplyr::everything())

get_variable_regions(enrichments_df = mat, num_regions = 50)

itsvenu/ALPS documentation built on Nov. 4, 2019, 2:13 p.m.