Skip to content

Commit 3445b31

Browse files
committed
Add test for fetch_data(), confirm all dropbox links for ERC data
1 parent 9f0cfde commit 3445b31

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

tests/testthat/test-fetch_data.R

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
test_that("multiplication works", {
2+
expect_error(fetch_data(type = "BAD_TYPE"))
3+
})
4+
5+
6+
## test ERC
7+
8+
# ## SRT data
9+
# spe_erc_path <- fetch_data(type = "LFF_spatial_ERC_SRT")
10+
# spe_erc_path <- unzip(spe_erc_path, exdir = tempdir())
11+
# spe_erc <- HDF5Array::loadHDF5SummarizedExperiment(
12+
# file.path(tempdir(), "spe_ERC_annotated")
13+
# )
14+
# spe_erc
15+
# dim: 30494 122202
16+
# lobstr::obj_size(spe_erc) 3.20 GB
17+
#
18+
# ## SCE data
19+
# sce_erc_path <- fetch_data(type = "LFF_spatial_ERC_snRNAseq")
20+
# sce_erc_path <- unzip(sce_erc_path, exdir = tempdir())
21+
# sce_erc <- HDF5Array::loadHDF5SummarizedExperiment(
22+
# file.path(tempdir(), "sce_ERC_subcluster")
23+
# )
24+
# sce_erc
25+
# # dim: 38606 122004
26+
# # lobstr::obj_size(sce_erc) 258.20 MB
27+
#
28+
#
29+
# erc_simple_types <- c("LFF_spatial_ERC_SRT_pseudobulk",
30+
# "LFF_spatial_ERC_SRT_modeling_results",
31+
# "LFF_spatial_ERC_snRNAseq_pseudobulk_broad",
32+
# "LFF_spatial_ERC_snRNAseq_pseudobulk_subcluster",
33+
# "LFF_spatial_ERC_snRNAseq_modeling_results_broad",
34+
# "LFF_spatial_ERC_snRNAseq_modeling_results_subcluster")
35+
#
36+
# names(erc_simple_types) <- erc_simple_types
37+
# erc_data_test <- purrr::map(erc_simple_types, fetch_data)
38+
#
39+
# purrr::map_int(erc_data_test, length)
40+
# purrr::map_chr(erc_data_test, class)
41+
# LFF_spatial_ERC_SRT_pseudobulk LFF_spatial_ERC_SRT_modeling_results
42+
# "SpatialExperiment" "list"
43+
# LFF_spatial_ERC_snRNAseq_pseudobulk_broad LFF_spatial_ERC_snRNAseq_pseudobulk_subcluster
44+
# "SingleCellExperiment" "SingleCellExperiment"
45+
# LFF_spatial_ERC_snRNAseq_modeling_results_broad LFF_spatial_ERC_snRNAseq_modeling_results_subcluster
46+
# "list" "list"

0 commit comments

Comments
 (0)