Skip to content

Commit

Permalink
use all metadata files
Browse files Browse the repository at this point in the history
  • Loading branch information
lgatto committed Mar 16, 2024
1 parent 3ecd537 commit f5efc8a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: depmap
Type: Package
Title: Cancer Dependency Map Data Package
Version: 1.17.3
Version: 1.17.4
Authors@R: c(person(given = "Laurent", family = "Gatto",
email = "laurent.gatto@uclouvain.be",
comment = c(ORCID = "0000-0002-1520-2268"),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# depmap 1.17

## Changes in version 1.17.4

- Fix .onLoad() to create Hub accessors for all experiments, including
older versions.

## Changes in version 1.17.3

- Bump version to publish latest vignette updates.
Expand Down
19 changes: 8 additions & 11 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
##' @importFrom utils read.csv
##' @importFrom ExperimentHub createHubAccessors
.onLoad <- function(libname, pkgname) {
# fls <- dir(system.file("extdata", package = pkgname),
# full.names = TRUE,
# pattern = "metadata")
# sapply(fls, function(fl) {
# titles <- read.table(fl, stringsAsFactors = FALSE)$Title
# createHubAccessors(pkgname, titles)
# })
fl <- system.file("extdata", "metadata_22Q1.csv", package = pkgname)
titles <- utils::read.csv(fl, stringsAsFactors = FALSE)$Title
ExperimentHub::createHubAccessors(pkgname, titles)
fls <- dir(system.file("extdata", package = pkgname),
full.names = TRUE, pattern = "metadata")
sapply(fls,
function(fl) {
titles <- read.csv(fl, stringsAsFactors = FALSE)$Title
ExperimentHub::createHubAccessors(pkgname, titles)
})
}

.onAttach <- function(libname, pkgname) {
packageStartupMessage(paste0("This is depmap release ", depmap_release()))
}

0 comments on commit f5efc8a

Please sign in to comment.