multiBigwig_summary: Enrichments at genomics regions

Description Usage Arguments Value Examples

View source: R/multiBigwig_summary.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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)

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