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
--input_file_list 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} \
// A modifier quand le process gpu marchera
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()
}
if (params.config_file != "") {
options = "-c /opt/ont/guppy/data/${params.config_file}"
}
else {
options = "--flowcell ${params.flowcell} \
--kit ${params.kit} "
}
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 G=CPUs."
# guppy_basecaller --print_workflows
path=\$(readlink -f ${fast5_folder})
find \${path} -type f -name "*.fast5" > allfast5files.txt
-i / \
--input_file_list allfast5files.txt \
-x "cuda:all" \
--min_qscore ${params.min_qscore} \
--cpu_runners_per_device ${params.cpu_runners_per_device} \
--chunks_per_runner ${params.chunks_per_runner} \
${options}
params.kit_barcoding = "EXP-PBC001"
process barcoding_gpu {
container = "${container_url}"
label "gpus"
if (params.barcoding_out != "") {
publishDir "results/${params.barcoding_out}", mode: 'copy'
}
input:
path(pass_path)
output:
path("barcode*"), emit: barcodes
script:
"""
guppy_barcoder \
--input_path ${pass_path} \
--save_path . \
-t ${params.gpu_threads_per_caller} \
--barcode_kits ${params.kit_barcoding} \
--progress_stats_frequency 60 \
--enable_trim_barcodes \
--trim_adapters \
--compress_fastq
"""
}
process barcoding_cpu {
container = "${container_url}"
label "big_mem_multi_cpus"
if (params.barcoding_out != "") {
publishDir "results/${params.barcoding_out}", mode: 'copy'
}
input:
path(pass_path)
output:
path("barcode*"), emit: barcodes
mkdir barcoding/
--save_path . \
-t ${task.cpus} \
--barcode_kits ${params.kit_barcoding} \
--progress_stats_frequency 60 \
--enable_trim_barcodes \
--trim_adapters \
--compress_fastq
"""
}
<<<<<<< HEAD
=======
>>>>>>> bd1fefe (Transformation des fichiers de sortie de barcoding en tuple pour concatenate)