Skip to content

Commit

Permalink
stupid git didn't catch all my diff on last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dwbapst committed Jan 14, 2018
1 parent 4a64112 commit c4c2cfe
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ warnings_are_errors: TRUE

before_install:
- sudo apt-get install libgmp3-dev
- export RGL_USE_NULL=TRUE
- export RGL_USE_NULL=TRUE

script:
- R CMD build .
- travis_wait 45 R CMD check *tar.gz --as-cran

after_success:
- travis_wait 45 Rscript -e 'covr::codecov()'
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: TreEvo
Type: Package
Title: Using ABC to Understand Trait Evolution
Version: 0.4.6
Date: 2018-01-17
Version: 0.5.0
Date: 2018-01-14
Authors@R: c(person("Brian", "O'Meara", role=c("aut"), email="[email protected]"),
person("Barb", "Banbury", role=c("aut")),
person("David","Bapst", role=c("aut", "cre"), email="[email protected]"))
Expand All @@ -29,7 +29,7 @@ Suggests:
doMC,
doParallel,
gpclib,
rgl,
rgl,
testthat,
paleotree,
knitr,
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## TreEvo
# R Package for Estimating Trait Evolution Parameter using Approximate Bayesian Computation.

TreEvo (case-sensitive) is an R Package for doing phylogenetic comparative method analyses of trait evolution, with a flexible framework for users to define their own novel models of trait evolution, involving both 'intrinsic' and 'extrinsic' factors (respective to the evolving lineage).
TreEvo (case-sensitive) is an R Package for doing phylogenetic comparative method analyses of trait evolution, with a flexible framework for users to define their own novel models of trait evolution, involving both 'intrinsic' and 'extrinsic' factors (respective to the evolving lineage).

Currently, TreEvo is adapted only for univariate, continuous traits.

Expand All @@ -17,7 +17,7 @@ You can install the latest stable development version using the R function insta

More experimental, less stable versions can be found on other branches of this github repo.

