README.md 8.15 KB
Newer Older
Gael  MILLOT's avatar
Gael MILLOT committed
1
2
3
[//]: # "#to make links in gitlab: example with racon https://github.com/isovic/racon"
[//]: # "tricks in markdown: https://openclassrooms.com/fr/courses/1304236-redigez-en-markdown"

4
5
6
7
8

[![Nextflow](https://img.shields.io/badge/code-Nextflow-blue?style=plastic)](https://www.nextflow.io/)
 
[![License: GPL-3.0](https://img.shields.io/badge/licence-GPL%20(%3E%3D3)-green?style=plastic)](https://www.gnu.org/licenses)

Gael  MILLOT's avatar
Gael MILLOT committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30


## TABLE OF CONTENTS


   - [AIM](#aim)
   - [CONTENT](#content)
   - [HOW TO RUN](#how-to-run)
   - [OUTPUT](#output)
   - [VERSIONS](#versions)
   - [LICENCE](#licence)
   - [CITATION](#citation)
   - [CREDITS](#credits)
   - [ACKNOWLEDGEMENTS](#Acknowledgements)
   - [WHAT'S NEW IN](#what's-new-in)


## AIM




Gael  MILLOT's avatar
test 5'    
Gael MILLOT committed
31

Gael  MILLOT's avatar
Gael MILLOT committed
32
33
## CONTENT

34
35
36
37
38
39
40
41
42
43
44
45
**main.nf** file that can be executed using a CLI (command line interface)

**nextflow.config** parameter settings for the main.nf file

**dataset** folder containing some datasets than can be used as examples

test.fastq.gz: first 4,000 lines of Pool-B2699_S1_L001_R1_001.fastq.gz from /pasteur/zeus/projets/p01/BioIT/gmillot/14985_loot/dataset/B2699/00_Rawdata/Pool-B2699_S1_L001_R1_001.fastq.gz

primer_fasta: from /pasteur/zeus/projets/p01/BioIT/gmillot/14985_loot/results/20200520_res_CL14985_newtrim_align/20200520_adapters_TruSeq_B2699_14985_CL.fasta

**example_of_result** folder containing an example of result obtained with the dataset

Gael  MILLOT's avatar
Gael MILLOT committed
46
47
48
49
50
51
52
53



## HOW TO RUN

See Protocol 136 (ask me).


Gael  MILLOT's avatar
Gael MILLOT committed
54
### If error message
Gael's avatar
tempo    
Gael committed
55
56
57
58
59
60
61
62
63
64
65

If an error message appears, like:
```
Unknown error accessing project `gmillot/14985_loot` -- Repository may be corrupted: /pasteur/sonic/homes/gmillot/.nextflow/assets/gmillot/14985_loot
```
Purge using:
```
rm -rf /pasteur/sonic/homes/gmillot/.nextflow/assets/gmillot*
```


Gael  MILLOT's avatar
Gael MILLOT committed
66
67
### Using the committed version on gitlab:

Gael  MILLOT's avatar
Gael MILLOT committed
68
1) Create the scm file:
Gael  MILLOT's avatar
Gael MILLOT committed
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

```bash
providers {
    pasteur {
        server = 'https://gitlab.pasteur.fr'
        platform = 'gitlab'
    }
}
```

And save it as 'scm' in the .nextflow folder. For instance in:
\\wsl$\Ubuntu-20.04\home\gael\.nextflow

Warning: ssh key must be set for gitlab, to be able to use this procedure (see protocol 44).

84

Gael  MILLOT's avatar
Gael MILLOT committed
85
2) Mount a server if required:
Gael's avatar
tempo    
Gael committed
86
87

```bash
Gael  MILLOT's avatar
Gael MILLOT committed
88
DRIVE="C"
Gael's avatar
tempo    
Gael committed
89
90
91
92
sudo mkdir /mnt/share
sudo mount -t drvfs $DRIVE: /mnt/share
```

93
94
95
96
97
98
Warning: if no mounting, it is possible that nextflow does nothing, or displays a message like
```
Launching `main.nf` [loving_morse] - revision: d5aabe528b
/mnt/share/Users
```

Gael  MILLOT's avatar
Gael MILLOT committed
99
100

3) Then run the following command from here \\wsl$\Ubuntu-20.04\home\gael:
Gael  MILLOT's avatar
Gael MILLOT committed
101
102

```bash
Gael  MILLOT's avatar
Gael MILLOT committed
103
nextflow run -hub pasteur gmillot/08002_bourgeron -r v1.0.0
Gael  MILLOT's avatar
Gael MILLOT committed
104
105
```

Gael's avatar
tempo    
Gael committed
106
107
108
109
110
111
If an error message appears, like:
```
WARN: Cannot read project manifest -- Cause: Remote resource not found: https://gitlab.pasteur.fr/api/v4/projects/gmillot%2F08002_bourgeron
```
Make the distant repo public

Gael  MILLOT's avatar
Gael MILLOT committed
112
113
114
115
116
117
118
119
If an error message appears, like:

```
permission denied
```

See chmod in protocol 44.

Gael  MILLOT's avatar
Gael MILLOT committed
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134

### Using a cluster

Start with:

```bash
EXEC_PATH="/pasteur/zeus/projets/p01/BioIT/gmillot/14985_loot" # where the bin folder of the main.nf script is located
export CONF_BEFORE=/opt/gensoft/exe # on maestro

export JAVA_CONF=java/13.0.2
export JAVA_CONF_AFTER=bin/java # on maestro
export SINGU_CONF=singularity/3.8.3
export SINGU_CONF_AFTER=bin/singularity # on maestro
export GIT_CONF=git/2.25.0
export GIT_CONF_AFTER=bin/git # on maestro
135
export GRAPHVIZ_CONF=graphviz/2.42.3
Gael  MILLOT's avatar
Gael MILLOT committed
136
export GRAPHVIZ_CONF_AFTER=bin/graphviz # on maestro
Gael  MILLOT's avatar
Gael MILLOT committed
137

Gael  MILLOT's avatar
Gael MILLOT committed
138
MODULES="${CONF_BEFORE}/${JAVA_CONF}/${JAVA_CONF_AFTER},${CONF_BEFORE}/${SINGU_CONF}/${SINGU_CONF_AFTER},${CONF_BEFORE}/${GIT_CONF}/${GIT_CONF_AFTER},${CONF_BEFORE}/${GRAPHVIZ_CONF}/${GRAPHVIZ_CONF_AFTER}"
Gael  MILLOT's avatar
test 5'    
Gael MILLOT committed
139
140
# cd ${EXEC_PATH} # not required when using the gitlab repo to run the script
# chmod 755 ${EXEC_PATH}/bin/*.* # not required when using the gitlab repo to run the script
Gael  MILLOT's avatar
Gael MILLOT committed
141
module load ${JAVA_CONF} ${SINGU_CONF} ${GIT_CONF} ${GRAPHVIZ_CONF}
Gael  MILLOT's avatar
Gael MILLOT committed
142
143
144
145
146
147

```

Then run:

```bash
Gael  MILLOT's avatar
Gael MILLOT committed
148
# distant main.nf file
149
HOME="$ZEUSHOME/14985_loot/" ; nextflow run --modules ${MODULES} -hub pasteur gmillot/14985_loot -r v7.10.0 -c $HOME/nextflow.config ; HOME="/pasteur/appa/homes/gmillot/"
Gael  MILLOT's avatar
Gael MILLOT committed
150
151

# local main.nf file ($HOME changed to allow the creation of .nextflow into /$ZEUSHOME/14985_loot/. See NFX_HOME in the nextflow soft script)
152
HOME="$ZEUSHOME/14985_loot/" ; nextflow run --modules ${MODULES} main.nf ; HOME="/pasteur/appa/homes/gmillot/"
Gael  MILLOT's avatar
Gael MILLOT committed
153
154
155
156
157
158
```


## OUTPUT


159
160
161
162
163
164
165
166
167
168
169
**report.html** report of the analysis

**reports** folder containing all the reports of the different processes as well as the **nextflow.config** file used

**files** folder containing some of the output files of the processes

**figures** folder containing all the figures in the **report.html** in the .png format

**fastQC1** folder containing the results of the first read QC, after removal of reads containing only N and after primer trimming by AlienTrimmer

**fastQC2** folder containing the results of the second read QC, selection of reads with a specific sequence in 5' and after removing 
Gael  MILLOT's avatar
Gael MILLOT committed
170
171
172
173
174


## VERSIONS


Gael's avatar
tempo    
Gael committed
175
The different releases are tagged [here](https://gitlab.pasteur.fr/gmillot/14985_loot/-/tags)
Gael  MILLOT's avatar
Gael MILLOT committed
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


## LICENCE


This package of scripts can be redistributed and/or modified under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchandability or fitness for a particular purpose.
See the GNU General Public License for more details at https://www.gnu.org/licenses.


## CITATION


Not yet published


## CREDITS


[Gael A. Millot](https://gitlab.pasteur.fr/gmillot), Hub-CBD, Institut Pasteur, Paris, France


## ACKNOWLEDGEMENTS


Frédéric Lemoine, Hub-CBD, Institut Pasteur, Paris

Bertrand Néron, Hub-CBD, Institut Pasteur, Paris

The mentioned softwares and packages developers & maintainers

Gitlab developers


## WHAT'S NEW IN

212
213
214
215
216
### v8.6.0

1) Figure 21 and 44 modified.


217
218
219
220
221
### v8.5.0

1) Some figures corrected, computations of number of insertions also and the duplicated part is now ok


222
223
224
225
226
### v8.4.0

1) Same bug fixed elsewhere


227
228
229
230
231
### v8.3.0

1) Small bug removed: now same orientation plotted in the CDS plots


232
233
234
235
236
### v8.2.0

1) All the problems should be solved in this version


237
238
### v8.1.0

239
1) Display improvement. But still problem when using the option -resume of nextflow run
240
241


242
243
244
245
246
247
248
### v8.0.0

1) Many things added.

2) Operational version for Ecoli. But Warning: still problem when using the option -resume of nextflow run, notably including a wrong figure 38, because of all the code between processes in the main.nf file that are not controled by the cache system


249
250
251
252
253
### v7.10.0

1) Pointing to the singularity folder improved, new option "slurm_local" added better worflow report


254
255
256
257
258
### v7.9.0

1) Pipeline improved


259
260
261
262
263
### v7.8.0

1) Pipeline improved


264
265
266
267
268
### v7.7.0

1) Kraken added and multiQC fixed


269
270
271
272
273
### v7.6.0

1) Everything's fine, except the multiQC


274
275
276
277
278
### v7.5.0

1) Ok up to the plot_insertion process, tested using the test file


