Newer
Older
version = "6.4.6"
container_url = "xgrand/ont-guppy:${version}"
params.basecalling_out = ""
params.flowcell = "FLO-MIN106"
params.kit = "SQK-PBK004"
params.min_qscore = 7.0
params.gpu_runners_per_device = 1
params.num_callers = 1
params.chunks_per_runner = 1
tag "$fast5_folder"
if (params.basecalling_out != "") {
publishDir "results/${params.basecalling_out}", mode: 'copy'
}
if (params.flowcell == "") {
errorFlowcell << "WARNING ! No Flowcell type given..."
errorFlowcell.view()
}
if (params.kit == "") {
errorKit "WARNING ! No kit type given..."
errorKit.view()
}
if (params.config_file != "") {
options = "-c /opt/ont/guppy/data/${params.config_file}"
}
else {
options = "--flowcell ${params.flowcell} \
--kit ${params.kit} "
}
output:
path "pass", emit: pass
path "fail", emit: fail
path "sequencing_summary.txt", emit: sequencing_summary
path "sequencing_telemetry.js", emit: sequencing_telemetry
script:
"""
echo "Start basecalling using GPUs."
# guppy_basecaller --print_workflows
path=\$(readlink -f ${fast5_folder})
find \${path} -type f -name "*.fast5" > allfast5files.txt
-s . \
-x "cuda:all" \
--min_qscore ${params.min_qscore} \
--gpu_runners_per_device ${params.gpu_runners_per_device} \
--num_callers ${params.num_callers} \
--chunks_per_runner ${params.chunks_per_runner} \
"""
}
process basecall_fast5_cpu {
container = "${container_url}"
label "big_mem_multi_cpus"
tag "$fast5_folder"
if (params.basecalling_out != "") {
publishDir "results/${params.basecalling_out}", mode: 'copy'
}
if (params.flowcell == "") {
errorFlowcell << "WARNING ! No Flowcell type given..."
errorFlowcell.view()
}
if (params.kit == "") {
errorKit "WARNING ! No kit type given..."
errorKit.view()
}
input:
val(fast5_folder)
output:
path "pass", emit: pass
path "fail", emit: fail
path "sequencing_summary.txt", emit: sequencing_summary
path "sequencing_telemetry.js", emit: sequencing_telemetry
script:
"""
echo "Start basecalling using CPUs."
find ${fast5_folder} -type f -name "*.fast5" > allfast5files.txt
-i / \
--input_file_list allfast5files.txt \
-s . \
--cpu_threads_per_caller ${params.cpu_threads_per_caller} \
--num_callers ${params.num_callers} \
--flowcell ${params.flowcell} \
--kit ${params.kit}
"""
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
<<<<<<< HEAD
=======
process barcoding {
container = "${container_url}"
label "big_mem_multi_cpus"
tag "$fast5_folder"
if (params.barcoding_out != "") {
publishDir "results/${params.barcoding_out}", mode: 'copy'
}
input:
path(pass_path)
output:
path("barcode")
script:
"""
guppy_barcoder \
--input_path ${pass_path} \
--save_path barcode/ \
-c /opt/ont/guppy/data/${params.config_file} \
--barcode_kits ${params.kit} \
--progress_stats_frequency 60 \
-x "cuda:all" \
--enable_trim_barcodes \
--trim_adapters \
--compress_fastq
"""
}
>>>>>>> 622494c (Ajout du process barcoding)