prep_query_gr: prepares query_gr GRanges for using in fetch functions

prep_query_grR Documentation

prepares query_gr GRanges for using in fetch functions

Description

fixed widths are recommended but not required

Usage

prep_query_gr(query_gr, region_size = NULL, id_prefix = "region")

Arguments

query_gr

GRanges of regions to be fetched

region_size

numeric fixed width to apply to query_gr. if NULL, width is not enforced.

id_prefix

character prefix to use for ids. 'region' is default and will yield ids such as region_1, region_2, region_3 ...

Details

metadata column id must be set and all ids must be unique

Value

GRanges ready for fetching

Examples

library(GenomicRanges)
qgr = GRanges("chr1", IRanges(1:10+100, 1:10+150))
prep_query_gr(qgr)
#region_size and id_prefix can be customized
prep_query_gr(qgr, region_size = 70, id_prefix = "peak")
names(qgr) = LETTERS[seq_along(qgr)]
prep_query_gr(qgr)
qgr$name = letters[seq_along(qgr)]
prep_query_gr(qgr)
#invalid - i.e. duplicated ids will be overwritten
qgr$id = rep("a", length(qgr))
prep_query_gr(qgr)

jrboyd/seqtsne documentation built on Nov. 5, 2022, 6:37 a.m.