version 0.1: (2015-04-20)

- Original release

version 0.1.1: (2015-04-21)

- Improved documentation

version 0.1.2: (2015-04-23)

- In 'BASiCS_Sim': change 'sum(phi)==n' by 'all.equal(sum(phi),n)'

version 0.1.3: (2015-05-18)

- 'plotBASiCSDispVsExp': 'log="xy"' argument added
- 'BASiCS_Data': internal checks added (pre-filter of samples and transcripts)
- 'BASiCS_MCMC' c++ code: Rcpp::checkUserInterrupt() added for fast 
user-requested interruption of MCMC sampler
- S4 method 'plot' for 'BASiCS_Chain' signature: argument 'Column' replaced by 
'Gene' and 'Cell'
- Replacement of 'plotBASiCSNormPhi' and 'plotBASiCSNormS' by S4 method 'plot' 
('BASiCS_Summary' signature)
- S4 method 'plot' for 'BASiCS_Summary' signature: does not include plots for 
all model parameters
- S4 method 'plot' for 'BASiCS_Summary' signature: does not include 
scatterplots of gene-specific and cell-specific model parameters (replacing 
'plotBASiCSExpVsDisp')
- 'BASiCS_VarianceDecomp' has been made visible to users (former 
'HiddenVarDecomp' function) and output does now allow gene annotation. 
- 'BASiCS_Filter' function added.
- Vignette has been updated according to the changes above. Instructions for 
installation were added. 
- 'BASiCS_Filter' function added.
- Dependency to R (>= 3.1.0) has been added.

version 0.1.4: (2015-05-21)

- 'BASiCS_Denoise' function added. It produces a table of normalised and 
denoised expression counts (after removing the effect of technical variation). 

version 0.1.5: (2015-05-27)
- Small typo in 'BASiCS_VarThresholdSearchHVG' and 
'BASiCS_VarThresholdSearchLVG' has been fixed. 

version 0.1.6: (2015-06-01)
- Replacement of parameter-specific 'displayChain's functions by a generic 
method displayChainBASiCS
- Replacement of parameter-specific 'displaySummary's functions by a generic 
method displaySummaryBASiCS
- In 'BASiCS_DetectHVG' and 'BASiCS_DetectLVG': constrain added to that 
prob >= 0.5 is required to detect HVG and LVG

version 0.2.0: (2015-06-24)
- New parametrization for mRNA content size factors $\phi_j$ that improves 
mixing of the MCMC algorithm (using adaptive Dirichlet proposals)
- Updated vignette

version 0.2.1: (2015-07-23)
- Argument 'GeneNames' has been added to functions 'BASiCS_VarianceDecomp', 
'BASiCS_DetectHVG', 'BASiCS_DetectLVG' so that users can specify gene labels 
or names that will be used for these functions's output. 

version 0.3.0: (2015-07-31)
- New slot BacthInfo in 'BASiCS_Data' class
- Batch-speficic technical variability parameters are allowed
- 'BASiCS_VarianceDecomp' modified to accommodate batch membership (including 
graphical output)

version 0.3.1: (2015-09-17)
- New slot GeneNames in 'BASiCS_Data' class
- Changes in the constructor `newBASiCS_Data` to allow easier construction of 
`BASiCS_Data` objects
- Minor changes to some functions' output to use the new GeneNames slot of 
'BASiCS_Data' class

version 0.3.2: (2015-10-23)
- Minor changes to the output of `BASiCS_MCMC` function (colnames of the 
elements related to the parameter $\theta$)
- Addition of extra optional parameter `ls.phi0` to `BASiCS_MCMC` function. 
This is helpful on situations where the default value led to slow mixing to 
the chains related to the normalising constants $\phi_j$'s. 

version 0.3.3: (2015-11-05)
- Same method as before but improved performance of C++ code

version 0.3.4: (2015-11-11)
- Fix of example code of 'newBASiCS_Data' function. Thanks to Simon Andrews 
for pointing out this issue.

version 0.3.5: (2015-11-27)
- Optional argument `PriorDelta` added to `BASiCS_MCMC` function, to allow 
optional use of `gamma` or `log-normal` priors for delta. 
- In `BASiCS_MCMC` function, change of default value of `s2.mu` to 0.5. Allows
better shrinkage in situations where a gene has zero counts across all cells.
- In `BASiCS_Data` class. Count matrices where a gene has zero counts across 
all cells are now allowed. However, a warning is returned in such case. 
Only use such matrices when running differential expression results. 

version 0.4.0: (2015-12-21)
- Preliminary functions for differential expression analyses (mean and 
over-dispersion) have been added. 

version 0.4.1: (2016-02-05)
- Fixed bug in vignette (usage of `newBASiCS_Data` function). Same bug has 
been fixed in documentation of class `BASiCS_Data`. 
- Optional argument 'Start' added to `BASiCS_MCMC` function to allow running 
chains with a variety of user-defined starting point. In general, we do not 
advise to use this argument as the default option has been tuned to 
facilitate convergence. 
- Updated documentation of 'BASiCS_DetectHVG' and 'BASiCS_VarianceDecomp' 
function (removing 'GeneNames' argument)
- Updated documentation for 'BASiCS_DV_TestDE' function. 
- Missing @description sections added to several .Rd files. 

version 0.5.0: (2016-03-03)
- Extended package description to include comparisons between pre-specified 
populations of cells
- `BASiCS_DV_Data`, `BASiCS_DV_Chain` and `BASiCS_DV_Summary` classes 
replaced by `BASiCS_D_Data`, `BASiCS_D_Chain` and `BASiCS_D_Summary` 
classes, respectively.
- Slot 'offset' added to `BASiCS_D_Chain` and `BASiCS_D_Summary` classes.
- Slot 'probHPD' added to `BASiCS_D_Summary` class. 
- Creation of `CombineBASiCS_Data` function to combine 2 independent 
`BASiCS_Data` objects into one `BASiCS_D_Data` object.
- Offset value added to the input of `show` method for `BASiCS_D_Chain` 
and `BASiCS_D_Summary` classes. 
- Creation of `CombineBASiCS_Chain` function to combine 2 independent 
`BASiCS_Chain` objects into one `BASiCS_D_Chain` object.
- 'GeneNames' slot added to `BASiCS_Data` class

