prepare_fetch_GRanges_names {seqsetvis} | R 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

    qgr = seqsetvis::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)

[Package seqsetvis version 1.12.0 Index]