multiBigwig_summary {ALPS}R Documentation

Enrichments at genomics regions

Description

multiBigwig_summary is a function to calculate enrichments from a set of given bigwig files and a set of genomics regions. This function is similar to deeptools multiBigwigSummary python package.

Usage

multiBigwig_summary(data_table, summary_type = "mean", parallel = TRUE)

Arguments

data_table

a dataframe that contains bw_path, sample_id. sample_id ids will be used in the final result matrix

summary_type

whether to calculate mean, median, min or max for each genomic region in within consensus peak-set from the bigwig files. Default is mean

parallel

logical. Whether to parallelize the calculation process, default is TRUE

Value

data.frame of enrichments within given genomic regions

Examples


## load example data

chr21_data_table <- system.file('extdata/bw', 'ALPS_example_datatable.txt', package = 'ALPS', mustWork = TRUE)

## attach path to bw_path and bed_path
d_path <- dirname(chr21_data_table)

chr21_data_table <- read.delim(chr21_data_table, header = TRUE)
chr21_data_table$bw_path <- paste0(d_path, '/', chr21_data_table$bw_path)
chr21_data_table$bed_path <- paste0(d_path, '/', chr21_data_table$bed_path)

enrichments <- multiBigwig_summary(data_table = chr21_data_table,
                                   summary_type = 'mean',
                                   parallel = FALSE)

[Package ALPS version 1.2.0 Index]