version 0.5.1: (2016-03-07)
- In function `BASiCS_D_TestDE`. Probability threshold set to 0.95 
when EFDR fails to calibrate (simulations under the null)

version 0.5.2: (2016-03-07)
- In function `BASiCS_D_TestDE`. Probability threshold set to 0.90 
when EFDR fails to calibrate (simulations under the null)
- Fixed version number in description file.

version 0.5.3: (2016-03-09)
- Slots `BatchInfoTest` and `BatchInfoRef` added to `BASiCS_D_Data` class.
- `newBASiCS_D_Data` function modified to incorporate `BatchInfoTest` 
and `BatchInfoRef` slots.
- `CombineBASiCS_Data` function modified to incorporate `BatchInfoTest` 
and `BatchInfoRef` slots.
- `show` method for `BASiCS_D_Data` class modified to incorporate 
`BatchInfoTest` and `BatchInfoRef` slots.
- `GeneNames` argument missing in `makeExampleBASiCS_D_Data` has been added. 
- Slots `thetaTest` and `thetaRef` of `BASiCS_D_Chain` objects modified 
to accept matrices (necessary to allow multiple batches).

version 0.5.4: (2016-04-15)
- Minor fixes to the documentation files
- Argument `GenesSelect` was added to function `BASiCS_D_TestDE` to allow 
user-defined lists of genes to be included in the comparison between cell types. 

version 0.5.5: (2016-04-18)
- Small fix when checking the validity of a `BASiCS_D_Data` object. 
Thanks to Nils Eling. 
- Fixed issue with documentation files. 

version 0.5.6: (2016-04-19)
- Fixed message in `BASiCS_D_Test` function. This does not affect 
functionality. Only the message that is printed in the console.

version 0.5.7: (2016-04-27)
- Welcome message added

version 0.5.8: (2016-05-18) 
- After profiling of c++ functions, minor edits to improve memory usage. 
These do not affect user interface
- Small change in funtion 'makeExampleBASiCS_Data' to avoid 'NOTICE' message

version 0.5.9: (2016-05-19)
- Dependency to 'scran' added
- 'HiddenBASiCS_MCMC_Start' modified to use 'scran' estimates as starting 
values. This allows faster convergence.
- Updated 'README.md' file to build and access vignette during installation 

version 0.5.10: (2016-05-20)
- Updated bug in 'HiddenBASiCS_MCMC_Start' function (thanks to Joanna 
Dreux for noticing this issue)

version 0.5.11: (2016-05-24)
- 'importMethodsFrom(scran, computeSumFactors)' added to NAMESPACE

version 0.6.1: (2016-05-25)
- Argument 'WithSpikes' added to 'makeExampleBASiCS_Data', generating 
an example data with no spikes
- Modifications to validity checks of 'BASiCS_Data' class to allow no 
spikes case (SpikeInput = 1)
- 'show' methods for 'BASiCS_Data' class modified to deal with no spike case
- Checks for 'BASiCS_Data' object modified to require: either spikes or batches
- 'BASiCS_MCMC' modified for no spikes case (if/else statement only, 
not yet functional)
- 'HiddenBASiCS_MCMC_Start' modified for no spikes case
- Function 'HiddenBASiCS_MCMCcppNoSpikes' added. Update for 'phi' is pending. 
- Small vignette file for no spikes case added

version 0.6.2: (2016-05-31)
- Template for 'phiUpdateNoSpikes' has been added. 
- Minor change in 'phiUpdate' for all 'HiddenBASiCS_MCMCcpp' functions 
(to avoid re-writing phi0)
- Faster adaptation steps for 'HiddenBASiCS_MCMCcppBatch' 
'HiddenBASiCS_MCMCcppNoSpikes'
- 'HiddenBASiCS_MCMCcppNoSpikes' completed for testing stage 
(not ready for users)

version 0.6.3: (2016-05-31)
- Small update in wellcome message. 

version 0.6.4: (2016-06-01)
- Safety checks added to 'phiUpdateNoSpikes' 

version 0.6.5: (2016-06-8)
- Modified identifiability constrains for no spikes case.

