Commit e99566f1 authored by Valentina Galata's avatar Valentina Galata
Browse files

cleanup: rm workflow/rules/basecalling.smk because it is part of workflow_fast5

parent b62202cf
# Basecalling
checkpoint guppy_gpu_basecalling:
input:
# expand(os.path.join(RESULTS_DIR, "input/metag/ont/{fast5}"), fast5=[os.path.basename(f) for f in INPUT_G_LR_FAST5])
os.path.join(RESULTS_DIR, "input/metag/ont")
output:
directory(os.path.join(RESULTS_DIR, "preproc/metag/lr/checkpoints"))
log:
out="logs/guppy.metag.lr.out.log",
err="logs/guppy.metag.lr.err.log"
threads:
config["guppy"]["gpu"]["threads"]
message:
"Preprocessing long reads: Basecalling w/ Guppy"
shell:
"""
(date && \
{config[guppy][gpu][bin]} --input_path {input} --save_path {output} \
--config {config[guppy][config]} \
--disable_pings --compress_fastq \
--cpu_threads_per_caller {threads} \
-x {config[guppy][gpu][gpu_device]} \
--records_per_fastq {config[guppy][gpu][records_per_fastq]} \
--chunk_size {config[guppy][gpu][chunk_size]} \
--chunks_per_runner {config[guppy][gpu][chunks_per_runner]} \
--gpu_runners_per_device {config[guppy][gpu][runners_per_device]} \
--num_callers {config[guppy][gpu][num_callers]} && \
date) 2>> {log.err} >> {log.out}
"""
def aggregate_guppy_basecalling(wildcards):
checkpoint_output = checkpoints.guppy_gpu_basecalling.get(**wildcards).output[0]
return expand(
os.path.join(RESULTS_DIR, "preproc/metag/lr/checkpoints/fastq_runid_{runid_i_j}.fastq.gz"),
runid_i_j=glob_wildcards(os.path.join(checkpoint_output, "fastq_runid_{runid_i_j}.fastq.gz")).runid_i_j,
)
rule merge_guppy_basecalling:
input:
aggregate_guppy_basecalling
output:
os.path.join(RESULTS_DIR, "preproc/metag/lr/lr.fastq.gz")
message:
"Preprocessing long reads: Cat FASTQ"
shell:
"cat $(echo \"{input}\" | sort) > {output}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment