Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit b15b7a7

Browse files
committed
improve the counts database structure
1 parent 86c32fd commit b15b7a7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

R/counts.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ get_single_cell_experiment <- function(
112112
has_name(raw_data, c("cell_", "file_id_db"))
113113
)
114114

115-
versioned_cache_directory <- file.path(cache_directory, COUNTS_VERSION)
115+
versioned_cache_directory <- cache_directory
116116
versioned_cache_directory |> dir.create(
117117
showWarnings = FALSE,
118118
recursive = TRUE

R/unharmonised.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ get_unharmonised_dataset <- function(
5454
){
5555
unharmonised_root <- file.path(
5656
cache_directory,
57-
COUNTS_VERSION,
5857
"unharmonised"
5958
)
6059
file_name <- glue::glue("{dataset_id}.parquet")

R/utils.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ single_line_str <- function(text){
4141
str_remove_all(text, r"(\n\s*)")
4242
}
4343

44-
#' Returns the default cache directory
44+
#' Returns the default cache directory with a version number
4545
#' @return A length one character vector.
4646
#' @importFrom tools R_user_dir
4747
#' @importFrom utils packageName
@@ -51,6 +51,7 @@ get_default_cache_dir <- function() {
5151
R_user_dir(
5252
"cache"
5353
) |>
54+
file.path(COUNTS_VERSION) |>
5455
normalizePath() |>
5556
suppressWarnings()
5657
}

tests/testthat/test-query.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ test_that("get_SingleCellExperiment() assigns the right cell ID to each cell", {
131131

132132
# Load the SCE from cache directly
133133
assay_1 = CuratedAtlasQueryR:::get_default_cache_dir() |>
134-
file.path(CuratedAtlasQueryR:::COUNTS_VERSION, "original", id) |>
134+
file.path("original", id) |>
135135
HDF5Array::loadHDF5SummarizedExperiment() |>
136136
assay("X") |>
137137
as.matrix()

0 commit comments

Comments
 (0)