Skip to contents

Compute the LD correlation matrix for a block of SNPs. Delegates to compute_LD for the actual computation, with automatic backend selection based on file format unless overridden.

Usage

computeBlockLdCor(
  handle,
  snp_idx,
  backend = "internal",
  method = "sample",
  ...
)

Arguments

handle

A GenotypeHandle object.

snp_idx

Integer vector of 1-based SNP indices.

backend

Character, one of "internal" (default), "snprelate", or "snpstats". When "internal", GDS-format handles automatically use SNPRelate::snpgdsLDMat via the native GDS path; other formats use the internal correlator.

method

Character, LD computation method passed to compute_LD. Default "sample".

...

Additional arguments passed to compute_LD (e.g., shrinkage, trim_samples).

Value

Numeric correlation matrix (p x p).