Description Usage Arguments Value Examples
View source: R/get_variable_regions.R
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
1 2 | get_variable_regions(enrichments_df, log_transform = TRUE,
scale = TRUE, num_regions = 500)
|
enrichments_df |
a data.frame o enrichments at genomic regions. Output of
|
log_transform |
logical, whether to log2 transform the counts, default |
scale |
logical, whether to |
num_regions |
number of variable regions to return, default |
a data.frame of scaled variable regions
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.