Title: | Optimal Transport-Based Kernel Regression |
---|---|
Description: | Perform optimal transport on somatic point mutations and kernel regression hypothesis testing by integrating pathway level similarities at the gene level (Little et al. (2023) <doi:10.1111/biom.13769>). The software implements balanced and unbalanced optimal transport and omnibus tests with 'C++' across a set of tumor samples and allows for multi-threading to decrease computational runtime. |
Authors: | Paul Little [aut, cre] |
Maintainer: | Paul Little <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.0.0 |
Built: | 2025-03-06 18:32:22 UTC |
Source: | CRAN |
kernTEST
kernTEST( RESI = NULL, KK, YY = NULL, XX = NULL, OMNI, nPERMS = 1e+05, ncores = 1 )
kernTEST( RESI = NULL, KK, YY = NULL, XX = NULL, OMNI, nPERMS = 1e+05, ncores = 1 )
RESI |
A numeric vector of null model residuals
|
KK |
An array containing double-centered positive semi-definite
kernel matrices. Refer to |
YY |
A numeric vector of continuous outcomes to be fitted in a linear model. Defaults to NULL for survival model. |
XX |
A numeric data matrix with first column for intercept, a column of ones. |
OMNI |
A matrix of zeros and ones. Each column corresponds to a
distance matrix while each row corresponds to an omnibus test. Set
|
nPERMS |
A positive integer to specify the number of permutation-based p-value calculation |
ncores |
A positive integer for the number of cores/threads to reduce computational runtime when running for loops |
A R list of p-values and omnibus p-values.
kOT_sim_AGG
kOT_sim_AGG(work_dir)
kOT_sim_AGG(work_dir)
work_dir |
A full path to create "sim_ROKET" and subdirectories |
Nothing. Png files are created within the simulation ROKET directory.
Generates simulation files
kOT_sim_make(work_dir, NN = 200, nGENE = 500, nPATH = 25, RR = 200)
kOT_sim_make(work_dir, NN = 200, nGENE = 500, nPATH = 25, RR = 200)
work_dir |
A full path to create "sim_ROKET" and subdirectories |
NN |
A positive integer for sample size |
nGENE |
A positive integer for number of genes to simulate |
nPATH |
A positive integer for number of pathways to simulate |
RR |
A positive integer for number of replicates to simulate |
Nothing. Rds files are created within the simulation ROKET directory.
kOT_sim_OT
kOT_sim_OT(work_dir, NN, nGENE, nPATH, SCEN, ncores = 1)
kOT_sim_OT(work_dir, NN, nGENE, nPATH, SCEN, ncores = 1)
work_dir |
A full path to create "sim_ROKET" and subdirectories |
NN |
A positive integer for sample size |
nGENE |
A positive integer for number of genes to simulate |
nPATH |
A positive integer for number of pathways to simulate |
SCEN |
An integer taking values 1, 2, 3, or 4 |
ncores |
A positive integer specifying the number of cores/threads to use for optimal transport calculations |
Nothing. Rds files are created within the simulation ROKET directory.
kOT_sim_REG
kOT_sim_REG(work_dir, NN, nGENE, nPATH, SCEN, rr)
kOT_sim_REG(work_dir, NN, nGENE, nPATH, SCEN, rr)
work_dir |
A full path to create "sim_ROKET" and subdirectories |
NN |
A positive integer for sample size |
nGENE |
A positive integer for number of genes to simulate |
nPATH |
A positive integer for number of pathways to simulate |
SCEN |
An integer taking values 1, 2, 3, or 4 |
rr |
A positive integer indexing a replicate |
Nothing. A rds file is created within the simulation ROKET directory.
Runs balanced or unbalanced optimal transport on two input vectors
run_myOT( XX, YY, COST, EPS, LAMBDA1, LAMBDA2 = NULL, balance = FALSE, conv = 1e-05, max_iter = 3000, verbose = TRUE, show_iter = 50 )
run_myOT( XX, YY, COST, EPS, LAMBDA1, LAMBDA2 = NULL, balance = FALSE, conv = 1e-05, max_iter = 3000, verbose = TRUE, show_iter = 50 )
XX |
A numeric vector of positive masses |
YY |
A numeric vector of positive masses |
COST |
A numeric matrix of non-negative values
representing the costs to transport masses between
features of |
EPS |
A positive numeric value representing the tuning parameter for entropic regularization. |
LAMBDA1 |
A non-negative numeric value representing
the tuning parameter penalizing the distance between |
LAMBDA2 |
A non-negative numeric value representing
the tuning parameter penalizing the distance between |
balance |
Boolean set to |
conv |
A positive numeric value to determine
algorithmic convergence. The default value is |
max_iter |
A positive integer denoting the maximum iterations to run the algorithm. |
verbose |
Boolean value to display verbose function output. |
show_iter |
A positive integer to display iteration details
at multiples of |
A R list containing the optimal transport matrix and associated distance metric.
run_myOTs
run_myOTs( ZZ, COST, EPS, LAMBDA1, LAMBDA2 = NULL, balance, conv = 1e-05, max_iter = 3000, ncores = 1, verbose = TRUE, show_iter = 50 )
run_myOTs( ZZ, COST, EPS, LAMBDA1, LAMBDA2 = NULL, balance, conv = 1e-05, max_iter = 3000, ncores = 1, verbose = TRUE, show_iter = 50 )
ZZ |
A numeric matrix of non-negative mass to transport. Rows correspond to features (e.g. genes) and columns correspond to samples or individuals. Each column must have strictly positive mass |
COST |
A numeric square matrix of non-negative values representing the non-negative costs to transport masses between pairs of features |
EPS |
A positive numeric value representing the tuning parameter for entropic regularization. |
LAMBDA1 |
A non-negative numeric value representing
the tuning parameter penalizing the distance between |
LAMBDA2 |
A non-negative numeric value representing
the tuning parameter penalizing the distance between |
balance |
Boolean set to |
conv |
A positive numeric value to determine
algorithmic convergence. The default value is |
max_iter |
A positive integer denoting the maximum iterations to run the algorithm. |
ncores |
A positive integer for the number of cores/threads to reduce computational runtime when running for loops |
verbose |
Boolean value to display verbose function output. |
show_iter |
A positive integer to display iteration details
at multiples of |
A R numeric matrix of pairwise distances.