-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
602 additions
and
664 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
Type: Package | ||
Package: msigdbr | ||
Title: MSigDB Gene Sets for Multiple Organisms in a Tidy Data Format | ||
Version: 2023.1.1 | ||
Version: 9.0.0.9000 | ||
Authors@R: | ||
person("Igor", "Dolgalev", , "[email protected]", role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0003-4451-126X")) | ||
Description: Provides the 'Molecular Signatures Database' (MSigDB) gene | ||
sets typically used with the 'Gene Set Enrichment Analysis' (GSEA) | ||
software (Subramanian et al. 2005 <doi:10.1073/pnas.0506580102>, | ||
Liberzon et al. 2015 <doi:10.1016/j.cels.2015.12.004>) in a standard R | ||
data frame with key-value pairs. The package includes the human genes | ||
as listed in MSigDB as well as the corresponding symbols and IDs for | ||
frequently studied model organisms such as mouse, rat, pig, fly, and | ||
yeast. | ||
Liberzon et al. 2015 <doi:10.1016/j.cels.2015.12.004>, Castanza et al. | ||
2023 <doi:10.1038/s41592-023-02014-7>) as an R data frame. The package | ||
includes the human genes as listed in MSigDB as well as the | ||
corresponding symbols and IDs for frequently studied model organisms | ||
such as mouse, rat, pig, fly, and yeast. | ||
License: MIT + file LICENSE | ||
URL: https://igordot.github.io/msigdbr/ | ||
BugReports: https://github.com/igordot/msigdbr/issues | ||
Depends: | ||
R (>= 3.6) | ||
R (>= 4.1) | ||
Imports: | ||
babelgene (>= 22.9), | ||
dplyr (>= 1.1.1), | ||
magrittr, | ||
lifecycle, | ||
methods, | ||
rlang, | ||
tibble, | ||
tidyselect | ||
tidyselect (>= 1.2.0) | ||
Suggests: | ||
knitr, | ||
msigdbdf, | ||
rmarkdown, | ||
roxygen2, | ||
testthat | ||
VignetteBuilder: | ||
knitr | ||
Additional_repositories: https://igordot.r-universe.dev | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#' Check that the data package is installed | ||
#' | ||
#' Check that the 'msigdbdf' data package is installed. | ||
#' If not, provide instructions for installation. | ||
#' A dependency listed in DESCRIPTION Suggests is not guaranteed to be installed. | ||
#' | ||
#' @importFrom utils install.packages menu | ||
msigdbr_check_data <- function() { | ||
if (!requireNamespace("msigdbdf", quietly = TRUE)) { | ||
message("The 'msigdbdf' package must be installed.") | ||
|
||
install_instructions <- paste0( | ||
"Please run the following command to install the 'msigdbdf' package:\n", | ||
"install.packages('msigdbdf', repos = 'https://igordot.r-universe.dev')" | ||
) | ||
|
||
error_message <- function(e) { | ||
message(e) | ||
cat(paste0("\nFailed to install the 'msigdbdf' package.\n", install_instructions, "\n")) | ||
} | ||
|
||
if (interactive()) { | ||
# If running R interactively | ||
input <- utils::menu(c("Yes", "No"), title = "Would you like to install 'msigdbdf'?") | ||
if (input == 1) { | ||
# Answered "Yes" | ||
message("Installing the 'msigdbdf' package.") | ||
tryCatch( | ||
utils::install.packages("msigdbdf", repos = c("https://igordot.r-universe.dev", getOption("repos"))), | ||
error = error_message, warning = error_message | ||
) | ||
} else { | ||
# Answered "No" | ||
stop(install_instructions) | ||
} | ||
} else { | ||
# If not running R interactively | ||
stop(install_instructions) | ||
} | ||
} | ||
} | ||
|
||
.onAttach <- function(libname, pkgname) { | ||
if (!requireNamespace("msigdbdf", quietly = TRUE)) { | ||
packageStartupMessage( | ||
"To access all the data, please install the 'msigdbdf' package with:\n", | ||
"install.packages('msigdbdf', repos = 'https://igordot.r-universe.dev')" | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#' @keywords internal | ||
"_PACKAGE" | ||
|
||
## usethis namespace: start | ||
#' @import tibble | ||
#' @import tidyselect | ||
#' @importFrom lifecycle deprecated is_present | ||
#' @importFrom methods is | ||
#' @importFrom rlang .data check_installed | ||
## usethis namespace: end | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.