get_single_strand_matrix: Single Strand Metagene Matrix

Description Usage Arguments Details Value Examples

View source: R/computeMatrix.R

Description

Creates metagene matrix for single bigwig file.

Usage

1
get_single_strand_matrix(bw, anno, upstream = 1000, downstream = 1000)

Arguments

bw

filename for bigwig file.

anno

GRanges object of regions to query.

upstream

bp upstream of anchor (default=1000)

downstream

bp downstream of anchor (default=1000)

Details

Loads the bed file, extracts the position of the anchor point and creates ranges from x bp upstream to x bp downstream. I upstream and downstream are both NULL, collects signal within region specified in anno.

Value

matrix with columns from most upstream to most downstream and rows are the individual regions from specified strand. rownames are set as name column from anno. colnames are set to relative position of each nt

Examples

1
2
3
4
bedfile <- system.file("extdata", "Chen_PROMPT_TSSs_liftedTohg38.bed", package = "RMetaTools")
regions <- meta_regions(bedfile, 'TSS', 1000, 5000)
bw <- system.file("extdata", "GSM1573841_mNET_8WG16_siLuc_plus_hg38.bw", package = "RMetaTools")
mat <- get_single_strand_matrix(bw=bw, anno=regions, upstream=1000, downstream=5000)

manschmi/RMetaTools documentation built on Dec. 14, 2021, 4:33 a.m.