Skip to content

Commit 3e3dec6

Browse files
committed
[GL_RefAnnotTable] Add Docker/Singularity, fix R lib
1 parent fab25b4 commit 3e3dec6

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

GeneLab_Reference_Annotations/Pipeline_GL-DPPD-7110_Versions/GL-DPPD-7110-A/GL-DPPD-7110-A.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ Current GeneLab annotation tables are available on [figshare](https://figshare.c
182182
## 0. Set Up Environment
183183

184184
```R
185+
# Set R library path to current working directory
186+
lib_path <- file.path(getwd())
187+
.libPaths(lib_path)
188+
185189
# Define variables associated with current pipeline and annotation table versions
186190
GL_DPPD_ID <- "GL-DPPD-7110-A"
187191
ref_tab_path <- "https://raw.githubusercontent.com/nasa/GeneLab_Data_Processing/master/GeneLab_Reference_Annotations/Pipeline_GL-DPPD-7110_Versions/GL-DPPD-7110-A/GL-DPPD-7110-A_annotations.csv"

GeneLab_Reference_Annotations/Workflow_Documentation/GL_RefAnnotTable-A/README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The current GeneLab Reference Annotation Table (GL_RefAnnotTable-A) pipeline is
1010
3. [Setup Execution Permission for Workflow Scripts](#3-setup-execution-permission-for-workflow-scripts)
1111
4. [Run the workflow](#4-run-the-workflow)
1212
5. [Run the annotations database creation function as a stand-alone script](#5-run-the-annotations-database-creation-function-as-a-stand-alone-script)
13+
6. [Run the Workflow Using Docker or Singularity](#6-run-the-workflow-using-docker-or-singularity)
1314
<br>
1415

1516
### 1. Install R and R packages
@@ -103,31 +104,45 @@ Rscript install-org-db.R 'Bacillus subtilis' /path/to/GL-DPPD-7110-A_annotations
103104

104105
- org.*.eg.db/ (species-specific annotation database, as a local R package)
105106

106-
### 6. Run the Workflow Using Docker
107+
### 6. Run the Workflow Using Docker or Singularity
107108

108-
Rather than running the workflow in your local environment, you can use a Docker image. This method ensures that all dependencies are correctly installed.
109+
Rather than running the workflow in your local environment, you can use a Docker or Singularity container. This method ensures that all dependencies are correctly installed.
109110

110-
1. **Pull the Docker image:**
111+
1. **Pull the container image:**
111112

113+
Docker:
112114
```bash
113115
docker pull quay.io/torres-alexis/gl_images:GL_RefAnnotTable_v1.1.0-rc.1
114116
```
115117

118+
Singularity:
119+
```bash
120+
singularity pull docker://quay.io/torres-alexis/gl_images:GL_RefAnnotTable_v1.1.0-rc.1
121+
```
122+
116123
2. **Download the workflow files:**
117124

118125
```bash
119126
curl -LO https://github.com/nasa/GeneLab_Data_Processing/releases/download/GL_RefAnnotTable-A_1.1.0/GL_RefAnnotTable-A_1.1.0.zip
120127
unzip GL_RefAnnotTable-A_1.1.0.zip
121128
```
122129

123-
3. **Run the workflow using Docker:**
130+
3. **Run the workflow:**
124131

132+
Docker:
125133
```bash
126134
docker run -it -v $(pwd)/GL_RefAnnotTable-A_1.1.0:/work \
127135
quay.io/torres-alexis/gl_images:GL_RefAnnotTable_v1.1.0-rc.1 \
128136
bash -c "cd /work && Rscript GL-DPPD-7110-A_build-genome-annots-tab.R 'Mus musculus'"
129137
```
130138

139+
Singularity:
140+
```bash
141+
singularity exec -B $(pwd)/GL_RefAnnotTable-A_1.1.0:/work \
142+
gl_images_GL_RefAnnotTable_v1.1.0-rc.1.sif \
143+
bash -c "cd /work && Rscript GL-DPPD-7110-A_build-genome-annots-tab.R 'Mus musculus'"
144+
```
145+
131146
**Input data:**
132147

133148
- No input files are required. Specify the target organism using a positional command line argument. `Mus musculus` is used in the example above. To see a list of all available organisms, run `Rscript GL-DPPD-7110-A_build-genome-annots-tab.R` without positional arguments. The correct argument for each organism can also be found in the 'species' column of the [GL-DPPD-7110-A_annotations.csv](../../Pipeline_GL-DPPD-7110_Versions/GL-DPPD-7110-A/GL-DPPD-7110-A_annotations.csv)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
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

6+
# Set R library path to current working directory
7+
lib_path <- file.path(getwd())
8+
.libPaths(lib_path)
9+
610
# Define variables associated with current pipeline and annotation table versions
711
GL_DPPD_ID <- "GL-DPPD-7110-A"
812
ref_tab_path <- "https://raw.githubusercontent.com/nasa/GeneLab_Data_Processing/master/GeneLab_Reference_Annotations/Pipeline_GL-DPPD-7110_Versions/GL-DPPD-7110-A/GL-DPPD-7110-A_annotations.csv"

0 commit comments

Comments
 (0)