The function takes in a gene expression model in MOSTWAS form and GWAS summary statistics and carries out the weighted burden Z-test for a trait

addedLastTest(
  wgt,
  snps,
  sumStats,
  snpAnnot = NULL,
  beta,
  se,
  chr,
  pos,
  ref,
  pval,
  R2cutoff,
  locChrom
)

Arguments

wgt

character, name of expression model .RData file

snps

data.frame, reference panel SNPs

sumStats

data frame, GWAS summary statistics

snpAnnot

data.frame, SNP REF/ALT annotations

beta

character, colnames in sumStats that keeps the effect sizes

se

character, colnames in sumStats that keeps the standard errors

chr

character, colnames in sumStats that keeps the chromosome

pos

character, colnames in sumStats that keeps the position

ref

character, colnames in sumStats that keeps the reference allele

R2cutoff

numeric, predictive R2 cutoff

locChrom

character, chromosome of gene of interest

Value

Z-score and P-value of added last test