Skip to contents

Given an ldLoaderSpec (from ldLoader) and a block index g, load the corresponding LD correlation matrix (or the genotype matrix, in region mode with returnGenotype = TRUE).

Usage

loadLdBlock(spec, g)

Arguments

spec

An ldLoaderSpec object returned by ldLoader.

g

Integer block index (1-based).

Value

The LD correlation matrix or genotype matrix for block g.

See also

Examples

spec <- ldLoader(rList = list(diag(10), diag(15)))
loadLdBlock(spec, 1)
#>       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#>  [1,]    1    0    0    0    0    0    0    0    0     0
#>  [2,]    0    1    0    0    0    0    0    0    0     0
#>  [3,]    0    0    1    0    0    0    0    0    0     0
#>  [4,]    0    0    0    1    0    0    0    0    0     0
#>  [5,]    0    0    0    0    1    0    0    0    0     0
#>  [6,]    0    0    0    0    0    1    0    0    0     0
#>  [7,]    0    0    0    0    0    0    1    0    0     0
#>  [8,]    0    0    0    0    0    0    0    1    0     0
#>  [9,]    0    0    0    0    0    0    0    0    1     0
#> [10,]    0    0    0    0    0    0    0    0    0     1