If you have prepared mash input using the bigsnp2mashr function or the gapit2mashr R package, use this function on the output to run mash as recommended by vignettes in the mashr package.

mash_standard_run(
  path = ".",
  list_input = NA,
  numSNPs = NA,
  suffix = "",
  saveoutput = FALSE,
  U_ed = NA,
  U_hyp = NA
)

Arguments

path

File path to the rds files saved from gapit2mashr, or bigsnpr2mashr, as a character string. Defaults to the working directory.

list_input

A list containing five data frames: the SNPs selected, the B_hat and S_hat matrices for the strong SNP set and for a random SNP set chosen in gapit2mashr.

numSNPs

The number of most significant SNPs selected from each GWAS. Ideally this will give 1 million or fewer total cells in the resultant mash dataframes. Defaults to 1000.

suffix

Character. Optional. Should be the unique suffix used to save pvdiv_bigsnp2mashr output as RDS files, if it was used.

saveoutput

Logical. Should the function's output also be saved to RDS files? Default is FALSE.

U_ed

An optional list of data-driven covariance matrices, or a character vector containing the complete path to a .rds containing these matrices.

U_hyp

An optional list of covariance matrices specified by the user.

Value

A mash result, manipulable using functions in mashr and by mash_plot functions in the switchgrassGWAS package.

Note

This is a convenience function for users who have prepared their data using gapit2mashr or bigsnp2mashr. If you have not used these functions to make your mash input, you should not use this function - instead, follow the recommendations of the vignettes in the mashr package itself.