grConverter: convert a GRanges to a JSON query for mongodb

Description Usage Arguments Value Examples

View source: R/lite.R

Description

convert a GRanges to a JSON query for mongodb

Usage

1
2
3
4
grConverter(
  queryGRange,
  cfields = c(chrom = "chrom", start = "chromStart", end = "chromEnd")
)

Arguments

queryGRange

a GRanges-class instance of length 1

cfields

a named character(3) vector with names 'chrom', 'start', 'end'; the element values will be used to name document fields in the query

Value

a JSON document generated by rjson::toJSON

Examples

1
2
gr = GenomicRanges::GRanges('chr1', IRanges(1,25000))
grConverter(gr, cfields=c(chrom='chr', start='start', end='end'))

vjcitn/TxRegInfra2 documentation built on Jan. 1, 2021, 12:41 p.m.