Newer
Older
# RNAja
[](https://www.python.org/downloads)
[](https://snakemake.readthedocs.io)
[](https://sylabs.io/docs/)
RNAja is a pipeline written in snakemake, allowing to analyse RNAseq data, perform differential expression analysis using several mappers and counters. RNAja is the only pipeline able to compare method effects over DE genes.

## 1. Install dependencies and clone RNAja
Check dependencies for RNAja : Python < 3.12.0 and Snakemake >= 7.32.4
Here, you can install RNAja from the gitlab source code such as :
``` bash
git clone git@forge.ird.fr:phim/rnaja-pipeline.git
cd rnaja-pipeline
python3 -m pip install .
# in edition mode (for developpers and debuging)
#python3 -m pip install -e .
```
Don't forget to export RNAja into the $PATH environment path by
``` bash
export PATH=/home/$USER/.local/bin/:$PATH`
```
### 1.1 Installing in local mode
```bash
RNAja install_local --help
RNAja install_local
```
### 1.2 Installing in cluster mode
Install RNAja in cluster mode using **singularity** container from rnaja_utilities https://itrop.ird.fr/RNAja_utilities/
```bash
RNAja install_cluster --help
RNAja install_cluster --scheduler slurm --env singularity
```
Please run command line 'RNAja edit_cluster_config' before the first run of RNAja see https://forge.ird.fr/phim/rnaja-pipeline/README.md and configure by default threads and memory resources.
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Feel free to modify resources (RAM, CPU number and partition) using the rules names found above.
```
rule hisat2_index
rule hisat2_map
rule star_index
rule star_map_count
rule star_to_diffex
rule samtools_stats
rule multiqc
rule stringtie_discovery
rule stringtie_gtf_list_discovery
rule merge_stringtie_gtf_discovery
rule stringtie
rule stringtie_gtf_list
rule merge_stringtie_gtf
rule list_for_prepDE
rule prepDE_stringtie_table
rule htseq_count
rule htseq_to_diffex
rule diff_exp_analysis
```
In the `cluster_config.yaml` file adapt ressources as in this example adapted:
```
_default__:
cpus-per-task: 4
mem-per-cpu: 3G
partition : normal
output: '{log.output}_cluster'
error: '{log.error}_cluster'
job-name: '{rule}.{wildcards}'
rule stringtie_discovery
nodelist: node4
cpus-per-task: 8
mem-per-cpu: 6G
partition: highmem
```
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
## 2. Running a datatest
Running a test to be sure of RNAja installation. RNAja `test_install` download an available dataset from a distant server (RNAja_utilities i-Trop). Pipeline tests are launched in a repertory (option -d DIR_NAME) created by RNAja.
```bash
RNAja test_install --help
RNAja test_install -d TEST
```
### 2.1 Running your data in LOCAL mode
launching suggested command line done by RNAja, in LOCAL mode:
```bash
RNAja run_local --help
RNAja run_local -t 8 -c TEST/data_test_config.yaml --singularity-args "--bind $HOME"
```
In local mode, it's possible to allocate threads to some rules using `--set-threads` snakemake argument such as
```
RNAja run_local -t 8 -c TEST/data_test_config.yaml --set-threads hisat2_index=4 hisat2_map_paired=2
```
### 2.2 Running your data in CLUSTER mode
Now you can launch suggested command line done by RNAja in `cluster` mode BUT before you need to configurate cluster parameters running command line `RNAja edit_cluster_config` before the first run and modify threads, ram, node and computer resources.
RNAja does a copy of `cluster_config.yaml` file into your home `"/home/$USER/.config/rnaja_pipeline/cluster_config.yaml"`
```bash
RNAja run_cluster --help
RNAja edit_cluster_config
```
If singularity was selected in installation of RNAja, it could be needed to give argument `--singularity-args \"--bind $HOME\"` to RNAja, by using :
```bash
RNAja run_cluster --help
RNAja run_cluster -c TEST/data_test_config.yaml --singularity-args "--bind $HOME"
# here a example adapted to @IFB HPC
RNAja run_cluster -c TEST/data_test_config.yaml --singularity-args "--bind /shared:/shared"
#you can also use snakemake parameters as
RNAja run_cluster -c TEST/data_test_config.yaml --singularity-args "--bind $HOME" --rerun-incomplete --nolock
**Important Note** : In IRD "i-Trop" cluster, run RNAja using ONLY a node, data has to be in "/scratch" of chosen node. Use `nodelist : nodeX` parameter inside of `cluster_config.yaml`̀ file.
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
## 3. Running your data
### 3.1.create a pipeline by configuring the `config.yaml` file
Before to run RNAja, create a `config.yaml` by using before to adapt it.
```
RNAja create_config
```
Three sections are needed for RNAja into the `config.yaml` file: section DATA, MODE and PARAMS.
### DATA section
Adapt `config.yaml` file with path to fastq files, reference and annotation file in the `DATA section` as well as the output directory.
```
DATA:
fastq_dir: "/path/to/FASTQ"
reference: "/path/to/reference/ref.fna"
annotation: "/path/to/reference/ref.gtf"
output_dir: "RNAJA_OUTPUT"
```
### MODE section
Five pipelines can be running in parallel by using RNAja !
We have included for instance two mappers (STAR and HISAT2) and 3 counters (STRINGTIE, HTSEQCOUNT,STAR). You can activate or deactivate pipelines you would run in the MODE section such as ...
```
MODE:
HISAT2_STRINGTIE: true
HISAT2_HTSEQCOUNT: true
STARmap_STARcount: true
STARmap_HTSEQCOUNT: true
STARmap_STRINGTIE: true
```
### PARAMS section
In the PARAMS section, tools parameters can be modified and adapted.
```
PARAMS:
HISAT2:
indexation:
prefix: "REF"
STAR:
indexation:
params: "--sjdbOverhang 100 --genomeSAindexNbases 10"
mapping:
params: "--readFilesCommand zcat" # --outFilterMismatchNoverLmax 0.03
STRINGTIE:
discovery_mode : false
HTSEQCOUNT:
params: "-r pos -s reverse -m union -t gene "
```
You can modify `HISAT2` indexation, `STAR` indexation and mapping options, change `STRINGTIE` mode (discovery or not) as well as `HTSEQCOUNT` params. Feel free to check documentation of these tools before to run RNAja!
#### output
Here an example of `output_dir` if you have activated all five pipelines proposed by RNAja.
```commandline
RNAJA_OUTPUT/
├── COUNT
│ ├── HTSEQCOUNT
│ │ ├── HISAT2
│ │ └── STAR
│ ├── STAR
│ │ ├── Batch-rep1Aligned.out.bam
│ │ ├── Batch-rep1Aligned.toTranscriptome.out.bam
│ │ ├── Batch-rep1Log.final.out
│ │ ├── Batch-rep1Log.out
│ │ ├── Batch-rep1Log.progress.out
│ │ ├── Batch-rep1ReadsPerGene.out.tab
│ │ ├── Batch-rep1SJ.out.tab
...
│ │ ├── CENPK-rep1Aligned.out.bam
│ │ ├── CENPK-rep1Aligned.toTranscriptome.out.bam
│ │ ├── CENPK-rep1Log.final.out
│ │ ├── CENPK-rep1Log.out
│ │ ├── CENPK-rep1Log.progress.out
│ │ ├── CENPK-rep1ReadsPerGene.out.tab
│ │ ├── CENPK-rep1SJ.out.tab
...
│ └── STRINGTIE
│ ├── HISAT2_Batch-rep1.gtf
│ ├── HISAT2_Batch-rep1.tsv
...
│ ├── HISAT2_CENPK-rep3.gtf
│ ├── HISAT2_CENPK-rep3.tsv
│ ├── STAR_Batch-rep1.gtf
│ ├── STAR_Batch-rep1.tsv
...
│ ├── STAR_CENPK-rep3.gtf
│ ├── STAR_CENPK-rep3.tsv
├── LOGS
├── MAPPING
│ ├── HISAT2
│ │ ├── Batch-rep1.bam
│ │ ├── Batch-rep1.bam.csi
│ │ ├── Batch-rep1_HISAT_summary.txt
...
│ │ ├── CENPK-rep3.bam
│ │ ├── CENPK-rep3.bam.csi
│ │ └── CENPK-rep3_HISAT_summary.txt
│ └── STAR
│ ├── Batch-rep1.bam
│ ├── Batch-rep1.bam.csi
...
│ ├── CENPK-rep3.bam
│ └── CENPK-rep3.bam.csi
├── REF
│ ├── HISAT2
│ │ ├── GCF_000146045.2_R64_genomic.fasta -> /scratch/rnaja_test/TEST/DATA_TEST/REF/GCF_000146045.2_R64_genomic.fna
│ └── STAR
│ ├── chrLength.txt
│ ├── chrNameLength.txt
│ ├── chrName.txt
│ ├── chrStart.txt
│ ├── exonGeTrInfo.tab
│ ├── exonInfo.tab
│ ├── GCF_000146045.2_R64_genomic.fasta -> /scratch/rnaja_test/TEST/DATA_TEST/REF/GCF_000146045.2_R64_genomic.fna
│ ├── geneInfo.tab
│ ├── Genome
│ ├── genomeParameters.txt
│ ├── Log.out
│ ├── SA
│ ├── SAindex
│ ├── sjdbInfo.txt
│ ├── sjdbList.fromGTF.out.tab
│ ├── sjdbList.out.tab
│ └── transcriptInfo.tab
└── slurm_logs
```
-----------------------
### Authors
* Aurore Comte (IRD), Christine Tranchant (IRD), Julie Orjuela (IRD)
Some parts of RNAja code and documentation were inspired or came from the pipelines below.
- Culebront (Julie Orjuela *et al.*) https://github.com/SouthGreenPlatform/culebrONT
- sRNAmake (Sebastien Cunnac *et al.*) https://github.com/Aucomte/sRNAmake
- BulkRNA (Camille Cohen) https://github.com/CamilleCohen/ProjetTuteur-_BulkRNA
RNAja uses really nice python package **SnakEcdysis** https://snakecdysis.readthedocs.io/en/latest/package.html to perform installation and execution in local and cluster mode. SnakEcdysis is developed by Sébastien Ravel (CIRAD).
-----------------------
## Acknowledgements
Thanks to Ndomassi Tando (i-Trop IRD) by administration support.
The authors acknowledge the IRD i-Trop HPC <https://bioinfo.ird.fr/> (South Green Platform <http://www.southgreen.fr>) at IRD Montpellier for providing HPC resources that have contributed to this work.
Thanks to Alexis Dereeper for his help and the development of diffexDB <https://bioinfo-web.mpl.ird.fr/cgi-bin2/microarray/public/diffexdb.cgi>.
Licenced under MIT https://opensource.org/license/mit/.
Intellectual property belongs to IRD and authors.