Version updates will be tracked and explained here. Major updates & releases will be particularly highlighted.
\dontrun{}
to \donttest{}
in .Rd filesDESCRIPTION
sample()
Roxgyen2
& devtools::check()
tests/testthat/test-BasicRFunctionality.R
, test-ResultsFollowupAnalysisAndPlotting.R
, test-Stephens2013PLoSONE.globallipids.GLCfuncs.R
, and test-Stephens2013PLoSONE.test.funcs.R
Models
output more user-friendly versions
Models
and directed users in main vignette to utilize GetModelPriorMatrix()
for a more interpretable version of ModelPriors
releases
on the github repo#pkgdown
website for the github repoREADME.md
roxygen2
comments & examplesGetModelPriorMatrix()
in ResultsFollowupAnalysisAndPlotting.R
so that SigmaAlphas
is given a default value to begin with and therefore positioned after LogFile
bmass()
with some data already created (ie a merged dataset, a phenotype correlation matrix, and priors)
ZScoresCorMatrix
should have the same phenotype order as DataSources
PassChecksForDataSources.R
additionsCheckMergedDataSources
as an analogue to CheckIndividualDataSources
for when a merged dataset is provided.MergeDataGWASAnnotateAndGetMarginalSNPs.R
) & that A1 part of ExpectedColumnNames
GetModelPriorMatrix()
in the advanced, introductory vignette*.R
fileRoxygen2
comments and the first vignette, and finished creating unit testsdevtools::check()
results and made required editsbmass.R
, Stephens2013PLoSONE.globallipids.GLCfuncs.R
, & Stephens2013PLoSONE.test.funcs.R
bmass.R
changed GWASThreshFlag
from 0/1
to FALSE/TRUE
DetermineAndApplyPriors
in GetResultsFromMarginalSNPsAndFormat.R
GWASThreshFlag
to default as TRUE
ResultsFollowupAnalysisAndPlotting.R
removed a large number of the functions that were potentially more manuscript-specific and likely to become deprecated (most of which were plotting-related)library()
calls to proper use of Imports
in DESCRIPTION
fileGetResultsFromMarginalSNPsAndFormat.R
(ie CHECK_0 -- Prob: Throw an error/fail thing here
)bmass.R
changed PrintLogStatements
to PrintProgress
bmass.R
removed the loadings of library(ggplot2)
and library(reshape2)
bmass.R
removed the commented out ExploreBestModelsUsingPosteriors()
bmass.R
& main bmass()
call added "A1"
to ExpectedColumnNames
Models
and ModelPriors
outputs to more user-friendly versions
Models
and possibly condense ModelPriors
across all the SigmaAlphasbmass()
with some data already created (ie a merged dataset, a phenotype correlation matrix, and priors)
ZScoresCorMatrix
should have the same phenotype order as DataSources
test-ResultsFollowupAnalysisAndPlotting.R
, particularly evaluate issues with GetTopModelsPerSNPViaPosteriors
test-Stephens2013PLoSONE.globallipids.GLCfuncs.R
and test-Stephens2013PLoSONE.test.funcs.R
merge()
unit tests in tests/testthat/test-BasicRFunctionality.R
CheckMergedDataSources
as an analogue to CheckIndividualDataSources
for when a merged dataset is provided.PassChecksForDataSources.R
additions
Marker
column, input MergeDataSources
file, etc… as wellMergeDataGWASAnnotateAndGetMarginalSNPs.R
) & that A1 part of ExpectedColumnNames
write(...stderr())
is functioning in bmass.R
(since it seems like that might not be occuring like I was expecting it to?)ResultsFollowupAnalysisAndPlotting.R
(eg GetModelPriorMatrix
, GetTopModelsPerSNPViaPosteriors
, ``, etc…)GWASThreshFlag
& GWASThreshValue
functionalityMergeDataSources()
from AnnotateMergedDataWithGWASSNPs()
in main bmass()
call since the two parts take very different times, ie former is longer than the latter.AnnotateDataWithGWASSNPs
to a quicker version where the loop is over the GWAS SNPs and not the merged dataset; taking advantage of in-line conditional statements as well for row selection.PrintMergedData
to indicate whether bmassOutput$MergedDataSources
should be included as part of the output and not made NULL
. This would be for whether a user wants to save a copy of MergedDataSources
and reuse it for later runs.bmass()
input variable ZScoresCorMatrix
that allows users to manually use a specified phenotype correlation matrix.DetermineAndApplyPriors
to output PreviousSNPs$logBFs
in the sections when ProvidedPriors
is not NULL
and when UseFlatPriors
is TRUE
.Marker
column as an expectation for input files in lieu of the ChrBP
column I constructed. If ChrBP
is desired to be used as marker names, it can be created by users before submitting the files to bmass()
.GWASsnps
not only by input GWASsnps
file but also by a GWAS p-value threshold (via GWASThreshFlag
& GWASThreshValue
)PreviousSNPs
sections in GetResultsFromMarginalSNPsAndFormat.R
(both DetermineAndApplyPriors
and FinalizeAndFormatResults
) with ...if (!is.null(GWASsnps)) {...
encapsulation as neededwrite(..., stderr())
statements to mimic calls to LogFile1
to be produced as bmass()
runs, eg giving user a live look into how/where the script is proceeding. These statements are a bit more broad/higher-level than the LogFile1
calls themselves. Also created PrintLogStatements
(default FALSE
) to turn this functionality on/off.MergeDataSources
, added in section post-merge that checks SNPs still have correct MAF (eg <= .5).
CheckIndividualDataSources
section.
CheckDataSourceMAFIsMAF
and CheckDataSourceMAFFixed
functions.bmass.devlog.vs1.txt
to bmass.devlog.vs1.md
.GetSumAcrossSigmaAlphas_withPriors
.$
from atomic vector style calling in AnnotateDataWithGWASSNPs
after move away from apply
function.logBF
to logBFs
.ProvidedPriors
in CheckIndividualDataSources
to expect 3 ^ (length(DataSources) * length(SigmaAlphas)), not 3 ^ length(DataSources).bmass.R
changed if (is.null(PrintMergedData)) {
to if (PrintMergedData == FALSE) {
, and changed default value of PrintMergedData
from NULL
to FALSE
.posteriorprob
so that prior
in apply(prior * 10^lbf,2,normalize)
now specifies the proper matrix dimensions rather than assuming, given proper length, prior will be multiplied along lbf filling column-wise first (which it does by default).MergedDataSources
as one of the return values of ProcessMergedAndAnnotatedDataSources
in MergeDataGWASAnnotateAndGetMarginalSNPs.R
SigmaAlphas
as an input to GetModelPriorMatrix
in ResultsFollowupAnalysisAndPlotting.R
ZScoreHitFlag1
cutoff by including 2*pnorm...
if (nrow(SummaryOfTopModels) > 1) {...
to GetTopModelsPerSNPViaPosteriors
in ResultsFollowupAnalysisAndPlotting.R
because (apparently) reordering a single-row matrix in the way that I’m doing it messes up its classification as a matrix; after this command, and loss of matrix class, the following colnames()
command throws an error. This does not occur when there are more than one row and an actualy ‘re-ordering’ occurs (presumably).CheckMergedDataSources
as an analogue to CheckIndividualDataSources
for when a merged dataset is provided.PassChecksForDataSources.R
additions
Marker
column, input MergeDataSources
file, etc… as wellExpectedColumnNames
testthat
PrepareData.R
to better designated .R filesNewHits
to NewSNPs
NewSNPs
creation section to after creation of logBFs
and PosteriorProbabilities
matrices from MarginalHits; moved NewHits <- NULL
initialization section of entire codeLogFile1
to LogFile
ProvidedPriors
to be the first option in the if/elseif/else block that also checks is.null(GWASsnps)...
, etc…testthat
, including for basic R functionality, PassChecksForDataSources.R
, andGWASsnps_AnnotateWindow
MarginalHits
to MarginalSNPs
, including in variable names, eg PruneMarginalHits
and PruneMarginalHits_bpWindow
GetLogBFsFromData
into GetLogBFsFromData
and DetermineAndApplyPriors
GetResultsFromMarginalSNPs.R
to GetResultsFromMarginalSNPsAndFormat.R
, moved FinalizeAndFormatResults()
back to GetResultsFromMarginalSNPsAndFormat.R
, and removed FormatAndPrepareResults.R
ExploreBestModelsUsingPosteriors
to put code chunks dealing with posteriors and related analyses such as BestClass
FollowupResultsAnalysisFormattingAndPlotting.R
to ResultsFollowupAnalysisAndPlotting.R
ExploreBestModelsUsingPosteriors
into ResultsFollowupAnalysisAndPlotting.R
TestData1.txt
, TestData2.txt
, and TestSigSNPs.txt
to bmass_TestData1.txt
, bmass_TestData2.txt
, and bmass_TestSigSNPs.txt
CheckCharacterFormat
to CheckCharacterClass
CheckDataSourceDirectionColumn
, moving from a for loop to use of ...if (length(...[...!= "+" & ... != "-"]) > 0 )...
LogFile
to bmassOutput$LogFile
in main bmass.R filebmassOutput
as a way to hold temp variables since can output and assign multiple variables via the list structure and self-made functions. Eg cannot do c(var1, var2) <- function(input1)
, but can do list1[c("var1", "var2")] <- function(input1)
assuming function outputs a list with two entriespaste(..., collapse=" ")
at end of stop()
calls that had DataSources[!DataSources...]
-type error messages
stop()
seems to already have some automatic paste()
-type calls? Eg how it can incorporate my call to paste()
at the end without any additional specificationsLogBF
to logBF
in all instances except for function name GetLogBFsFromData
if (!is.null(bmassSeedValue)) {...
section to within the else{...}
portion of the if (!is.null(ProvidedPriors)) {...
blockPriors_Used
to ModelPriors_Used
GetSumAcrossSigmaAlphas_withPriors
changed ModelPriors
to ModelPriors_Matrix
GetSumAcrossSigmaAlphas_withPriors
in FinalizeAndFormatResults
, including ...matrix(...nrow=length(ModelPriors)...)...
to make the number of rows explicitbmassOutput
to include the list()
structure of MaringalSNPs
, NewSNPs
, and PreviousSNPs
bmassOutput
: NewSNPs
, NewSNPs$SNPs
, NewSNPs$logBFs
, NewSNPs$Posteriors
bmassOutput
variables and associated lists at beginning of functionSNPMarginalpValThreshold
to SNPMarginalUnivariateThreshold
and SNPMarginalMultivariateThreshold
PosteriorProbabilities
to Posteriors
MarginalSNPs
, NewSNPs
, and PreviousSNPs
setup with list()
formatting
PreviousSNPs
from GWAShits
BestModel_Posterior
to PreviousSNPs
mostly has a reminder/placeholder for the time being to expand on it later for both NewSNPs
and MarginalSNPs
bmassOutput
warranted moving to version 0.1.0
BestModel
as a variable for every SNP? Include posterior as well as the model itself?ModelMatrix
, AllBut1Assoc
, and MarginalPosteriors
into this area?bmassOutput
variableis.null(GWASsnps)
& else
subsectionsPruneMarginalHits
flaglogBFs
and PosteriorProbabilities
output matrices
GetSumAcrossSigmaAlphas_withPriors()
NewSNPs
output variable, in conjunction with GWASlogBFMinThreshold
bmassOutput
bmassOutput
:
MarginalSNPs
ModelPriors
logBFs
PosteriorProbabilities
GWASlogBFMinThreshold
NewSNPs
bmassOutput
bmassOutput
associated variables
bmassOutput
results