R/ResultsFollowupAnalysisAndPlotting.R
GetTopModelsPerSNPViaPosteriors.Rd
Get a summary of the top models per SNP across all multivariate {U,D,I} combinations based on posterior probabilities.
GetTopModelsPerSNPViaPosteriors(DataSources, ListSNPs, ModelPriorMatrix, LogFile)
DataSources | A string indicating the variable names of the input datafiles and phenotypes. |
---|---|
ListSNPs | A list produced from running |
ModelPriorMatrix | A matrix detailing the models being
explored and their associated priors (obtained by running
|
LogFile | A matrix of string outputs for function logging
purposes (default output from running |
A matrix containing each model that was a SNP's top model
at least once, along with related information; this matrix is
appended to the input ListSNPs as a new object, TopModels
(the full returned object is a list containing the input ListSNPs and
the input LogFile).
Phenotypes <- c("bmass_SimulatedData1", "bmass_SimulatedData2") bmassOutput <- bmass(Phenotypes, bmass_SimulatedSigSNPs) bmassOutput[c("ModelPriorMatrix", "LogFile")] <- GetModelPriorMatrix(Phenotypes, bmassOutput$Models, bmassOutput$ModelPriors, bmassOutput$LogFile) bmassOutput[c("PreviousSNPs", "LogFile")] <- GetTopModelsPerSNPViaPosteriors(Phenotypes, bmassOutput$PreviousSNPs, bmassOutput$ModelPriorMatrix, bmassOutput$LogFile) head(bmassOutput$PreviousSNPs$TopModels)#> bmass_SimulatedData1_bmass_SimulatedData2 n MeanPosterior OriginalPrior #> [1,] "1_1" "2" "1" "1"