Run bmass on a set of phenotypes that each have univariate GWAS statistics on the same set of SNPs

bmass(DataSources, GWASsnps = NULL,
  SNPMarginalUnivariateThreshold = 1e-06,
  SNPMarginalMultivariateThreshold = 1e-06, GWASThreshFlag = TRUE,
  GWASThreshValue = 5e-08, NminThreshold = 0,
  PrintMergedData = FALSE, PrintProgress = FALSE, ...)

Arguments

DataSources

A string indicating the variable names of the input datafiles and phenotypes. No default value.

GWASsnps

A data.table containing rows of SNPs that were univariate genome-wide significant in the phenotypes being used for analysis; GWASsnps input file should have two columns, one for chromosome and another for basepair position (with column headers of Chr and BP). No default value.

SNPMarginalUnivariateThreshold

A numerical value indicating the univariate p-value threshold to use when collecting marginally significant SNPs for final bmass analysis. Default is 1e-6.

SNPMarginalMultivariateThreshold

A numerical value indicating the basic multivariate p-value threshold to use when collecting marginally significant SNPs for final bmass analysis. Default is 1e-6.

GWASThreshFlag

A logical TRUE/FALSE flag that indicates whether to threshold input GWASsnps list by a univariate GWAS p-value or not (eg the input GWASsnps list contains variants that are significant from discovery + replication data, but the input summary statistics are just from the discovery cohort). Default is TRUE.

GWASThreshValue

A numerical value indicating the univariate p-value threshold to use in conjunction with the GWASThreshFlag. Default is 5e-8.

NminThreshold

A numerical value that indicates a sample size threshold to use where SNPs below which are removed. Default is 0.

PrintMergedData

A logical TRUE/FALSE flag that indicates whether the intermediary 'merged datafile' should be included in the final bmass output; this file combines all the phenotypes for every SNP provided just prior to thresholding for marginally significant SNPs. Default is FALSE.

PrintProgress

A logical TRUE/FALSE flag that indicates whether progress statements should be printed to stderr during the course of running bmass or not. Default is FALSE.

...

Additional optional arguments.

Value

A list containing model, SNP, and posterior information for both the previously significant univariate SNPs (PreviousSNPs) and the newly significant multivariate SNPs (NewSNPs). For a full breakdown of the bmass output list structure, please see the associated vignettes.

Other Examples

bmass(c("HDL","LDL","TG","TC"), GWASsnps, NminThreshold = 50000) bmass(c("HDL","LDL","TG","TC"), GWASsnps, GWASThreshValue = 1e-8, NminThreshold = 50000, PrintProgress = TRUE) bmass(c("HDL", "LDL", "TG", "TC"), GWASsnps, GWASThreshFlag = FALSE, SNPMarginalUnivariateThreshold = 1e-4, SNPMarginalMultivariateThreshold = 1e-4, PrintMergedData = TRUE) bmassOutput <- bmass(c("HDL","LDL","TG","TC"), GWASsnps, NminThreshold = 50000)

Examples

Phenotypes <- c("bmass_SimulatedData1", "bmass_SimulatedData2") bmassOutput <- bmass(Phenotypes, bmass_SimulatedSigSNPs) summary(bmassOutput)
#> Length Class Mode #> MarginalSNPs 3 -none- list #> PreviousSNPs 4 -none- list #> NewSNPs 3 -none- list #> LogFile 19 -none- character #> ZScoresCorMatrix 4 -none- numeric #> Models 18 -none- numeric #> ModelPriors 126 -none- numeric #> GWASlogBFMinThreshold 1 -none- numeric
bmassOutput$NewSNPs$SNPs
#> ChrBP Chr BP Marker MAF A1 bmass_SimulatedData1_A2 #> 9 4_7000 4 7000 rs8 0.15 G C #> bmass_SimulatedData1_Direction bmass_SimulatedData1_pValue #> 9 + 7e-08 #> bmass_SimulatedData1_N bmass_SimulatedData1_ZScore #> 9 2514 5.391171 #> bmass_SimulatedData2_Direction bmass_SimulatedData2_pValue #> 9 - 6e-08 #> bmass_SimulatedData2_N bmass_SimulatedData2_ZScore GWASannot mvstat #> 9 2514 -5.418801 0 145.0667 #> mvstat_log10pVal unistat unistat_log10pVal Nmin logBFWeightedAvg #> 9 31.50084 29.36341 7.221849 2514 29.107