prepare_fetch_GRanges: prepares GRanges for windowed fetching.

View source: R/functions_fetch_signal.R

prepare_fetch_GRangesR Documentation

prepares GRanges for windowed fetching.

Description

Deprecated and renamed as prepare_fetch_GRanges_width

Usage

prepare_fetch_GRanges(
  qgr,
  win_size,
  min_quantile = 0.75,
  target_size = NULL,
  skip_centerFix = FALSE
)

Arguments

qgr

GRanges to prepare

win_size

numeric window size for fetch

min_quantile

numeric value from 0 to 1. Lowest possible quantile value. Only relevant if target_size is not specified.

target_size

numeric final width of qgr if known. Default of NULL leads to quantile based determination of target_size.

skip_centerFix

boolean, if FALSE (default) all regions will be resized GenomicRanges::resize(x, w, fix = "center") to a uniform size based on min_quantile to a width divisible by win_size.

Details

output GRanges parallels input with consistent width evenly divisible by win_size. Has warning if GRanges needed resizing, otherwise no warning and input GRanges is returned unchanged.

Value

GRanges, either identical to qgr or with suitable consistent width applied.

Examples

data(CTCF_in_10a_overlaps_gr)
#use prepare_fetch_GRanges_width instead:
qgr = prepare_fetch_GRanges_width(CTCF_in_10a_overlaps_gr, win_size = 50)
#no warning if qgr is already valid for windowed fetching
prepare_fetch_GRanges_width(qgr, win_size = 50)

jrboyd/seqsetvis documentation built on Dec. 10, 2024, 11:23 a.m.