Get marginal posteriors for how much every individual phenotype belongs to categories {U,D,I} across each SNP

GetMarginalPosteriors(DataSources, ListSNPs, Models, LogFile)

Arguments

DataSources

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

ListSNPs

A list produced from running bmass containing the SNPs of interest to get marginal posteriors for.

Models

A matrix describing the models being explored (default output from running bmass).

LogFile

A matrix of string outputs for function logging purposes (default output from running bmass).

Value

A list containing three matrices of SNPs x Phenotypes marginal posteriors for each category {U,D,I}; this list is appended to the input ListSNPs as a new object, Marginals (the full returned object is a list containing the input ListSNPs and the input LogFile).

Examples

Phenotypes <- c("bmass_SimulatedData1", "bmass_SimulatedData2") bmassOutput <- bmass(Phenotypes, bmass_SimulatedSigSNPs) bmassOutput[c("PreviousSNPs", "LogFile")] <- GetMarginalPosteriors(Phenotypes, bmassOutput$PreviousSNPs, bmassOutput$Models, bmassOutput$LogFile) bmassOutput$PreviousSNPs$Marginals
#> $pU #> 1_1000 2_3000 #> bmass_SimulatedData1 0 0 #> bmass_SimulatedData2 0 0 #> #> $pD #> 1_1000 2_3000 #> [1,] 1 1 #> [2,] 1 1 #> #> $pI #> 1_1000 2_3000 #> [1,] 7.404466e-157 3.099810e-156 #> [2,] 3.359480e-145 6.197017e-144 #>