279
280
281
282
283
### v7.4.0

1) Ok up to global logo, tested using the test file


284
285
286
287
288
### v7.3.0

1) flow and files improved by Fred, because of the relative paths, no need of dev/


289
290
291
292
293
### v7.2.0

1) better priority for slurm


294
295
296
297
### v7.1.0

1) dev/test.config adapted to slurm

298

Gael  MILLOT's avatar
Gael MILLOT committed
299
300
301
302
303
### v7.0.0

1) Ok up to insertion freq, tested using the test file


304
305
306
307
308
### v6.1.0

1) config file debugged


309
310
311
312
313
### v6.0.0

1) Ok up to q20 tested using the test file


314
315
316
317
318
### v5.1.0

1) html report improved a bit


319
320
321
322
323
### v5.0.0

1) Now the results are compiled in a html report


324
325
326
327
### v4.1.0

1) Ok up to plot after attC read selection and attC trimming, tested on full B2699, and debugged

Gael  MILLOT's avatar
Gael MILLOT committed
328

329
330
331
332
333
### v4.0.0

1) Ok up to plot after attC read selection and attC trimming, tested on full B2699


Gael  MILLOT's avatar
Gael MILLOT committed
334
335
336
337
338
### v3.1.0

1) report improved


Gael  MILLOT's avatar
Gael MILLOT committed
339
340
341
342
### v3.0.0

1) Ok up to plot after attC read selection and attC trimming

Gael  MILLOT's avatar
Gael MILLOT committed
343

344
345
346
347
348
### v2.0.0

1) Ok up to fastq files QC


Gael  MILLOT's avatar
Gael MILLOT committed
349
350
351
352
353
354
### v1.0.0

1) Backbone for nextflow scripts and config files