version 0.6.6: (2016-07-27)
- First working version of no spikes case (constrained mu's)

version 0.6.7: (2016-07-28)
- Minor changes in the validity checks of 'BASiCS_D_Data' objects

version 0.6.8: (2016-07-28)
- Sequential updates for mu in MCMC (no spikes case only)

version 0.6.9: (2016-08-01)
- Dirichlet-based proposals for mu in MCMC (no spikes case only)

version 0.7.0: (2016-08-02)
- Sequential updates for mu in MCMC (no spikes case only)

version 0.7.1: (2016-08-05)
- Random reference in sequential updates for mu (no spikes case only)

version 0.7.2: (2016-08-05)
- Same as v 0.7.2 but more efficient

version 0.7.3: (2016-08-08)
- Reference set to be the gene closest to the average (no spikes case only)

version 0.7.4: (2016-08-09)
- Modified constrain to include 'expressed' genes only (no spikes case only)

version 0.7.5: (2016-08-10)
- Modified constrain to include 'expressed' genes only (no spikes case only)

version 0.7.6: (2016-08-11)
- As v 0.7.5 but with extra argument for constrain limit (no spikes case only)

version 0.7.7: (2016-08-12)
- ConstrainType = 3 implemented (no spikes case only)

version 0.7.8: (2016-08-15)
- ConstrainType = 4 implemented (no spikes case only)

version 0.7.9: (2016-10-31)
- C++ code cleaned regarding parameter updates (no spikes case)
- Updated email in description file and welcome message
- 'BASiCS_MCMC' modified so that "log-normal" is the default value 
for PriorDelta

version 0.7.10: (2016-10-31)
- Minor changes in 'BASiCS_MCMC' to have more meaningful variable names
- Minor changes in 'BASiCS_MCMC' to make no-spikes case functional 

version 0.7.11: (2016-10-31)
- Comments added to clarify no spikes case in 'BASiCS_MCMC' function. 

version 0.7.12: (2016-11-01)
- Change in defaul value of 'PriorDelta' (v 0.7.9) has been reverted 
for reproducibility issues. Message added to the start of the function 
so that users are aware of making the change. 
- PriorDelta = 'gamma' is now allowed for no spikes case

version 0.7.13: (2016-11-02)
- Typo on the arguments of 'HiddenBASiCS_MCMCcppNoSpikes' function has been 
fixed ('Constrain' instead of 'ConstrainType')
- Validity check '(y(i) > 1e-3)' moved later on in 'deltaUpdateNoSpikes' to 
avoid breaking the code when it is not really necessary!

version 0.7.14: (2016-11-03)
- Debug message removed from 'muUpdateNoSpikes' function. 

version 0.7.15: (2016-11-07)
- ConstrainType = 1 (untrimmed) re-introduced for no-spike case (illustration 
purposes only)
- RefGene removed from AR report
- Added console report of RefGene choice

version 0.7.16: (2016-11-07)
- ConstrainType = 3 (stochastic ref) re-introduced for no-spikes case

version 0.7.17: (2016-11-07)
- Error fixed in the definition of RefGenes

version 0.7.18: (2016-11-08)
- Function 'BASiCS_LoadChain' added to simplify the loading of 
pre-computed chains
- Imports from 'testthat' library added to NAMESPACE file
- Small changes in 'BASiCS_D' classes to allow offset

version 0.7.19: (2016-11-14)
- RefGene information to be stored as .txt file

version 0.7.20: (2016-11-14)
- 'newBASiCS_Data' function modified to allow no spikes case

version 0.7.21: (2016-11-15)
- 'ConstrainType' = 4, 5 added (exclude genes with capture in less than 
'ConstrainLimit'100% of the cells)

version 0.7.22: (2016-11-16)
- Fixed bug for 'ConstrainType' = 5 (affects no spike case only)

version 0.7.23: (2016-11-21)
- Cleaning-up of identifiability constrain options for the no spike case

version 0.7.24: (2016-11-23)
- Median changed to mean when calculating identifiability constrain for 
the no spike case

version 0.7.25: (2017-01-11)
- Fixed typo in vignette file (thanks to Dmitriy Zhukov for pointing this out)

version 0.7.26: (2017-02-09)
- Update of 'BASiCS_Filter' function to include a 'BatchInfo' argument 
(thanks to Dmitriy Zhukov for suggesting this)
- Vignette file updated accordingly.
- Update of 'newBASiCS_Data' function to prevent issues related to 
unused levels when the 'BatchInfo' argument is set as a 'factor' (thanks 
to Kevin Rue-Albrecht for pointing out this issue)

version 0.7.27: (2017-05-09)
- Bug fixed in 'BASiCS_Filter' function to stop the code crashing when there 
are genes with zero counts across all cells.

version 0.7.28: (2017-07-21)
- Fixed dependency to 'data.table' to prevent errors in 'BASiCS_LoadChain' 
function(thanks to Yongchao Ge for pointing out this issue). This change 
affects the DESCRIPTION file as well as the 'BASiCS_LoadChain' function. 

version 0.7.29: (2017-07-24)
- 'BASiCS:::HiddenBASiCS_MCMC_Start' function modified regarding the definition 
of starting values for mu (to avoid adding +1 when it's not necessary)
-  'BASiCS:::HiddenBASiCS_MCMC_Start' modified to have better starting values 
for delta (this is based on eq 2 from Vallejos et al, 2016)

version 0.7.30: (2017-07-26)
- Typo fixed in 'BASiCS:::HiddenBASiCS_MCMC_Start' function (thanks to 
@bdulken for pointing out this issue)

version 1.0.0: (2017-07-29)
- Initial big merge with @nilseling changes (in preparation for 
Bioconductor submission)
- For reference, here is a summary of the changes implemented by @nilseling:
  * Creation of individual .R for each R function (but all 'Hidden' functions 
  are in one file)
  * BASiCS_Data class replaced by SummarizedExperiment class (Bioconductor)
  * Contact email updated to 'cvallejos@@turing.ac.uk'
  * Methods for BASiCS_Data and BASiCS_D_Data objects removed (these classes 
  no longer exist)
  * Adjust newBASiCS_Data function to create a SummarizedExperiment object
  * 'cat' calls replaced by 'message' calls
  * Clean up of BASiCS_D_TestDE function (removed unused args)
  * Clean up of BASiCS_DetectHVG_LVG function (using SummarizedExperiment class)
  * Clean up of BASiCS_MCMC function (using SummarizedExperiment class)
  * Clean up of BASiCS_Sim function (using SummarizedExperiment class; 
  extra arg 'muSpikes')
  * Clean up of BASiCS_DetectHVG_LVG function (using SummarizedExperiment class)
  * Clean up of BASiCS_VarianceDecomp function 
  (using SummarizedExperiment class)
  * Clean up of BASiCS_VarThresholdSearchHVG function 
  (using SummarizedExperiment class)
  * Clean up of BASiCS_DenoisedCounts function 
  (using SummarizedExperiment class)
  * Clean up of BASiCS_DenoisedRates function (using SummarizedExperiment class)
  * Clean up of HiddenBASiCS_MCMC_Start function 
  (using SummarizedExperiment class)
  * Clean up of makeExampleBASiCS_Data function 
  (using SummarizedExperiment class) 
  * Removed methods associated to BASiCS_D_MCMC class (no longer in use)
  * NAMESPACE + Rd files updated accordingly
  * DESCRIPTION file updated accordingly
  * Vignette file updated accordingly
  
version 1.0.1: (2017-07-31)
- Minor changes function-by-function (revision of documentation + minor bugs)
  * newBASiCS_Data : added ref to GB paper + default par value doc + 
  Nils as author
  * BASiCS_Filter : added ref to GB paper + default par value doc 
  * makeExampleBASiCS_Data : added ref to GB paper + default par value doc + 
  Nils as author
  * BASiCS_MCMC : added ref to GB paper + Nils as author + fix print of 
  system.time + updated examples
- Major changes function by function
  * makeExampleBASiCS_Data : `Case1` param replaced by `Example` 
  (vignette + unit test updated accordingly)
  * BASiCS_MCMC : default value for PriorDelta set to 'log-normal' 
  * HiddenBASiCS_MCMC_Start : new starting values for delta (as in main repo)
  
version 1.0.2: (2017-08-01)
- Minor changes function-by-function (revision of documentation + minor bugs)
  * BASiCS_MCMC : 'MCMC_Output' replaced by 'Chain' in examples
- Major changes function-by-function
  * BASiCS_MCMC : chains stored a single .Rds files, with BASiCS_Chain format 
  (rather than separate .txt files)
  * BASiCS_LoadChain : updated accordingly
  * BASiCS_DetectHVG : evidence threhold to be defined by EFDR only 
- Vignette updated accordingly 

version 1.0.3: (2017-08-01)
- Minor changes function-by-function (revision of documentation + minor bugs)
  * BASiCS_DetectHVG / LVG: added vertical/horizontal lines in EFDR/EFND plot, 
  subtasks moved to hidden functions (avoids repeated code)
- Major changes function-by-function
  * BASiCS_DetectLVG : evidence threhold to be defined by EFDR only 
  * BASiCS_DetectHVG / LVG: fix on default prob threshold = 0.5 when optimal 
  is < 0.5
- Examples in BASiCS_MCMC updated accordingly
- Vignette updated accordingly

version 1.0.4: (2017-08-01)
- Minor changes function-by-function (revision of documentation + minor bugs)
  * BASiCS_VarThresholdSearchHVG / LVG : EFDR criteria updated as in 
  BASiCS_DetectHVG / LVG
  * BASiCS_TestDE : added examples
- Major changes function-by-function
  * BASiCS_D_TestDE : no longer in use message added
- Examples in BASiCS_MCMC updated accordingly
- Vignette updated accordingly
- Updated DESCRIPTION file (authors and description)
- Updated welcome message (with link to new wiki)

version 1.0.5: (2017-08-01)
- Major changes function-by-function
  * BASiCS_TestDE : plotting functionality for offset added
- ACF plot added to BASiCS_Chain plots

version 1.0.6: (2017-08-02)
- 'matrixStats' added within 'Imports' in DESCRIPTION (to use 
'colMedians' function)
- Minor changes function-by-function (revision of documentation + minor bugs)
  * BASiCS_TestDE : Improved offset plots
- Major changes function-by-function
  * BASiCS_TestDE : Ref/Test notation changed to Group1/2 + output table names 
  changed (to Mean/Disp) + 
  offset corrected objects as output + separated output tables Mean/Disp + post 
  prob threshold moved to hidden function (avoids duplicated code)
  
version 1.0.7: (2017-08-03)
- Multiple changes in BASiCS_TestDE:
  * Added examples of table viewing in doc
  * Added chain extracts to run examples
  * Results for differential dispersion to exclude differential mean genes
  * EFDR / EFNR control plot added
  * MA plots added
- Main hidden functions moved into individual files
- 'graphics' + 'KernSmooth' added as dependence to use 'smoothScatter'
- 'smooth' argument changed to 'SmoothPlot' in plot functions/methods
- Added reference :: to basic functions (e.g. boxplot, var, acf, etc)
- devtools::check() OK - 1 warning : BiocStyle in vignette

version 1.0.8: (2017-08-03)
- 'Data' arg removed from args in:
  'HiddenHeaderDetectHVG_LVG' + 'HiddenVarDecomp' + 'BASiCS_DetectHVG' + 
  'BASiCS_DetectLVG' + 'BASiCS_VarThresholdSearchHVG' + 
  'BASiCS_VarThresholdSearchLVG'
- 'object' arg renamed as 'Chain' in 'BASiCS_DetectHVG' + 'BASiCS_DetectLVG' 
  + 'BASiCS_VarThresholdSearchHVG' + 'BASiCS_VarThresholdSearchLVG'
- Examples in BASiCS_MCMC updated to use built-in chain
- Removal of 'smoothPlot' usage in plots for 'BASiCS_Summary' class (avoids 
issues with log)
- Volcano plots added in BASiCS_TestDE function
- Resolved issues with log scale in 'smoothScatter'
- Minor bugs fixed in BASiCS_TestDE
- 'EviThreshold' arg replaced by 'ProbThreshold' in 'BASiCS_HVG' + 'BASiCS_LVG'
- Vignette updated accordingly

version 1.0.9: (2017-08-04)
- newBASiCS_Data : added check to ensure SpikeInfo is a data.frame
- BASiCS_TestDE : default value for EpsilonM & EpsilonD has changed
- Vignette + examples updated accordingly

version 1.0.10: (2017-08-06)
- BASiCS_TestDE : changes in output messages
- Gene name added in plot method for BASiCS_Chain objects

version 1.0.11: (2017-08-06)
- BASiCS_VarianceDecomp : small bugs fixed (unused Data object)
- colnames fixed on cell-specific slots ChainSC and ChainRNA
- Rcpp::checkUserInterrupt() activated in C++ code for interruptions
- 'grDevices' added as dependency

version 1.0.11: (2017-08-13)
- 'WithSpikes' argument removed from 'BASiCS_LoadChain' function

version 1.0.12: (2017-08-14)
- 'SummarizedExperiment' class replaced by 'SingleCellExperiment'
- Updated vignette

version 1.0.13: (2017-08-15)
- Minor changes to documentation
- Minor changes to vignette

version 1.1.0: (2017-08-16)
- Minor changes required to pass BiocCheck (used formatR and BiocChecks)

version 0.99.0: (2017-08-28)
- Minor changes to complete Bioconductor submission checklist
- Version re-numbered according to Bioconductor guidelines

version 0.99.2: (2017-09-18)- After @nturaga review
- 'newBASiCS_Data': format + checks moved to `HiddenChecksBASiCS_Data` function
- `HiddenChecksBASiCS_Data`: use of colMeans2, rowMeans2
- Format in welcome message
- 'newBASiCS_Chain': format 

version 0.99.3: (2017-09-21)

- Extra unit test (parameter estimates for a given seed)
- Format + vectorisation in `HiddenThresholdSearchTestDE` function
- `HiddenProbDE` removed as no longer needed
- Additional unit test for differential test added
- Format for `BASiCS_TestDE` function 
- Format for `HiddenBASiCS_MCMC_Start` function
- Format for `HiddenChecksBASiCS` function
- Format for `BASiCS_D_TestDE`
- Format for all S4 methods

version 0.99.3: (2017-09-21)

- 2^ added to FC in `BASiCS_TestDE` TableDisp
- Format for data documentation
- Format for classes definition
- Format + vectorization for `BASiCS_Filter`
- Format for `BASiCS_LoadChain`

version 0.99.3: (2017-09-22)

- Removal of second example in `makeExampleBASiCS_Data` (no longer
required due to DataSC, DataRNA)
- Format for `makeExampleBASiCS_Data`
- Format for `BASiCS_Sim`

version 0.99.3: (2017-09-22)

- Format + matrixStats usage in `BASiCS_VarianceDecomp`
- Unit test for HVG/LVG detection added
- Minor bug in `BASiCS_TestDE` resolved (related to colMeans2 use)
- Format + matrixStats usage in `HiddenVarDecomp`
- `message` replaced by `cat` in Methods.R
- Removal of no-longer-needed Hidden functions
- Format in `HiddenHeaderDetectHVG_LVG`
- Format in `HiddenPlot1DetectHVG_LVG` + `HiddenPlot2DetectHVG_LVG`
- Format + matrixStats usage in `BASiCS_DetectHVG` + `BASiCS_DetectLVG`
- Format in `BASiCS_VarThresholdSearchHVG`
- Format in `HiddenThresholdSearchDetectHVG_LVG`

version 0.99.3: (2017-09-22)

- Calculations in `BASiCS_DenoisedRates` moved to C++ to increase speed

version 0.99.3: (2017-09-24)

- Format in `BASiCS_DenoisedCounts`
- Edits in `HiddenBASiCS_MCMCcpp` and associated C++ functions
  * Dimensions for mu storage upto q0 only
  * Creation of generic storage values
  * Formating of long lines
  * Removal of no-longer-required functions and debug lines

version 0.99.3: (2017-09-25)
- Edits in `HiddenBASiCS_MCMCcpp` and associated C++ functions
  * Optimization of MH updates

version 0.99.3: (2017-09-25)
- Edits in `HiddenBASiCS_MCMCcpp` and associated C++ functions
  * Batch & no-batch versions merged in a single function
  * Avoids double transponse for chain storage
  
version 0.99.4: (2017-09-25)
- Format in `BASiCS_MCMC`
- Minor bug fixed in `BASiCS_DetectLVG` plots
- Added examples in `BASiCS_DenoisedCounts` + `BASiCS_DenoisedRates`
- Removal of `Example` argument in `makeExampleBASiCS_D_Data`
- Format in vignette
- R CMD CHECK passed
- R CMD BiocCheck passed
  
version 0.99.5: (2017-09-26)  
- Change of default `PriorDelta` value in `BASiCS_MCMC` 
- Unit tests modified accordingly

version 0.99.7: (2017-10-05) - After @nturaga review
- `inst` folder has been deleted
- Removal of `...` arg in `segments` - `plot` method for `BASiCS_Summary`

version 0.99.8: (2017-10-10)
- version bump to trigger a new Bioconductor build

version 0.99.9: (2017-10-16)
- Updated URL and BugReports in DESCRIPTION

version 0.99.10: (2017-10-17)
- Updated README with BioC installation instructions and @nturaga acknowledgment

version 0.99.12: (2017-10-17) 
- Update of NEWS with changes by @neling 
- Small typo fix in class validity from @neling last commit
- Changes in `BASiCS_Chain` and `BASiCS_Summary` classess to contain a single 
`list` slot where all parameters are stored. This allows greater flexibility 
to incorporate ongoing developments of BASiCS but does not affect user interface. 
- `BASiCS_DenoisedCounts`, `BASiCS_DenoisedRates`, `BASiCS_DetectHVG`, 
`BASiCS_DetectLVG`, `BASiCS_MCMC`, `BASiCS_TestDE`, `HiddenVarDecomp`, 
`newBASiCS_Chain` functions and all methods updated accordingly 
- `ChainSC` and `ChainRNA` example objects updated accordingly
- Unit tests updated accordingly
- Wiki page updated accordingly
- `updateObject` generic method imported from `BiocGenerics` 
- New generic methods definition moved to AllGenerics.R
- Change in class definition to store current packageVersion
- `BASiCS_LoadChain` function updated to deal with old class definition and
.txt storage.
- Shorter welcome message. 
- Sanity checks in `BASiCS_TestDE` moved to separate file. 
- Updated code indentation in `BASiCS_TestDE`
- Warning in `BASiCS_DetectHVG` and `BASiCS_DetectLVG` when user provides
posterior probability thresholds as input
- Unused argument removed from `HiddenEFDR` and `HiddenEFNR` functions
- Minor changes to pass R CMD check
- Check library passes R CMD BiocCheck
- Tidy up NAMESPACE
- Tidy up NEWS
- Merge Devel_class into master branch

version 0.99.13: (2017-10-17)  
- @neling email added to DESCRIPTION + author contributions
  
version 0.99.14: (2017-10-19) 
- Added checks to ensure input `SingleCellExperiment` object has all info

version 1.0.0: (2017-10-30)
- Bioconductor 3.6 release

version 1.1.0: (2017-10-30)
- Version number bump after bioconductor 3.6 release

version 1.1.1: (2017-11-08)
- 'ggplot2' added to imports
- Default value for SpikeInfo changed to NULL in `newBASiCS_Data` function
- Cleaning of `HiddenBASiCS_MCMCcppNoSpikes` 
- Cleaning of full conditionals for no-spikes implementation
- Fixed bug in stochastic reference implementation
- Added unit test for no-spikes case (estimation)
- Minor tyle changes to merge regression case
- 'Eta' parameter removed from `Summary` method (regression case only)
- Corrected HPD interval calculation for epsilon and sigma2 (regression case)
- Added mark for 'ExcludedFromRegression' genes in `BASiCS_TestDE`

version 1.1.2: (2017-11-08)
- Skeleton for sampler with integrated out s

version 1.1.3: (2017-11-08)
- Collapsed sampler implemented (to be tested)
- Unit tests reverted to original case
- Version number bump
- Store `TableRef` on the `StoreDir` directory (no-spike case only)

version 1.1.4: (2017-11-12)
- Only include genes that are expressed in at least 2 cells per condition for
differential residual dispersion testing (regression case only)

version 1.1.5: (2017-11-15)
- Removal of collapsed sampler prototype (from C++ and R) - moved to 
`CollapsedSampler` branch
- Number of genes used for stochastic reference increased to 10% of genes (no spikes only)

version 1.1.6: (2017-11-15)
- Added prototype for regression + no-spikes sampler

version 1.1.7: (2017-11-20)
- Nils added as author in cpp file
- Updated unit test for no-spikes case (changes due to change in stoch ref)
- Change in `BASiCS_MCMC` so that only biological counts go to C++
- Added factorizations in `muUpdateReg` and `deltaUpdateReg` (C++ code)

version 1.1.8: (2017-11-21) 
- `muUpdateRegNoSpikes` and `deltaUpdateRegNoSpikes` added to C++ code
- Clean-up of C++ code (repeated debug checks made into function)
- `lambdaUpdateReg` created as a separate function
- Vectorization of calculations related to regression implementation
- Global quantities (e.g. inv(V0)) taken outside the look (regression case)
- `sigma2UpdateReg` created as a separate function
- `betaUpdateReg` created as a separate function
- Fixed typo in sigma2 updates (regression case); unit test updated accordingly

version 1.1.9: (2017-11-24) 
- `means` only updated when needed (regression case); unit test updated accordingly
- `deltaUpdateNoSpikes` + `deltaUpdateRegNoSpikes` removed as no longer required
- Simplification of terms in `deltaUpdateReg`
- Small changes to unify code format in C++ file
- Notation change: `phi` replaced by `s` in no-spikes implementation
- Unit test changed accordingly (no-spike)
- Minor style changes in `BASiCS_MCMC`
- `BASiCS_MCMC` function broken into smaller functions (easier to read). This
creates the following hidden functions: `HiddenBASiCS_MCMC_InputCheck`,
`HiddenBASiCS_MCMC_ExtraArgs`, `HiddenBASiCS_MCMC_NoSpikesParams`, 
`HiddenBASiCS_MCMC_OutputStore` and `HiddenBASiCS_MCMC_RefFreqStore`
- Merge between no-spikes and regression case completed (code to be tested)
- Minor change in storage of reference frequency (no spikes only)

version 1.1.10: (2017-11-27) 
- `HiddenBASiCS_MCMC_Start` updated to remove regression-related hyper-params
- `HiddenBASiCS_MCMC_ExtraArgs` updated to include regression-related hyper-par
- `BASiCS_MCMC` modified accordingly
- Storage of adaptive variances fixed for the no-spike case

version 1.1.11: (2017-11-24) 
- Minor typo in the call to `HiddenBASiCS_MCMCcppNoSpikes` has been resolved

version 1.1.12: (2017-11-28) 
- Additional changes to improve usage of no-spikes case

version 1.1.13: (2017-11-28) 
- Fixed storage of `RefGene` in no-spikes when `StochasticRef = FALSE`

version 1.1.14: (2017-11-29)
- Minor bug resolved for no-spikes case when original data has spikes
- New unit test to assess that case

version 1.1.15: (2017-11-29)
- Typo fixed in `AtLeast2Cells` (`BASiCS_MCMC` function) definition for 
no-spikes + regression case when original data has spikes

version 1.1.16: (2017-11-29)
- Change in `BASiCS_MCMC` no-spikes so that only genes with zero total
counts are excluded from the identifiability constrain

version 1.1.17: (2017-12-07)
- Stop scaling of size factors for no-spikes case (`HiddenBASiCS_MCMC_Start`)
- Unit testing updated accordingly 
- Extra unit test to ensure that no-spikes results match for objects 
with/without spikes when setting `WithSpikes = FALSE`
- Modified constrain for no-spikes cases (to deal with non-zero genes)
- Default value of `ConstrainType` set to 1 in `BASiCS_MCMC` (no-spikes only)

version 1.1.18: (2017-12-08)
- Minor typo in `HiddenBASiCS_MCMC_NoSpikesParam` resolved

version 1.1.19: (2017-12-09)
- extended vignette to describe regression and non-spike case
- changed markdown to rmarkdown engine to compile vignette to include
table of contents

version 1.1.20: (2017-12-11)
- Updated dpi option in vignette 

version 1.1.21: (2017-12-13)
- `ConstrainProp` added as an optional argument for `BASiCS_MCMC` (no-spikes)

version 1.1.22: (2017-12-15)
- Documentation on ChainSCReg and ChainRNAReg datasets added
- Fixed showFit method
- Updated dpi option in vignette to reduce .html size
- Default value for `ConstrainProp` set to 0.20 (no-spikes)
- Unit tests updated accordingly (no-spikes)

version 1.1.23: (2017-12-18)
- Minor improvements to documentation 

version 1.1.24: (2017-12-18)
- Reduced no of iterations in unit test for quicker testing
- library `hexbin` added to imports (required for `showFit`)
- Vignette edits (simplification of Quick Start)

version 1.1.26: (2017-12-20)
- Vignette bibliography moved to .bib file
- Added diagram to summarise different implementations
- Reduced size of example objects
- Unit tests updated accordingly
- `subset` method created for `BASiCS_Chain` objects
- Removal of parameter `lambda` from `BASiCS_Chain` objects (for storage)
- R/Methods.R + R/Classes.R updated accordingly
- `newBASiCS_Chain` updated accordingly. 
- Code format for `showFit`

version 1.1.27: (2017-12-20)
- Minor typo resolved in `displayChainBASiCS` method
- Reduced size of example objects 
- Unit tests updated accordingly
- In `BASiCS_TestDE` function: `PsiE` argument renamed as `EpsilonR`

version 1.1.28: (2017-12-20)
- Vignette header as in BiocStyle
- In `BASiCS_TestDE` function: `ProbThresholdE` argument renamed as `ProbThresholdR`
- In `BASiCS_TestDE` function: `ProbThresholdE` argument renamed as `ProbThresholdR`
- Updated documentation for example `BASiCS_Chain` objects
- Minor additional changes to the documentation

version 1.1.29: (2017-12-21)
- `showFit` generic renamed as `BASiCS_showFit` (to avoids potential conflicts)

version 1.1.30: (2018-01-22)
- Commit to triger a new built

version 1.1.31: (2018-01-22)
- Updated documentation for `BASiCS_showFit` method

version 1.1.32: (2018-01-29)
- Fix to ensure that `BASiCS_MCMC` function adds cell labels for $\phi$
- `makeExampleBASiCS_Data` now produces valid `colnames` (cell labels)
- Fixed colnames of $\phi$ parameter in all data examples
- Extended validity test for `BASiCS_Chain` class
- `rownames` and `colnames` methods created for `BASiCS_Chain` class
- Added example and unit test for `BASiCS_VarianceDecomp` function

version 1.1.33: (2018-01-30)
- In `HiddenBASiCS_MCMC_Start`, `positive = TRUE` added to 
`scran::computeSumFactors` when estimated size factor contain invalid values.
Thanks to Mike Morgan for suggesting this solution.

version 1.1.34: (2018-01-31)
- `HiddenBASiCS_MCMC_Start` edited to account for new default
parameter values in `scran::computeSumFactors` call
- Unit tests updated accordingly
- Imports/Suggests packages are now in alphabetic order
- Minor style changes suggested by BiocCheck

version 1.1.35: (2018-03-18)
- New unit tests (more modular): example data, starting values MCMC, MCMC 
sampler for fixed starting values (spikes/no-spikes; regression/no-regression)

version 1.1.36: (2018-03-18)
- Fixed bug in `newBASiCS_Data` to define a default value for `Tech` when
spike-ins are not available. Thanks to Muad Abd El Hay (@Cumol) for pointing 
out this issue.

version 1.1.37: (2018-03-20)
- `phi` removed from the output of `BASiCS_MCMC` for no-spikes case
- Unit tests updated accordingly
- Checks for parameter names added to unit tests

version 1.1.38: (2018-03-20)
- Validity checks updated for `BASiCS_Chain` and `BASiCS_Summary` classes.
This accounts for different parameter configurations
- `Summary` method to exclude `RefFreq` for the no-spikes case
- Unit tests fo no-spikes case updated accordingly

version 1.1.39: (2018-03-20)
- Denoised counts/rates added to unit test for regression case
- `BASiCS_DenoisedCounts` adapted for no-spikes case
- `BASiCS_DenoisedRates` adapted for no-spikes case

version 1.1.40: (2018-03-20)
- Fixes small bug in `BASiCS_DenoisedRates`, no-spikes case
- Adds denoised rates/counts check to unit tests for no-spikes case

version 1.1.41: (2018-03-20)
- `BASiCS_MCMC`: Default value for `WithSpikes` set as FALSE when there are
no spike-ins in available in the data

version 1.1.42: (2018-03-20)
- `OrderVariable` default value set as "GeneIndex" in `BASiCS_TestDE`
- Fixed usage of `OrderVariable` in `BASiCS_TestDE` regression case
- Associated unit test updated accordingly
- Missing denoised rates/counts check added to unit tests for no-spikes case
- CITATION file has been added

version 1.1.43: (2018-03-20)
- Batch information moved to `colData` instead of `metadata` when building a 
`SingleCellExperiment` object via the `newBASiCS_Data` function. 
This facilitates data subsetting. 
- `BASiCS_MCMC` and `HiddenBASiCS_MCMC_InputCheck` updated accordingly
- `SummarizedExperiment::colData` and `S4Vectors::DataFrame` added as
imports in NAMESPACE

version 1.1.44: (2018-03-21)
- `HiddenVarDecomp` adapted to no-spikes case
- Unit test for `BASiCS_VarDecomp` expanded accordingly
- Specification of `colnames` and `rownames` added to `newBASiCS_Data`
- `colnames` and `rownames` are now specified as part of the output of 
`BASiCS_DenoisedCounts` and `BASiCS_DenoisedRates`

version 1.1.45: (2018-03-21)
- Messages within C++ code moved to functions

version 1.1.46: (2018-03-21)
- Split C++ code into individual functions
- One file per main function and individual files for utility function
- Created header files for main functions and utility functions 

version 1.1.47: (2018-03-21)
- Reduced number of genes in data examples 
- Unit test updated accordingly
- Nils added as maintainer in DESCRIPTION

version 1.1.48: (2018-03-22)
- Excluded epsilon object and RefFreq object from validity test 
in Chain Class

version 1.1.49: (2018-03-22)
- Fixed link to `BASiCS_Chain` documentation in `BASiCS_showFit` doc

version 1.1.50: (2018-03-26)
- Removed OffSet correction for phi in the 
BASiCS_TestDE function

version 1.1.51: (2018-03-26)
- Adjusted BASiCS_TestDE function to output data.frames containing same genes.

version 1.1.52: (2018-04-09)
- Added extra sentence to vignette describing the BASiCS_Data generation when 
SpikeInfo is not available

version 1.1.53: (2018-04-13)
- Fixed bug in plotting for TestDE function
- Added extra code in vignette to construct BASiCS_Data with no spikes
- Added plots to show changes in residual variability during testing

version 1.1.54: (2018-04-15)
- CITATION file updated to include latest BASiCS bioRxiv preprint

version 1.1.55: (2018-04-16)
- Speed-up of `BASiCS_TestDE` by avoiding unnecessary calculations

version 1.1.56: (2018-04-16)
- Minor changes in `BASiCS_MCMCcppNoSpikes.cpp` to avoid warnings in BioC

version 1.1.57: (2018-04-16)
- Minor changes in NEWS file

version 1.1.58: (2018-04-19)
- Updates in vignette to fully incorporate the regression and non-spike
BASiCS models.

version 1.1.59: (2018-04-19)
- Documentation of `RefFreq` in `BASiCS_Chain` class. 

version 1.1.60: (2018-04-19)
- Updated DESCRIPTION file to introduce residual over-dispersion testing

version 1.1.61: (2018-04-19) - INCOMPLETE WORK
- `Regression` is now a compulsory parameter in `BASiCS_MCMC`, hidden
functions and SOME unit tests updated accordingly. 

version 1.1.62: (2018-04-21) 
- `Regression` is now a compulsory parameter in `BASiCS_MCMC`, hidden
functions, documentation and unit tests updated accordingly.
- Minor updates in vignette to clarify default parameter in `newBASiCS_Data`
- `BASiCS_Filter` adapted to no-spikes case and minor bug resolved
- Added unit test for `BASiCS_Filter`
- Minor bug fixed for no-spikes case in `BASiCS_DenoisedCounts`

version 1.1.63: (2018-04-27)
- Extra warning message added when `scran` normalisation fails to produce
positive size factors

version 1.3.1: (2018-05-21)
- Unit tests created for selected C++ functions (`Hidden_rDirichlet` and
`Hidden_muUpdate`)
- Updated unit tests in spike-in parameter estimation to have tolerance
(TEMPORARY FIX)
- Minor updates in `makeExampleBASiCS_Data` and `newBASiCS_Data` function 
to allow different spike-in types (as in `SingleCellExperiment`)

version 1.3.2: (2018-05-21)
- Version bump only

version 1.3.3: (2018-05-21)
- Missing line added to test_data_examples.R

version 1.3.5: (2018-08-31)
- Updated reference to latest paper

version 1.3.6: (2018-09-04)
- Updated CITATION file

version 1.3.7: (2018-09-05)
- Commit to activate Travis/codecov

version 1.3.8: (2018-09-05)
- Updated README.md (Travis/codecov badges) + updated citation to Cell Systems

version 1.3.9: (2018-09-27)
- Changed raw data accessor to 'counts' instead of 'assay'
- makeExampleBASiCS_Data now generates 30 cells instead of 20
- Updated unit tests to match these 30 cells

version 1.3.10: (2018-09-28)
- Prevent BASiCS_Chain from crashing when StoreAdapt=TRUE for the regression case
- Prevent plot function errors
- Updated documentation using roxygen2

version 1.3.11: (2018-09-30)
- Alan added as contributor

version 1.3.13: (2018-09-30)
- Some Rd files generated again

version 1.3.15: (2018-10-07)
- Fixed bug when storing chains in the non-spikes case

version 1.3.16: (2018-10-08)
- Reduce checks for Data that was not generated with the newBASiCS_Data function

version 1.3.17: (2018-10-11)
- New unit tests for different argument settings for the BASiCS_MCMC function

version 1.3.18: (2018-10-15)
- `BASiCS_D_TestDE` has been deprecated (replaced by `BASiCS_TestDE`)
- `SingleCellExperiment::` added to all calls of `isSpike`
- Extra input check in `BASiCS_MCMC` to avoid issues due to multiple types of
spike-ins being present in the data. 

version 1.3.19: (2018-10-18)
- Replacement of `R::lgammafn` by `std::lgamma` in c++ code 
(great speed-up! with thanks to Shian Su (@Shians))

version 1.3.20: (2018-10-18)
- Minor updates to README and vignette (e.g. to include BASiCS sticker)

version 1.3.21: (2018-10-19)
- Restores use of `R::lgammafn` due to errors in Bioconductor build report

version 1.3.22: (2018-10-19)
- Update of DESCRIPTION to require C++11
- Once again, replacement of `R::lgammafn` by `std::lgamma` in c++ code 

version 1.3.23: (2018-10-18)
- Updated vignette to include simple SCE example without spike-in information

version 1.3.24: (2018-10-21)
- Version bump to trigger new build

version 1.4.2: (2019-03-15)
- Bug fix when not providing BatchInfo as factor

version 1.4.3: (2019-03-15)
- Extra check if batch names contain spaces
- Added line breaks after individual error messages 

version 1.4.4: (2019-03-17)
- Bug fix that corrects for the number of factors in BatchInfo vector

version 1.4.5: (2019-03-20)
- Small bug fix in 'test_mcmc_arguments.R'

version 1.4.6: (2019-03-20)
- Same as 1.4.5 but with minor additional fix.

version 1.4.7: (2019-03-22)
- Added default value for 'BatchInfo' within 'BASiCS_MCMC'