Generate GenomicHistogram objects from BED files
Source:R/genome_BED_to_histogram.R
genome_BED_to_histogram.Rd
Generate GenomicHistogram objects from BED files
Usage
genome_BED_to_histogram(
filenames,
n_fields = c(4, 6, 12),
regions = NULL,
histogram_bin_size = 1,
allow_overlapping_segments_per_sample = F
)
Arguments
- filenames
A vector of BED filenames. The
name
column of the BED files must indicate gene or transcript name.- n_fields
Number of columns in the BED file that conform to BED file standards. Default 4
- regions
A GRanges or GRangesList object representing regions of interest defining histograms, a GRangesList object allows for the specification of non-continuous segments, default NULL - regions are taken as the set of elements with nonzero coverage
- histogram_bin_size
The bin size (base-pairs) to bin signal into a histogram. Default 1
- allow_overlapping_segments_per_sample
logical, if FALSE, overlapping segments in the same file will be de-duplicated in the coverage calculation, if TRUE, they will be taken as separate input, default FALSE
Examples
if (FALSE) {
datadir <- system.file("extdata", "dna_bedfiles", package = "HistogramZoo")
filenames <- list.files(datadir, pattern = ".bed$")
filenames <- file.path(datadir, filenames)
histograms <- genome_BED_to_histogram(
filenames = filenames,
n_fields = 6,
histogram_bin_size = 1)
}