ssvFetchGRanges {seqsetvis} | R Documentation |
ssvFetchGRanges
Gets coverage values for each region of the query
GRanges (qgr
). Values correspond to the center of each window of
size win_size
. A tidy formatted data.table
object is returned suitable for plotting using ggplots.
ssvFetchGRanges(grs, qgr, file_attribs = data.frame(matrix(0, nrow = length(grs), ncol = 0)), unique_names = names(grs), names_variable = "sample", win_size = 50, win_method = c("sample", "summary")[1], summary_FUN = function(x, w) max(x), target_strand = c("*", "+", "-", "both")[1], anchor = c("left", "left_unstranded", "center", "center_unstranded")[3], return_data.table = FALSE, n_cores = getOption("mc.cores", 1))
grs |
a list of GRanges for which to calculate coverage. |
qgr |
Set of GRanges to query. For valid results the width of each
interval should be identical and evenly divisible by |
file_attribs |
data.frame (1 row per item in grs) containing attributes to append to results. |
unique_names |
The column name where unique_names are stored. Default is 'sample' |
names_variable |
The column name where unique_names are stored. Default is 'sample' |
win_size |
The window size that evenly divides widths in |
win_method |
character. one of c("sample", "summary"). Determines
if |
summary_FUN |
function. only relevant if win_method is "summary".
passed to |
target_strand |
character. if one of "+" or "-", reads are filtered to match. ignored if any other value. |
anchor |
character, one of c("center", "center_unstranded", "left", "left_unstranded") |
return_data.table |
logical. If TRUE the internal data.table is returned instead of GRanges. Default is FALSE. |
n_cores |
integer number of cores to use. Uses mc.cores option if not supplied. |
A tidy formatted GRanges (or data.table if specified) containing fetched values.
ssvFetchGRanges(CTCF_in_10a_narrowPeak_grs, CTCF_in_10a_overlaps_gr, win_size = 200)