Combine genotype panels into one LD reference whose LD is
the weighted average of theirs. See GenotypeMixture-class.
The panels are matched by position and alleles and put into the first panel's allele coding, so they need not share variant ids or allele orientation. The mixture covers the variants every panel carries; a variant some panel lacks is left out, with a message.
Arguments
- panels
A named list of at least two genotype panels (see
readGenotypes). The names are the cohorts: they name the mixture's experiments and prefix its samples.- mixtureWeights
One non-negative weight per panel, summing to 1; typically each cohort's share of the GWAS sample size. Matched to the panels by name when named, by position otherwise.
Examples
panel <- readGenotypes(plink2Prefix = file.path(system.file("extdata",
"ld_reference", "chr22", package = "pecotmr"),
"protocol_example.LD.chr22"))
half <- seq_len(ncol(panel) / 2)
mix <- GenotypeMixture(list(EUR = panel[, half], AFR = panel[, -half]),
mixtureWeights = c(EUR = 0.7, AFR = 0.3))
mix
#> GenotypeMixture: 175 variants from 2 genotype panels
#> panels EUR, AFR; weights 0.7, 0.3; panel sizes 500, 500