Skip to content

Commit dcdf589

Browse files
committed
Add r_libs to scrips, readme, standardize notes
1 parent b39c63c commit dcdf589

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

GeneLab_Reference_Annotations/Workflow_Documentation/GL_RefAnnotTable-A/README.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,45 +70,49 @@ This approach allows you to run the workflow within a containerized environment,
7070

7171
Singularity is a containerization platform for running applications portably and reproducibly. We use container images hosted on Quay.io to encapsulate all the necessary software and dependencies required by the GL_RefAnnotTable-A workflow. This setup allows you to run the workflow without installing any software directly on your system.
7272

73-
> ***Note**: Other containerization tools like Docker or Apptainer can also be used to pull and run these images.*
73+
> **Note**: Other containerization tools like Docker or Apptainer can also be used to pull and run these images.
7474
7575

7676
We recommend installing Singularity system-wide as per the official [Singularity installation documentation](https://docs.sylabs.io/guides/3.10/admin-guide/admin_quickstart.html).
7777

7878

79-
> ***Note**: While Singularity is also available through [Anaconda](https://anaconda.org/conda-forge/singularity), we recommend installing Singularity system-wide following the official installation documentation.*
79+
> **Note**: While Singularity is also available through [Anaconda](https://anaconda.org/conda-forge/singularity), we recommend installing Singularity system-wide following the official installation documentation.
8080
8181
<br>
8282

8383
#### Step 2: Fetch the Singularity Image
8484

8585
To pull the Singularity image needed for the workflow, you can use the provided script as directed below or pull the image directly.
8686

87-
> ***Note**: This command should be run in the location containing the `GL_RefAnnotTable-A_1.1.0` directory that was downloaded in [step 1](#1-download-the-workflow-files). Depending on your network speed, fetching the images will take approximately 20 minutes.*
88-
87+
> **Note**: This command should be run in the location containing the `GL_RefAnnotTable-A_1.1.0` directory that was downloaded in [step 1](#1-download-the-workflow-files). Depending on your network speed, fetching the images will take approximately 20 minutes.
8988
9089
```bash
9190
bash GL_RefAnnotTable-A_1.1.0/bin/prepull_singularity.sh GL_RefAnnotTable-A_1.1.0/config/software/by_docker_image.config
9291
```
9392

94-
Once complete, a `singularity` folder containing the Singularity images will be created. Run the following command to export this folder as an environment variable:
95-
93+
Once complete, a `singularity` folder containing the Singularity images will be created. Next, set up the required environment variables:
9694

9795
```bash
96+
# Set R library path to current working directory
97+
export R_LIBS_USER=$(pwd)/R_libs
98+
99+
# Set Singularity cache directory
98100
export SINGULARITY_CACHEDIR=$(pwd)/singularity
99101
```
100102

101103
<br>
102104

103105
#### Step 3: Run the Workflow
104106

105-
While in the directory containing the `GL_RefAnnotTable-A_1.1.0` folder that was downloaded in [step 1](#1-download-the-workflow-files), you can now run the workflow. Below is an example for generating the annotation table for *Mus musculus* (mouse):
106-
107+
> **Note**: The annotation database creation process requires FTP access through port 21. If you encounter connection issues, please verify that port 21 is not blocked by your network/firewall settings or try running the workflow on a system with unrestricted FTP access.
108+
109+
While in the directory containing the `GL_RefAnnotTable-A_1.1.0` folder that was downloaded in [step 1](#1-download-the-workflow-files), you can now run the workflow. Below is an example for generating the annotation table for *Mus musculus* (mouse):
107110

108111
```bash
109-
singularity exec -B $(pwd)/GL_RefAnnotTable-A_1.1.0:$(pwd)/GL_RefAnnotTable-A_1.1.0 \
110-
$SINGULARITY_CACHEDIR/quay.io-nasa_genelab-gl-refannottable-a-1.1.0.img \
111-
Rscript GL_RefAnnotTable-A_1.1.0/GL-DPPD-7110-A_build-genome-annots-tab.R 'Mus musculus'
112+
singularity exec \
113+
--bind $(pwd):$(pwd) \
114+
$SINGULARITY_CACHEDIR/quay.io-nasa_genelab-gl-refannottable-a-1.1.0.img \
115+
Rscript GL_RefAnnotTable-A_1.1.0/GL-DPPD-7110-A_build-genome-annots-tab.R 'Mus musculus'
112116
```
113117

114118
<br>
@@ -206,12 +210,18 @@ If the reference table does not specify an annotations database for the target o
206210

207211
#### Using Singularity
208212

213+
> **Note**: The annotation database creation process requires FTP access through port 21. If you encounter connection issues, please verify that port 21 is not blocked by your network/firewall settings.
214+
209215
```bash
210-
singularity exec -B $(pwd)/GL_RefAnnotTable-A_1.1.0:$(pwd)/GL_RefAnnotTable-A_1.1.0 \
211-
$SINGULARITY_CACHEDIR/quay.io-nasa_genelab-gl-refannottable-a-1.1.0.img \
212-
Rscript GL_RefAnnotTable-A_1.1.0/install-org-db.R 'Bacillus subtilis'
216+
# Set R library path if not already set
217+
export R_LIBS_USER=$(pwd)/R_libs
218+
219+
singularity exec \
220+
--bind $(pwd):$(pwd) \
221+
$SINGULARITY_CACHEDIR/quay.io-nasa_genelab-gl-refannottable-a-1.1.0.img \
222+
Rscript GL_RefAnnotTable-A_1.1.0/install-org-db.R 'Bacillus subtilis'
213223
```
214-
224+
215225
<br>
216226

217227
#### Using a Local R Environment

GeneLab_Reference_Annotations/Workflow_Documentation/GL_RefAnnotTable-A/workflow_code/GL-DPPD-7110-A_build-genome-annots-tab.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# GeneLab script for generating organism-specific gene annotation tables
44
# Example usage: Rscript GL-DPPD-7110-A_build-genome-annots-tab.R 'Mus musculus'
55
options(timeout = 3600)
6-
6+
.libPaths(Sys.getenv("R_LIBS_USER"))
77
# Define variables associated with current pipeline and annotation table versions
88
GL_DPPD_ID <- "GL-DPPD-7110-A"
99
workflow_version <- "GL_RefAnnotTable-A_1.1.0"

GeneLab_Reference_Annotations/Workflow_Documentation/GL_RefAnnotTable-A/workflow_code/install-org-db.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# install-org-db.R
22
options(timeout=3600)
3+
.libPaths(Sys.getenv("R_LIBS_USER"))
34
# Load required libraries
45
library(tidyverse)
56
library(AnnotationForge)

0 commit comments

Comments
 (0)