-
Notifications
You must be signed in to change notification settings - Fork 1
/
nextflow.config
158 lines (144 loc) · 6.99 KB
/
nextflow.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
// Set some default configs
params.report_template_dir = "nextseq-report"
params.workflow_label = "Demultiplexing"
username = System.getProperty("user.name")
params.email_host = "nyumc.org"
params.email_from = "${username}@${params.email_host}"
params.email_to = "${username}@${params.email_host}"
manifest {
author = 'Stephen Kelly, Varshini Vasudevaraja'
homePage = 'https://github.com/NYU-Molecular-Pathology/demux-nf'
description = 'Illumina bcl2fastq demultiplexing pipeline'
mainScript = 'main.nf'
}
report {
// enabled = true // enable from CLI instead
file = "nextflow.html"
}
trace {
// enabled = true // enable from CLI instead
fields = "task_id,hash,native_id,process,tag,name,status,exit,module,container,cpus,time,disk,memory,attempt,submit,start,complete,duration,realtime,queue,%cpu,%mem,rss,vmem,peak_rss,peak_vmem,rchar,wchar,syscr,syscw,read_bytes,write_bytes"
file = "trace.txt"
raw = true
}
timeline {
// enabled = true // enable from CLI instead
file = "timeline.html"
}
notification {
// enabled = true // enable from CLI instead
to = "${params.email_to}"
from = "${params.email_from}"
}
params.beforeScript_str = 'printf "USER:\${USER:-none} JOB_ID:\${JOB_ID:-none} JOB_NAME:\${JOB_NAME:-none} HOSTNAME:\${HOSTNAME:-none} PWD:\$PWD\n"; TIMESTART=\$(date +%s)'
process.beforeScript = "${params.beforeScript_str}"
profiles { // locations to run the pipeline
phoenix { // for NYULMC phoenix HPC
process.queue = 'all.q'
params.sequencerDir = "/ifs/data/molecpathlab/quicksilver"
params.production_dir = "/ifs/data/molecpathlab/production/Demultiplexing"
params.multiqc_setup_cmd = "module unload python ; unset PYTHONPATH ; unset PYTHONHOME ; source /ifs/data/molecpathlab/bin/conda3/bin/activate ; conda activate multiqc-1.5 ; export LANG=en_US.utf8 ; export LC_ALL=en_US.utf8 "
process.$validate_samplesheet.module = "python/2.7"
process.$bcl2fastq.module = "bcl2fastq/2.17.1"
process.$bcl2fastq.executor = "sge"
process.$bcl2fastq.clusterOptions = "-pe threaded 4-24 -l mem_free=32G -l mem_token=2G"
process.$multiqc.beforeScript = "${process.beforeScript} ; ${params.multiqc_setup_cmd}"
process.$fastqc.module = "fastqc/0.11.7"
process.$fastqc.executor = "sge"
process.$fastqc.clusterOptions = "-l mem_free=8G -l mem_token=8G"
process.$demultiplexing_report.module = "pandoc/1.13.1:r/3.3.0"
}
bigpurple { // NYULMC Big Purple HPC cluster
process.executor = "slurm" // default process executor
process.queue = "intellispace"
process.clusterOptions = '--ntasks-per-node=1 --export=NONE'
executor {
$slurm {
queueSize = 5
}
$local {
cpus = 8
queueSize = 8
memory = 64.GB
}
}
params.sequencerDir = "/gpfs/data/molecpathlab/production/quicksilver"
params.containerDir = "/gpfs/data/molecpathlab/containers/demux-nf"
process.module = "singularity/3.7.1"
singularity.enabled = true
singularity.autoMounts = true
singularity.runOptions = "-B ${params.sequencerDir}"
singularity.envWhitelist = "NTHREADS"
// SLURM environment variables that I want to have printed out in every task stdout
params.SLURM_vars='SLURM_JOB_ID SLURM_JOB_NAME SLURM_JOB_NODELIST SLURM_JOB_PARTITION SLURM_MEM_PER_CPU SLURM_MEM_PER_NODE SLURM_PRIO_PROCESS SLURM_SUBMIT_DIR SLURM_SUBMIT_HOST SLURM_TASK_PID SLURMD_NODENAME'
process {
// global process config
// try to prevent error: module: command not found by sourcing module config, and pausing to allow environment to finish populating
beforeScript = """
. /etc/profile.d/modules.sh;
sleep 1;
printf "USER:\${USER:-none} HOSTNAME:\${HOSTNAME:-none} PWD:\$PWD NTHREADS:\${NTHREADS:-none}\n";
for item in ${params.SLURM_vars}; do printf "\${item}: \${!item:-none}\t"; done;
"""
time = '4h' // 4 hour default time limit for SLURM request
cpus = 1 // default to 1 CPU for all tasks/jobs
memory = { 8.GB * task.cpus }
withName: sanitize_samplesheet {
executor = "local"
container = "${params.containerDir}/dos2unix-7.4.0.simg"
}
withName: validate_samplesheet {
executor = "local"
container = "${params.containerDir}/python-2.7.simg"
}
withName: convert_run_params {
executor = "local"
container = "${params.containerDir}/python-2.7.simg"
}
withName: bcl2fastq {
executor = "local"
container = "${params.containerDir}/bcl2fastq-2.17.1.simg"
cpus = 8
beforeScript = "export NTHREADS=8; ${process.beforeScript}"
time = '12h'
}
withName: bcl2fastq_ns2k {
executor = "local"
container = "${params.containerDir}/bcl2fastq-2.20.0.422.simg"
cpus = 8
beforeScript = "export NTHREADS=8; ${process.beforeScript}"
time = '12h'
}
withName: fastqc {
executor = "local"
container = "${params.containerDir}/fastqc-0.11.7.simg"
}
withName: multiqc {
executor = "local"
container = "${params.containerDir}/multiqc-1.5.simg"
}
withName: demultiplexing_report {
executor = "local"
container = "${params.containerDir}/report-r-3.4.3.simg"
}
withName: api_job_submission {
executor = "local"
container = "${params.containerDir}/python-3.8.simg"
}
}
}
}
profiles { // pipeline run settings
NGS580 {
params.bcl2fastq_params = "--no-lane-splitting --ignore-missing-bcls --ignore-missing-filter --ignore-missing-positions --ignore-missing-controls --auto-set-to-zero-barcode-mismatches --find-adapters-with-sliding-window --adapter-stringency 0.9 --mask-short-adapter-reads 35 --minimum-trimmed-read-length 35"
}
NGS607 {
params.bcl2fastq_params = "--no-lane-splitting --ignore-missing-bcls --ignore-missing-filter --ignore-missing-positions --ignore-missing-controls --auto-set-to-zero-barcode-mismatches --find-adapters-with-sliding-window --adapter-stringency 0.9 --mask-short-adapter-reads 35 --minimum-trimmed-read-length 35"
}
NS2K {
params.bcl2fastq_params = "--no-lane-splitting --ignore-missing-bcls --ignore-missing-filter --ignore-missing-positions --ignore-missing-controls --auto-set-to-zero-barcode-mismatches --find-adapters-with-sliding-window --adapter-stringency 0.9 --mask-short-adapter-reads 35 --minimum-trimmed-read-length 35"
}
Archer {
params.bcl2fastq_params = "--no-lane-splitting"
}
}