importBedScore: importBedScore

Description Usage Arguments Methods (by class) Author(s) Examples

Description

Given a set of peaks (GRanges object) and a vector of one or more file paths of .bed files with some score, import these and summarize using a FUN over them. Also can specify which column the score should be read from in the file and the default value per peak if nothing is determined.

Usage

1
2
3
4
5
importBedScore(ranges, files, colidx = 5, FUN = sum, default.val = 0)

## S4 method for signature 'GRanges,character'
importBedScore(ranges, files, colidx = 5,
  FUN = sum, default.val = 0)

Arguments

ranges

A GRanges object corresponding to the peaks used to aggregrate a score over

files

A character vector of files that will be imported and digested for analysis

colidx

The column index of the score. This assumes that the first three columns specific genomic coordinates. Default is 5 for the fifth column in the .bed files

FUN

Function to summarize multiple hits in the .bed file over the peak.

default.val

Default value to populate the matrices ahead of time. By default, 0.

Methods (by class)

Author(s)

Caleb Lareau

Examples

1
2
3
4
files <- list.files(system.file('extdata',package='gchromVAR'), pattern = "*.bed$",
 full.names = TRUE)
data(mini_counts, package = "chromVAR")
w_se <- importBedScore(SummarizedExperiment::rowRanges(mini_counts), files)

caleblareau/gchromVAR documentation built on Jan. 16, 2020, 3:07 p.m.