The current build status is indicated here:
The current build status is indicated here:
[![Build Status](https://travis-ci.org/bomeara/treevo.svg)](https://travis-ci.org/bomeara/treevo) [![codecov](https://codecov.io/gh/bomeara/treevo/branch/master/graph/badge.svg)](https://codecov.io/gh/bomeara/treevo)

You can see a version of help created with at http://bomeara.github.io/treevo/reference/index.html
Expand Down
26 changes: 13 additions & 13 deletions tests/testthat/test_boxcoxTransformation.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@ test_that("boxcoxTransformation works", {
set.seed(1)
simPhy <- rcoal(5)
simPhy$edge.length <- simPhy$edge.length * 20

#expect_warning(
simDataParallel <- parallelSimulateWithPriors(
nrepSim = 2,
multicore = FALSE,
coreLimit = 1,
multicore = FALSE,
coreLimit = 1,
phy = simPhy,
intrinsicFn = brownianIntrinsic,
intrinsicFn = brownianIntrinsic,
extrinsicFn = nullExtrinsic,
startingPriorsFns = "normal",
startingPriorsValues = matrix(c(mean(simChar[,1]), sd(simChar[, 1]))),
startingPriorsFns = "normal",
startingPriorsValues = matrix(c(mean(simChar[,1]), sd(simChar[, 1]))),
intrinsicPriorsFns = c("exponential"),
intrinsicPriorsValues = matrix(c(10, 10), nrow = 2, byrow = FALSE),
intrinsicPriorsValues = matrix(c(10, 10), nrow = 2, byrow = FALSE),
extrinsicPriorsFns = c("fixed"),
extrinsicPriorsValues = matrix(c(0, 0), nrow = 2, byrow = FALSE),
generation.time = 100000,
extrinsicPriorsValues = matrix(c(0, 0), nrow = 2, byrow = FALSE),
generation.time = 100000,
checkpointFile = NULL,
checkpointFreq = 24,
verbose = FALSE,
checkpointFreq = 24,
verbose = FALSE,
freevector = NULL,
taxon.df = NULL
taxon.df = NULL
#,niter.brown = 25, niter.lambda = 25,
#niter.delta = 25, niter.OU = 25, niter.white = 25
)
Expand All @@ -34,7 +34,7 @@ test_that("boxcoxTransformation works", {
boxTranMat <- boxcoxTransformationMatrix(summaryValuesMatrix = summaryValuesMat)
#
result<-boxcoxTransformation(
summaryValuesVector = summaryValuesMat[,1],
summaryValuesVector = summaryValuesMat[,1],
boxcoxAddition = boxTranMat$boxcoxAddition,
boxcoxLambda = boxTranMat$boxcoxLambda)
})
16 changes: 8 additions & 8 deletions tests/testthat/test_doRun.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ test_that("doRun_rej works", {
set.seed(1)
expect_warning(
resultsRej <- doRun_rej(
phy = simPhy,
phy = simPhy,
traits = simChar,
intrinsicFn = brownianIntrinsic,
intrinsicFn = brownianIntrinsic,
extrinsicFn = nullExtrinsic,
startingPriorsFns = "normal",
startingPriorsValues = matrix(c(mean(simChar[,1]), sd(simChar[, 1]))),
startingPriorsFns = "normal",
startingPriorsValues = matrix(c(mean(simChar[,1]), sd(simChar[, 1]))),
intrinsicPriorsFns = c("exponential"),
intrinsicPriorsValues = matrix(c(10, 10), nrow = 2,byrow = FALSE),
extrinsicPriorsFns = c("fixed"),
extrinsicPriorsValues = matrix(c(0, 0), nrow = 2,byrow = FALSE),
StartSims = 10,
extrinsicPriorsValues = matrix(c(0, 0), nrow = 2,byrow = FALSE),
StartSims = 10,
generation.time=1000000,
jobName = "examplerun_rej",
abcTolerance = 0.05,
multicore = FALSE,
abcTolerance = 0.05,
multicore = FALSE,
coreLimit = 1)
)
expect_is(resultsRej, "list")
Expand Down
36 changes: 18 additions & 18 deletions tests/testthat/test_doSimulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ test_that("doSimulation works", {
set.seed(1)
tree <- rcoal(5)
tree$edge.length <- tree$edge.length * 20

char <- doSimulation(
phy = tree,
phy = tree,
intrinsicFn = brownianIntrinsic,
extrinsicFn = nullExtrinsic,
extrinsicFn = nullExtrinsic,
startingValues = c(10),
intrinsicValues = c(0.01),
intrinsicValues = c(0.01),
extrinsicValues = c(0),
generation.time=1000000,
saveHistory = FALSE
Expand All @@ -17,11 +17,11 @@ test_that("doSimulation works", {
expect_equal(dim(char)[1], Ntip(tree))

char <- doSimulation(
phy = tree,
phy = tree,
intrinsicFn = boundaryMinIntrinsic,
extrinsicFn = ExponentiallyDecayingPushExtrinsic,
startingValues = c(10),
intrinsicValues = c(0.05,10, 0.01),
startingValues = c(10),
intrinsicValues = c(0.05,10, 0.01),
extrinsicValues = c(0, 0.1, 0.25),
generation.time=1000000,
saveHistory = FALSE
Expand All @@ -37,28 +37,28 @@ test_that("doSimulationForPlotting works", {
tree$edge.length <- tree$edge.length * 20

char <- doSimulationForPlotting(
phy = tree,
phy = tree,
intrinsicFn = brownianIntrinsic,
extrinsicFn = nullExtrinsic,
extrinsicFn = nullExtrinsic,
startingValues = c(10),
intrinsicValues = c(0.01),
intrinsicValues = c(0.01),
extrinsicValues = c(0),
generation.time=1000000,
plot = FALSE,
plot = FALSE,
saveHistory = FALSE
)
expect_equal(class(char[,1]), "integer")
expect_equal(dim(char)[1], Ntip(tree))

char <- doSimulationForPlotting(
phy = tree,
phy = tree,
intrinsicFn = boundaryMinIntrinsic,
extrinsicFn = ExponentiallyDecayingPushExtrinsic,
startingValues = c(10),
intrinsicValues = c(0.05,10, 0.01),
startingValues = c(10),
intrinsicValues = c(0.05,10, 0.01),
extrinsicValues = c(0, 0.1, 0.25),
generation.time=1000000,
plot = TRUE,
plot = TRUE,
saveHistory = FALSE
)
expect_equal(class(char[,1]), "integer")
Expand All @@ -75,12 +75,12 @@ test_that("doSimulationWithPossibleExtinction works", {
expect_warning(
charDoSim <- doSimulationWithPossibleExtinction(
phy = tree,
intrinsicFn = brownianIntrinsic,
intrinsicFn = brownianIntrinsic,
extrinsicFn = nullExtrinsic,
startingValues = c(10),
startingValues = c(10),
intrinsicValues = c(0.01),
generation.time=1000000,
extrinsicValues = c(0),
extrinsicValues = c(0),
saveHistory = FALSE
)
)
Expand Down
42 changes: 21 additions & 21 deletions tests/testthat/test_methodsPLS.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,54 @@ test_that("methodsPLS works", {
set.seed(1)
simPhy <- rcoal(5)
simPhy$edge.length <- simPhy$edge.length * 20

nSimulations <- 6

#expect_warning(
simDataParallel <- parallelSimulateWithPriors(
nrepSim = nSimulations,
multicore = FALSE,
coreLimit = 1,
multicore = FALSE,
coreLimit = 1,
phy = simPhy,
intrinsicFn = brownianIntrinsic,
intrinsicFn = brownianIntrinsic,
extrinsicFn = nullExtrinsic,
startingPriorsFns = "normal",
startingPriorsFns = "normal",
startingPriorsValues = matrix(c(mean(simChar[,
1]), sd(simChar[, 1]))),
1]), sd(simChar[, 1]))),
intrinsicPriorsFns = c("exponential"),
intrinsicPriorsValues = matrix(c(10, 10), nrow = 2,
byrow = FALSE),
byrow = FALSE),
extrinsicPriorsFns = c("fixed"),
extrinsicPriorsValues = matrix(c(0, 0), nrow = 2,
byrow = FALSE),
generation.time = 100000,
byrow = FALSE),
generation.time = 100000,
checkpointFile = NULL,
checkpointFreq = 24,
verbose = FALSE,
checkpointFreq = 24,
verbose = FALSE,
freevector = NULL,
taxon.df = NULL
#,niter.brown = 25,
taxon.df = NULL
#,niter.brown = 25,
#niter.lambda = 25,
#niter.delta = 25,
#niter.OU = 25,
#niter.delta = 25,
#niter.OU = 25,
#niter.white = 25
)
#)

nParFree <- sum(attr(simDataParallel, "freevector"))
trueFreeValuesMat <- simDataParallel[, 1:nParFree]
summaryValuesMat <- simDataParallel[, -1:-nParFree]

expect_warning(
PLSmodel <- returnPLSModel(
trueFreeValuesMatrix = trueFreeValuesMat,
summaryValuesMatrix = summaryValuesMat,
summaryValuesMatrix = summaryValuesMat,
validation = "CV",
scale = TRUE,
variance.cutoff = 95,
scale = TRUE,
variance.cutoff = 95,
segments = nSimulations)
)

PLSTransform(
summaryValuesMatrix = summaryValuesMat,
pls.model = PLSmodel
Expand Down
16 changes: 8 additions & 8 deletions tests/testthat/test_plotting.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ test_that("plotABC_3D works", {
data(simRunExample)
plotABC_3D(
particleDataFrame = results$particleDataFrame,
parameter = 7,
show.particles = "none",
parameter = 7,
show.particles = "none",
plot.parent = FALSE,
realParam = FALSE,
realParam = FALSE,
realParamValues = NA)
}
})
Expand All @@ -17,7 +17,7 @@ test_that("plotPosteriors works", {
data(simRunExample)
plotPosteriors(
particleDataFrame = results$particleDataFrame,
priorsMat = results$PriorMatrix,
priorsMat = results$PriorMatrix,
realParam = TRUE,
realParamValues = c(ancState, genRate)
)
Expand All @@ -28,19 +28,19 @@ test_that("plotPosteriors correctly gives an error", {
data(simRunExample)
expect_error(
plotPosteriors(
results$particleDataFrame,
results$PriorMatrix)
results$particleDataFrame,
results$PriorMatrix)
,NA)
})

test_that("plotPriorPost works", {
set.seed(1)
data(simRunExample)
plotPrior(priorFn = "exponential", priorVariables = c(10))

plotPrior(priorFn = "normal", priorVariables = c(1,
2))

plotPrior(priorFn = "gamma", priorVariables = c(2,
0.2), plotQuants = FALSE, plotLegend = FALSE)
priorKernal <- getUnivariatePriorCurve(priorFn = "normal",
Expand Down
Loading

1 comment on commit c4c2cfe

@bomeara
Copy link
Owner

@bomeara bomeara commented on c4c2cfe Jan 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cough git commit -m"all my changes" -a cough

;-)

Please sign in to comment.