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
process basecall_fast5_gpu {
container = "${container_url}"
label "gpu"
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:
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
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
-s . \
--flowcell ${params.flowcell} \
--kit ${params.kit} \
-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 \