Skip to content

Commit

Permalink
Updated installation instructions, messages for installing optional d…
Browse files Browse the repository at this point in the history
…ependencies, and vignette documentation
  • Loading branch information
Thomas-Rauter committed Jan 13, 2025
1 parent 1b29ae7 commit 7cccfdf
Show file tree
Hide file tree
Showing 12 changed files with 341 additions and 161 deletions.
23 changes: 17 additions & 6 deletions R/open_tutorial_and_template.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ open_tutorial <- function() {
# Check if rstudioapi is installed
if (!requireNamespace("rstudioapi", quietly = TRUE)) {
stop_call_false(
"The 'rstudioapi' package is not installed. ",
"Please install it manually with: install.packages('rstudioapi')."
"The 'rstudioapi' package is not installed.\n",
"Please install it manually (to your custom_lib_path) using the command",
"below and re-run the function:\n\n",
" install.packages('rstudioapi')\n\n",
"This is an optional dependency of the SplineOmics package, ",
"only needed for optional functionality and not part of the core",
"package, which is why it must be installed manually if this function",
"is used."
)
}

Expand Down Expand Up @@ -56,10 +62,15 @@ open_tutorial <- function() {
open_template <- function() {
# Check if rstudioapi is installed
if (!requireNamespace("rstudioapi", quietly = TRUE)) {
stop(
"The 'rstudioapi' package is not installed. ",
"Please install it manually with: install.packages('rstudioapi').",
call. = FALSE
stop_call_false(
"The 'rstudioapi' package is not installed.\n",
"Please install it manually (to your custom_lib_path) using the",
"command below and re-run the function:\n\n",
" install.packages('rstudioapi')\n\n",
"This is an optional dependency of the SplineOmics package, ",
"only needed for optional functionality and not part of the",
"core package, ",
"which is why it must be installed manually if this function is used."
)
}

Expand Down
12 changes: 8 additions & 4 deletions R/preprocess_rna_seq_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,15 @@ preprocess_rna_seq_data <- function(

# Check if edgeR is installed; if not, inform the user
if (!requireNamespace("edgeR", quietly = TRUE)) {
stop(
"The 'edgeR' package is not installed. ",
"Please install it manually using BiocManager::install('edgeR') ",
"and re-run the function."
stop_call_false(
"The 'edgeR' package is not installed.\n",
"Please install it manually (to your custom_lib_path) using the command",
" below and re-run the function:\n\n",
" BiocManager::install('edgeR')\n\n",
"This is an optional dependency of the SplineOmics package, ",
"only needed when working with RNA-seq data."
)

}

design_matrix <- design2design_matrix(
Expand Down
16 changes: 10 additions & 6 deletions R/run_gsea.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ control_inputs_create_gsea_report <- function(

if (!is.null(background)) {
if (!is.character(background)) {
stop("background must be a character vector or NULL.", call. = FALSE)
stop_call_false("background must be a character vector or NULL.")
} else {
check_genes(background)
}
Expand All @@ -199,11 +199,15 @@ control_inputs_create_gsea_report <- function(
ensure_clusterProfiler <- function() {
# Check if clusterProfiler is installed; if not, inform the user
if (!requireNamespace("clusterProfiler", quietly = TRUE)) {
stop(
"The 'clusterProfiler' package is not installed. ",
"Please install it manually using",
"BiocManager::install('clusterProfiler') ",
"and re-run the function."
stop_call_false(
"The 'clusterProfiler' package is not installed.\n",
"Please install it manually (to your custom_lib_path) using the",
"command below and re-run the function:\n\n",
" BiocManager::install('clusterProfiler')\n\n",
"This is an optional dependency of the SplineOmics package, ",
"only needed for optional functionality and not part of the core",
"package, ",
"which is why it must be installed manually if this function is used."
)
}
}
Expand Down
3 changes: 1 addition & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ Follow the steps below to install the `SplineOmics` package from the GitHub repo
Note that some installation paths potentially are not writable on **Windows**. Therefore, it can be necessary to set up a library path and use that path for the installations:

``` r
# Define the custom library path and expand the tilde (~)
custom_lib_path <- path.expand("~/Rlibs")
custom_lib_path <- "C:/Rlibs" # Replace with your desired path

# Create the directory if it doesn't exist
if (!dir.exists(custom_lib_path)) {
Expand Down
403 changes: 283 additions & 120 deletions README.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/articles/RNA-seq analysis.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/articles/get-started.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ articles:
Docker-instructions: Docker-instructions.html
get-started: get-started.html
RNA-seq analysis: RNA-seq analysis.html
last_built: 2025-01-13T13:44Z
last_built: 2025-01-13T15:25Z
urls:
reference: https://csbg.github.io/SplineOmics/reference
article: https://csbg.github.io/SplineOmics/articles
2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions vignettes/RNA-seq analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ contains an interaction effect).

# Perform gene set enrichment analysis (GSEA)

Usually, the final step in such a bioinformatics analysis is GSEA. To
each clustered hit, the respective gene can be assigned and GSEA
performed. For this, the Enrichr databases of choice have to be
downloaded:
Once the clustered hits are identified, a subsequent step to gain biological
insights is to perform GSEA. For this, the respective genes can be assigned to
each clustered hit, and GSEA can be carried out. To proceed, the Enrichr
databases of choice need to be downloaded:

```{r download Enrichr databases, eval = FALSE}
# Specify which databases you want to download from Enrichr
Expand Down
8 changes: 4 additions & 4 deletions vignettes/get-started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,10 @@ contains an interaction effect).

# Perform gene set enrichment analysis (GSEA)

Usually, the final step in such a bioinformatics analysis is GSEA. To
each clustered hit, the respective gene can be assigned and GSEA
performed. For this, the Enrichr databases of choice have to be
downloaded:
Once the clustered hits are identified, a subsequent step to gain biological
insights is to perform GSEA. For this, the respective genes can be assigned to
each clustered hit, and GSEA can be carried out. To proceed, the Enrichr
databases of choice need to be downloaded:

```{r download Enrichr databases, eval = FALSE}
# Specify which databases you want to download from Enrichr
Expand Down

0 comments on commit 7cccfdf

Please sign in to comment.