get_variable_regions {ALPS}R Documentation

Get variable regions

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

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


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)

[Package ALPS version 1.4.0 Index]