Generate GenomicHistogram objects from BED files using coordinates defined by a GTF file
Source:R/transcript_BED_to_histogram.R
transcript_BED_to_histogram.Rd
Generate GenomicHistogram objects from BED files using coordinates defined by a GTF file
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
- gtf
A GTF file
- histogram_bin_size
The bin size (base-pairs) to bin signal into a histogram, default 1
- gene_or_transcript
gene
ortranscript
indicating whether histograms should be built on gene coordinates or transcript coordinates, default gene- select_strand
*
,+
or-
to filter regions by strand, default '*'- select_chrs
a vector of chromosomes to filter regions by chromosome, default NULL
- select_ids
gene or transcript ids to filter regions by gene or transcript name, must correspond to GTF ids, default NULL
- allow_overlapping_segments_per_sample
logical, if FALSE, overlapping segments in the same region in the same file will be de-duplicated in the coverage calculation, default NULL NOTE: regions are determined by GTF gene/transcript IDs and the name column of BED files. If TRUE, they will be taken as separate input, default FALSE
Examples
if (FALSE) {
datadir <- system.file("extdata", "rna_bedfiles", package = "HistogramZoo")
filenames <- file.path(datadir, paste0("Sample.", 1:20, ".bed"))
gtf <- system.file("extdata", "genes.gtf", package = "HistogramZoo")
histograms <- transcript_BED_to_histogram(
filenames = filenames,
n_fields = 12,
gtf = gtf,
gene_or_transcript = "gene",
histogram_bin_size = 10)
}