Iteratively run susie and estimate parameters - RSS version

susieI_rss(
  zdf,
  regionlist,
  ld_exprvarfs,
  ld_exprfs = NULL,
  ld_pgenfs = NULL,
  ld_Rfs = NULL,
  niter = 20,
  L = 1,
  z_ld_weight = 0,
  group_prior = NULL,
  group_prior_var = NULL,
  estimate_group_prior = T,
  estimate_group_prior_var = T,
  use_null_weight = T,
  coverage = 0.95,
  ncore = 1,
  outputdir = getwd(),
  outname = NULL,
  report_parameters = T
)

Arguments

zdf

A data frame with three columns: "id", "z", "type". This data frame gives the the z scores for SNPs and genes, denoted in "type". The "type" column can also be use to specify multiple sets of weights

regionlist

a list object indexing regions, variants and genes. The output of index_regions

ld_exprvarfs

A character vector of `.exprvar` files. One file for one chromosome, in the order of 1 to 22. Therefore, the length of this vector needs to be 22. `.exprvar` files are tab delimited text files, with columns:

chrom

chromosome number, numeric

p0

gene boundary position, the smaller value

p1

gene boundary position, the larger value

id

gene id

Its rows should be in the same order as the columns for corresponding `.expr` files.

ld_pgenfs

A character vector of .pgen or .bed files. One file for one chromosome, in the order of 1 to 22. Therefore, the length of this vector needs to be 22. If .pgen files are given, then .pvar and .psam are assumed to present in the same directory. If .bed files are given, then .bim and .fam files are assumed to present in the same directory.

ld_Rfs

a vector of paths to the LD matrices

niter

the number of iterations of the E-M algorithm to perform

L

the number of effects for susie

z_ld_weight

the z_ld_weight parameter for susie_rss

group_prior

a vector of two prior inclusion probabilities for SNPs and genes. This is ignored if estimate_group_prior = T

group_prior_var

a vector of two prior variances for SNPs and gene effects. This is ignored if estimate_group_prior_var = T

estimate_group_prior

TRUE/FALSE. If TRUE, the prior inclusion probabilities for SNPs and genes are estimated using the data. If FALSE, group_prior must be specified

estimate_group_prior_var

TRUE/FALSE. If TRUE, the prior variances for SNPs and genes are estimated using the data. If FALSE, group_prior_var must be specified

use_null_weight

TRUE/FALSE. If TRUE, allow for a probability of no effect in susie

coverage

A number between 0 and 1 specifying the “coverage” of the estimated confidence sets

ncore

The number of cores used to parallelize susie over regions

outputdir

a string, the directory to store output

outname

a string, the output name

report_parameters

TRUE/FALSE. If TRUE, estimated parameters are reported at the end of iteration