get_count_matrix {ODER}R Documentation

Generate the count matrix

Description

Scores the mean coverage of the expressed regions as a count matrix

Usage

get_count_matrix(bw_paths, annot_ers, cols = NULL)

Arguments

bw_paths

Vector containing the bigwig file paths to read in

annot_ers

GRangesList containing the annotated ERs (product of annotatERs)

cols

A dataframe containing the information to be used as colData for the output. If NULL then the bw_paths will be used for the colData

Value

A Ranged Summarized Experiment containing the gene counts as an assay

Examples

megadepth::install_megadepth()

rec_url <- recount::download_study(
    project = "SRP012682",
    type = "samples",
    download = FALSE
)
# file_cache is an internal function to download a bigwig file from a link
# if the file has been downloaded recently, it will be retrieved from a cache
bw_path <- file_cache(rec_url[1])

ex_opt_ers <- GenomicRanges::GRanges(
    seqnames = S4Vectors::Rle(c("chr1", "chr2"), c(4, 1)),
    ranges = IRanges::IRanges(
        start = c(1:5),
        end = seq(100, 500, 100)
    )
)

example_cm <- get_count_matrix(
    bw_paths = c(bw_path, bw_path),
    annot_ers = ex_opt_ers
)
example_cm

[Package ODER version 1.0.0 Index]