pathGPS: pathGPS

View source: R/columnEstimator.R

pathGPSR Documentation

pathGPS

Description

estimate the row space of V (#mediators x #phenotypes) and the column space of U (#genotypes x #mediators)

Usage

pathGPS(
  beta = "metabolites",
  UV = NULL,
  graph = NULL,
  p,
  p0,
  r,
  envr.subtract = TRUE,
  sprs.transform = TRUE,
  aggregate = TRUE,
  returnFull = FALSE,
  parameters = list()
)

Arguments

beta

full marginal association estimates, either a string or a matrix of dimension number of SNPs x number of phenotypes. If beta is "metabolites", the metabolites data is used; if beta is "biobank", the UK biobank data is used. If beta is a matrix, each row should stand for a SNP, each column should stand for a phenotype, and the value should be the marginal association estimate of the corresponding SNP, phenotype pair. SNPs should be ranked in decreasing order of their relevance to the set of phenotypes. The top p rows will be used as signal SNPs and the last p0 rows will be used as noise SNPs.

p

the number of signal SNPs.

p0

the number of noise SNPs.

r

the number of eigen-vectors preserved in the truncated eigen-decomposition.

envr.subtract

a logical value. If TRUE, environmental effects are estimated using noise SNPs and subtracted from genetic effects in signal SNPs. Default is TRUE.

sprs.transform

a logical value. If TRUE, estimated eigen-vectors are linearly transformed to be sparser using varimax or promax from factor analysis. Hyperparameters for varimax and promax can be provided to parameters. Default is TRUE.

aggregate

a logical value. If TRUE, bootstrap aggregation is applied to stabilize the method. Hyperparameters for bootstrap aggregation can be provided to parameters. Default is TRUE.

returnFull

whether to return UHatList and VHatList. TODO!!!

parameters

a list of hyperparameters.

  • sprs.transform.m: the power of the target used by promax if sprs.transform is TRUE. If sprs.transform.m is one, varimax is used. If sprs.transform.m is larger than one, promax is used with sprs.transform.m. Default is 1.

  • U.prop.zero: proportion of zeros in U's columns. For each column of U, we truncate the bottom U.prop.zero elements ranked by absolute values to zero. Default is 0.8.

  • V.prop.zero: proportion of zeros in V's columns. For each column of V, we truncate the bottom V.prop.zero elements ranked by absolute values to zero. Default is 0.8.

  • aggregate.method: method for aggregation if aggregate is TRUE. If aggregate.method is "bootstrap", SNPs are bootstrapped for aggregation. If aggregate.method is "subsample", SNPs are subsampled without replacement and the subsample size is determined by subsample.p. Default is "bootstrap".

  • n.aggregate: the number of aggregation samples. Default is 100.

  • subsample.p: subsample ratio if aggregate.method is "subsample". Default is 0.8.

  • randomSeed: random seed used in aggregation. Default is NULL.

  • kU: the number of genotypes in each genotype-phenotype cluster without aggregation. Default is the number of signal SNPs divided by 2r.

  • kV: the number of phenotypes in each genotype-phenotype cluster without aggregation. Default is the number of phenotypes divided by 2r.

  • gg.weight: weight of (genotype, genotype) pairs in computing co-appearance. Default is 1.

  • gp.weight: weight of (genotype, phenotype) pairs in computing co-appearance. Default is 1.

  • pp.weight: weight of (phenotype, phenotype) pairs in computing co-appearance. Default is 1.

  • clustering.method: method of clustering signal SNPs and phenotypes. If aggregate is FALSE, clustering.method is ignored and the i-th cluster consists of phenotypes and genotypes with non-zero elements in the i-th column of V and U, respectively. If aggregate is TRUE, clustering.method currently takes the following options: if clustering.method equals "UMAP", we use UMAP to find two-dimensional embeddings of signal SNPs and use kmeans cluster the embeddings; if clustering.method equals "tSNE", we use tSNE to find two-dimensional embeddings of signal SNPs and phenotypes and use kmeans cluster the embeddings; if clustering.method equals "spectral", we use co-appearance as the kernel function and use spectral clustering to cluster signal SNPs and phenotypes. Hyperparameters for clustering can be further provided to parameters. Default is "UMAP".

  • max.coappearance: the upper bound of co-appearance weight. The distance induced by co-appearance is defined as max.coappearance - co-appearance. Default is the larger of 1/r and the maximal co-appearance.

  • tSNE.perplexity: TODO!!!

  • UMAP.n_neighbors: TODO!!!

  • rsnps_results: TODO!!!

  • description: TODO!!!

  • pValue: TODO!!!

  • coappearance.truncate: TODO!!!

X

covariate matrix to predict conditional densities at; each row represents an observation vector.

Value

VHat, UHat


ZijunGao/latentMediator documentation built on April 24, 2022, 12:12 a.m.