Compute

Cohort-level computations such as scores, kinship, embeddings, and population structure.

compute provides a high-level interface for data transformations on PolyGeniusData objects. It organizes functions for:
Aliases: compute, print.computeEngine
Calculates the PRS values for every model in a PolyGeniusData object.
Aliases: compute-scores, compute.scores, compute$scores
Computes samples’ population structure by performing PCA. PCA is either computed in-sample (samples’ own PC space, or by projecting onto a known reference panel. This function uses the GenotypeInfo$samples.PCA or GenotypeInfo$samples.PCAProject of data$genotype
Aliases: compute-population-structure, compute.population.structure, compute$populationStructure, compute$population.structure
Estimates the genetic relatedness (kinship) between all pairs of samples in a PolyGeniusData object. It extracts allele dosages for a defined set of variants and calls PLINK’s kinship routine to produce a sample-by-sample kinship coefficient matrix.
Aliases: compute-kinship, compute.kinship, compute$kinship
Executes genome-wide association tests for PRS variants against one or more phenotypes. Optional covariates (e.g., principal components) can be included to correct for population stratification.
Aliases: compute-single-variant-assoc, compute.single.variant.associations, compute$singleVariantAssociations, compute$single.variant.associations
compute$similarity$obs() and compute$similarity$mod() compute pairwise similarity or distance matrices between observations (based on PRS score profiles) or between models (based on SNP overlap or score patterns).
Aliases: compute-similarity, compute.similarity.obs, compute.similarity.mod, compute$similarity$obs, compute$similarity$mod
Computes dimensionality reduction embeddings (PCA, MDS, UMAP, t-SNE, PHATE) for observations in a PolyGeniusData object. Embeddings can be computed from any layer in obs/obsp, or from a pre-computed similarity matrix.
Aliases: compute-embedding, compute.embedding.obs, compute.embedding.mod, compute$embedding$obs, compute$embedding$mod