prepare_fetch_GRanges_names: Creates a named version of input GRanges using the same...

View source: R/functions_fetch_signal.R

prepare_fetch_GRanges_namesR Documentation

Creates a named version of input GRanges using the same method seqsetvis uses internally to ensure consistency.

Description

If $id is set, that value is used as name and duplicates are checked for.

Usage

prepare_fetch_GRanges_names(qgr, include_id = FALSE)

Arguments

qgr

input GRanges object the set/check names on

include_id

if TRUE, $id is retained. Default is FALSE.

Value

and named GRanges based on input qgr.

Examples

data(CTCF_in_10a_overlaps_gr)
qgr = CTCF_in_10a_overlaps_gr
names(qgr) = NULL
#default is to paste "region_" and iteration along length of qgr
prepare_fetch_GRanges_names(qgr)
#id gets used is already set
qgr$id = paste0("peak_", rev(seq_along(qgr)), "_of_", length(qgr))
prepare_fetch_GRanges_names(qgr)

jrboyd/seqsetvis documentation built on Oct. 15, 2024, 11:28 p.m.