Skip to content

Commit 95ea13e

Browse files
committed
Formatted nextflow.contig
1 parent 286e3da commit 95ea13e

File tree

1 file changed

+68
-40
lines changed
  • Amplicon/Illumina/Workflow_Documentation/SW_AmpIllumina-B/workflow_code

1 file changed

+68
-40
lines changed

Amplicon/Illumina/Workflow_Documentation/SW_AmpIllumina-B/workflow_code/nextflow.config

Lines changed: 68 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
1+
//**************** Global parameters *****************//
22
params {
33
// Mandatory parameters
44
target_region = "16S" // "16S", "18S", "ITS"
55
raw_R1_suffix = "_R1_raw.fastq.gz"
66
raw_R2_suffix = "_R2_raw.fastq.gz"
77
raw_reads_dir = "../Raw_Sequence_Data/"
8-
trim_primers = true
8+
trim_primers = true // true or false
99

1010

11-
// -------- Mandatory if not using GLDS_accession ---------------------------------//
11+
// -------- Required if GLDS_accession is false ---------------//
1212
// A 3-column (single-end) or 4-column (paired-end) input file ( sample_id, forward, [reverse,] paired)
1313
csv_file = "PE_file.csv"
1414

@@ -21,106 +21,125 @@ params {
2121
// -------- End of Mandatory if not using GLDS_accession ----------------//
2222

2323
// Cutadapt parameters
24-
min_cutadapt_len = 130
25-
primers_linked = "TRUE"
26-
discard_untrimmed = "TRUE"
24+
min_cutadapt_len = 130
25+
primers_linked = "TRUE"
26+
discard_untrimmed = "TRUE"
2727
F_primer = ""
2828
R_primer = ""
2929

3030
// Dada2 parameters
31-
left_trunc = 0
32-
right_trunc = 0
33-
left_maxEE = 1
34-
right_maxEE = 1
31+
left_trunc = 0
32+
right_trunc = 0
33+
left_maxEE = 1
34+
right_maxEE = 1
3535
concatenate_reads_only = "FALSE"
3636

3737
// If using conda environments specify their locations so new ones won't be created
3838
conda{
39-
// Specify the paths to your existing conda environments (/path/to/envs/genelab-utils)
39+
// Specify the paths to existing conda environments (/path/to/envs/genelab-utils)
4040
// leave as is if you want to create a new conda environment
41-
genelab = null
42-
qc = null
43-
R = null
44-
R_visualizations = null
45-
cutadapt = null
41+
genelab = null // /path/to/envs/genelab
42+
qc = null // /path/to/envs/qc
43+
R = null // /path/to/envs/R
44+
R_visualizations = null // /path/to/envs/R_visualizations
45+
cutadapt = null // /path/to/envs/cutadapt
4646
}
4747

4848

4949
// Mandatory parameters if using GLDS_accession
5050
GLDS_accession = false
51-
52-
assay_suffix = "_GLAmpSeq"
51+
assay_suffix = "_GLAmpSeq"
52+
5353
output_prefix = ""
5454
publishDir_mode = "link" // "link", "copy"
5555

5656
// Suffixes
5757
primer_trimmed_R1_suffix = "_R1_trimmed.fastq.gz"
5858
primer_trimmed_R2_suffix = "_R2_trimmed.fastq.gz"
59-
filtered_R1_suffix = "_R1_filtered.fastq.gz"
60-
filtered_R2_suffix = "_R2_filtered.fastq.gz"
59+
filtered_R1_suffix = "_R1_filtered.fastq.gz"
60+
filtered_R2_suffix = "_R2_filtered.fastq.gz"
6161

6262

63-
// directories
64-
fastqc_out_dir = "../workflow_output/FastQC_Outputs/"
65-
trimmed_reads_dir = "../workflow_output/Trimmed_Sequence_Data/"
66-
filtered_reads_dir = "../workflow_output/Filtered_Sequence_Data/"
67-
info_out_dir = "../workflow_output/Metadata/"
68-
plots_dir = "../workflow_output/Final_Outputs/Plots/"
69-
final_outputs_dir = "../workflow_output/Final_Outputs/"
70-
metadata_dir = "../Metadata/"
71-
genelab_dir = "../GeneLab/"
63+
// Directories
64+
fastqc_out_dir = "../workflow_output/FastQC_Outputs/"
65+
trimmed_reads_dir = "../workflow_output/Trimmed_Sequence_Data/"
66+
filtered_reads_dir = "../workflow_output/Filtered_Sequence_Data/"
67+
info_out_dir = "../workflow_output/Metadata/"
68+
plots_dir = "../workflow_output/Final_Outputs/Plots/"
69+
final_outputs_dir = "../workflow_output/Final_Outputs/"
70+
metadata_dir = "../Metadata/"
71+
genelab_dir = "../GeneLab/"
7272

7373
// Multiqc
74-
multiqc_config ="${baseDir}/config/multiqc.config"
75-
errorStrategy = "terminate"
76-
debug = false // set to true if you'd like to see the values of your set parameters
74+
multiqc_config = "${baseDir}/config/multiqc.config"
75+
errorStrategy = "terminate"
76+
debug = false // set to true if you'd like to see the values of your set parameters
7777
}
7878

79-
// Maximum number of jobs to submit in parallel
80-
executor.queueSize = 20
79+
// Setting the default container engine as singularity
80+
params.containerEngine = "singularity"
81+
// Conda shouldn't be used by default except when using conda-based profiles
82+
params.use_conda = false
83+
84+
85+
/*******************************************************************************************************
86+
*************************************** Workflow Profiles **********************************************
87+
********************************************************************************************************/
8188

8289
profiles {
8390

8491

8592
slurm {
86-
process.executor = 'slurm'
93+
process.executor = 'slurm'
8794
}
8895

8996
conda {
90-
conda.enabled = true
97+
conda.enabled = true
98+
params.use_conda = true
9199
}
92100

93101
singularity {
94102
singularity.enabled = true
95103
singularity.autoMounts = true
96-
singularity.cacheDir = "singularity/"
104+
singularity.cacheDir = "singularity/"
105+
params.containerEngine = "singularity"
97106
}
98107

99108
docker {
100109
docker.enabled = true
101110
docker.runOptions = '-u $(id -u):$(id -g)'
102111
docker.userEmulation = true
112+
params.containerEngine = "docker"
103113
}
104114

105115
}
106116

117+
// Maximum number of jobs to submit in parallel
118+
executor.queueSize = 20
119+
120+
121+
/******************************************************************************************************************
122+
***************** Tune process specific resources (cpu, container, memory etc.) ***********************************
123+
*******************************************************************************************************************/
107124

108125
process {
109126

127+
//******************* Default process settings ************************//
110128
errorStrategy = { params.errorStrategy ? params.errorStrategy : "ignore" }
111129
maxRetries = 2
112130
cpus = 2
113131
memory = '5 GB'
114132
cache = 'lenient'
115133
//debug = true // uncomment to see what is being emitted to the standard output
116134

117-
135+
//************************* GLDS_accession runsheet and input file retrieval **************************************//
118136
withName: GET_RUNSHEET {
119137
conda = {params.conda.genelab != null ? params.conda.genelab : "envs/genelab.yaml"}
120138
container = "olabiyi/genelab-utils:1.3.22"
121139
publishDir = [path: params.genelab_dir, mode: params.publishDir_mode]
122140
}
123141

142+
//********************************** Read quality control and assesment ********************************************//
124143
withLabel: fastqc {
125144
conda = {params.conda.qc != null ? params.conda.qc : "envs/qc.yaml"}
126145
container = "staphb/fastqc:0.12.1"
@@ -147,6 +166,7 @@ process {
147166
publishDir = [path: params.filtered_reads_dir, mode: params.publishDir_mode ]
148167
}
149168

169+
//********************************** ASV table creation and plotting ********************************************//
150170
withName: "RUN_R_TRIM|RUN_R_NOTRIM" {
151171
conda = {params.conda.R != null ? params.conda.R : "envs/R.yaml"}
152172
container = "olabiyi/r-dada-decipher-biomformat:1.0"
@@ -175,6 +195,9 @@ process {
175195
}
176196

177197

198+
/*****************************************************************************
199+
********************** Workflow Resource Usage Capturing *********************
200+
******************************************************************************/
178201

179202
// Adapted from : https://github.com/nf-core/rnaseq/blob/master/nextflow.config
180203
def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
@@ -192,12 +215,17 @@ trace {
192215
}
193216

194217

218+
219+
/******************************************************************************
220+
**************************** Workflow Metadata ********************************
221+
*******************************************************************************/
222+
195223
manifest {
196224
author = 'Olabiyi Aderemi Obayomi, Mike D. Lee'
197225
homePage = 'https://github.com/nasa/GeneLab_Data_Processing/blob/master/Amplicon/'
198-
description = 'GeneLab bioinformatics processing pipelines for amplicon sequencing data'
226+
description = 'Amplicon Illumina workflow for pipeline document GL-DPPD-7104-B'
199227
mainScript = 'main.nf'
200228
defaultBranch = 'main'
201229
nextflowVersion = '>=22.10.1'
202-
version = 'GL-DPPD-7104-B'
230+
version = '1.0.0'
203231
}

0 commit comments

Comments
 (0)