Skip to contents

The function runs MVR models for a set of transcripts and outputs the best model

Usage

compute_isotwas(
  X,
  Y,
  gene_exp = NULL,
  Y.rep,
  R,
  id,
  omega_est = "replicates",
  omega_nlambda = 10,
  method = c("mrce_lasso", "curds_whey", "multi_enet", "joinet", "spls", "finemap",
    "univariate"),
  predict_nlambda = 50,
  family = "gaussian",
  scale = F,
  alpha = 0.5,
  nfolds = 5,
  verbose = F,
  par = F,
  n.cores = NULL,
  tx_names = NULL,
  seed = NULL,
  run_all = T,
  return_all = F,
  tol.in = 0.001,
  maxit.in = 1000,
  coverage = 0.9
)

Arguments

X

matrix, design matrix of SNP dosages

Y

matrix, matrix of G isoform expression across columns

gene_exp

vector, vector of total gene expression

Y.rep

matrix, matrix of G isoform expression with replicates

R

int, number of replicates

id

vector, vector of sample ids showing rep to id

omega_est

character, 'replicates' or 'mean' to use Y.rep or Y

omega_nlambda

int, number of omegas to generate

method

character, vector of methods to use

predict_nlambda

int, number of lambdas in MRCE

family

character, glmnet family

scale

logical, T/F to scale Y by Omega

alpha

numeric, elastic net mixing parameter

nfolds

int, number of CV folds

verbose

logical

par

logical, uses mclapply to parallelize model fit

n.cores

int, number of parallel cores

tx_names

vector, character vector of tx names - order of columns of Y

seed

int, random seed

run_all

logical, run all methods

return_all

logical, return R2 for all models?

tol.in

numeric, tolerance for objective difference

maxit.in

int, maximum number of interactions

coverage

numeric, coverage of cred set for finemap and regress

Value

optimal isoTWAS model