Skip to content
Permalink
Browse files

Update to nightly tf builds and pass unit tests

  • Loading branch information...
kieranrcampbell committed Jul 3, 2019
1 parent ba7d86b commit ed38dc663e5d9e9c3d4192a4a2a15bd5eafe95a9
Showing with 5 additions and 18 deletions.
  1. +1 −1 .travis.yml
  2. +1 −1 NAMESPACE
  3. +1 −13 R/clonealign.R
  4. +1 −2 README.md
  5. +1 −1 tests/testthat/test_clonealign.R
@@ -34,5 +34,5 @@ addons:
before_install:
- python -m pip install --user --upgrade pip
- pip install --user numpy
- pip install --user tensorflow
- pip install --user tf-nightly
- pip install --user --upgrade tensorflow-probability
@@ -2,7 +2,6 @@

S3method(print,clonealign_fit)
export(clonealign)
export(install_tensorflow_for_clonealign)
export(plot_clonealign)
export(run_clonealign)
import(ggplot2)
@@ -16,6 +15,7 @@ importFrom(glue,glue)
importFrom(methods,is)
importFrom(progress,progress_bar)
importFrom(stats,cor)
importFrom(stats,median)
importFrom(stats,prcomp)
importFrom(stats,rnorm)
importFrom(stats,sd)
@@ -19,6 +19,7 @@
#' assigned, analagous to the E-step in EM. At 0, they are initialized evenly across clones,
#' while at 10 they are semi hard assigned to the most likely initial values.
#'
#' @importFrom stats median
#'
#' @export
#'
@@ -417,16 +418,3 @@ compute_ca_fit_mse <- function(fit, Y, L,
mse
}


#' Adjust tensorflow installation to correct
#' @export
install_tensorflow_for_clonealign <- function() {


config <- as.character(reticulate::py_config())[1]
pip_path <- gsub("/python", "/pip", config)
pip_path <- paste(pip_path, "install --user tensorflow-probability==0.6.0")

system(pip_path)
}

@@ -32,10 +32,9 @@ For more info see the NEWS.md file.

```r
install.packages("tensorflow")
tensorflow::install_tensorflow(extra_packages ="tensorflow-probability", version="1.13.1")
tensorflow::install_tensorflow(extra_packages ="tensorflow-probability", version="nightly")
install.packages("devtools") # If not already installed
install_github("kieranrcampbell/clonealign")
clonealign::install_tensorflow_for_clonealign()
```


@@ -30,7 +30,7 @@ test_that("clonealign(...) returns a valid object", {

expect_true(all(c("clone_probs", "mu", "s") %in% names(cal$ml_params)))

expect_true(all(c("clone", "elbo", "retained_genes", "correlations") %in% names(cal)))
expect_true(all(c("clone", "convergence_info", "retained_genes", "correlations", "ml_params") %in% names(cal)))

})

0 comments on commit ed38dc6

Please sign in to comment.
You can’t perform that action at this time.