Skip to content

Commit

Permalink
Merge branch 'dev-jtm_gene_conversion-intersect' into jtm_gene_conver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
jmitchell81 authored Jan 26, 2024
2 parents 617e37c + b7ff808 commit 40cf579
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 36 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/bioc_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: Update Bioconductor package files

on:
workflow_dispatch:
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
export(TF_syntax_to_R)
export(add_rl_column)
export(build_domino)
export(cache)
export(circos_ligand_receptor)
export(cor_heatmap)
export(cor_scatter)
Expand Down
11 changes: 0 additions & 11 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,6 @@ dom_network_items <- function(dom, clusters = NULL, return = NULL) {
}
}

#' Specify the cache
#'
#' @param path Path to tstore cache on
#' @return BiocFileCache
#' @export
cache <- function(path = tools::R_user_dir(package = "domino2")) {
bfc <- BiocFileCache::BiocFileCache(path, ask = FALSE)

bfc
}

#' Convert python True/False syntax to TRUE/FALSE
#'
#' @param x character vector. If it consists of only "True" and "False" strings, the vector is converted to an R logical vector
Expand Down
17 changes: 0 additions & 17 deletions man/cache.Rd

This file was deleted.

14 changes: 10 additions & 4 deletions tests/testthat/test-cache.r
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
test_that("can add to a new cache", {
tf <- tempfile(tmpdir = tempdir(check = TRUE))
file.create(tf)
bfc <- cache(path = tempdir())
bfc <- BiocFileCache::BiocFileCache(tempdir(), ask = FALSE)
expect_equal(length(bfc), 0)
BiocFileCache::cleanbfc(bfc, ask = FALSE)

#from Bioc example
savepath <- BiocFileCache::bfcnew(bfc, "NewResource", ext = ".RData")
df <- data.frame(list("a"=c(1, 2), "b"=c(3, 4)))
save(df, file = savepath)

expect_equal(length(bfc), 1)

#cleanup
BiocFileCache::removebfc(bfc, ask = FALSE)
})
2 changes: 1 addition & 1 deletion vignettes/domino2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ set.seed(123)
```

``` {r files, include=FALSE}
bfc <- cache()
bfc <- BiocFileCache::BiocFileCache(ask = FALSE)
data_url <- "https://zenodo.org/records/10222767/files"
Expand Down
2 changes: 1 addition & 1 deletion vignettes/domino_object_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ library(domino2)
```

```{r setup, include = FALSE}
bfc <- cache()
bfc <- BiocFileCache::BiocFileCache(ask = FALSE)
data_url <- "https://zenodo.org/records/10222767/files/pbmc_domino_built.rds"
tmp_path <- BiocFileCache::bfcrpath(bfc, data_url)
dom <- readRDS(tmp_path)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/plotting_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ library(patchwork)
In addition to the numerous plotting options available in the original [Domino](https://github.com/Elisseeff-Lab/domino), domino2 has added more functionality and new methods to improve visualization and interpretation of analysis results. Here, we will go over the different plotting functions available, as well as different options that can be utilized, and options for customization. We will be using the domino object (loaded as `dom`) from our example analysis in [Getting Started](vignette("domino2")).

```{r load data, include = FALSE}
bfc <- cache()
bfc <- BiocFileCache::BiocFileCache(ask = FALSE)
data_url <- "https://zenodo.org/records/10222767/files/pbmc_domino_built.rds"
tmp_path <- BiocFileCache::bfcrpath(bfc, data_url)
dom <- readRDS(tmp_path)
Expand Down

0 comments on commit 40cf579

Please sign in to comment.