Skip to contents

Flatten the variant GRanges of an LdData into a reference-panel data.frame.

Usage

getRefPanel(x)

# S4 method for class 'LdData'
getRefPanel(x)

Arguments

x

An LdData.

Value

A data.frame.

Examples

data(eqtlRegionExample)
X <- eqtlRegionExample$X[, 1:8]
gr <- GenomicRanges::GRanges("22",
  IRanges::IRanges(seq(1L, by = 100L, length.out = 8), width = 1L))
ld <- LdData(correlation = cor(X), variants = gr,
  blockMetadata = S4Vectors::DataFrame(
    chrom = "22", start = 1L, end = 1000L))
getRefPanel(ld)
#> # A tibble: 8 × 2
#>   chrom   pos
#>   <chr> <int>
#> 1 22        1
#> 2 22      101
#> 3 22      201
#> 4 22      301
#> 5 22      401
#> 6 22      501
#> 7 22      601
#> 8 22      701