Skip to content
Snippets Groups Projects
Commit 708d8bf5 authored by Valentina Galata's avatar Valentina Galata
Browse files

updated ganges config files; fixed a bug in init.smk and basecalling.smk

parent a538f7b8
No related branches found
No related tags found
1 merge request!76Merge "cleanup" branch with "master" branch
......@@ -2,7 +2,7 @@
# STEPS
# Pipeline steps to be done: ["preprocessing", "assembly", "mapping", "annotation", "analysis", "taxonomy"]
steps: ["preprocessing", "assembly", "mapping", "annotation", "analysis", "taxonomy"]
steps: ["preprocessing"]
############################################################
# INPUT
......
......@@ -4,7 +4,7 @@
# SLURM
# NOTE: used for this script only, NOT for the snakemake call below
#SBATCH -J ONT_pilot
#SBATCH -J ONT_SMK
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -c 1
......@@ -16,7 +16,7 @@
# SNAKEMAKE
# conda env name
ONTP_ENV="snakemake" # USER INPUT REQUIRED
ONTP_ENV="ONT_pilot"
# number of cores for snakemake
ONTP_CORES=60
# snakemake file
......@@ -24,7 +24,7 @@ ONTP_SMK="workflow/Snakefile"
# config file
ONTP_CONFIG="config/ganges/config.yaml" # USER INPUT REQUIRED
# slurm config file
ONTP_SLURM="config/slurm.yaml"
ONTP_SLURM="config/ganges/slurm.yaml"
# slurm cluster call
ONTP_CLUSTER="-p {cluster.partition} -q {cluster.qos} {cluster.explicit} -N {cluster.nodes} -n {cluster.n} -c {threads} -t {cluster.time} --job-name={cluster.job-name}"
......@@ -35,6 +35,6 @@ ONTP_CLUSTER="-p {cluster.partition} -q {cluster.qos} {cluster.explicit} -N {clu
conda activate ${ONTP_ENV}
# run the pipeline
snakemake --rerun-incomplete -s ${ONTP_SMK} -rp --cores ${ONTP_CORES} --configfile ${ONTP_CONFIG} \
snakemake -s ${ONTP_SMK} -rp --cores ${ONTP_CORES} --configfile ${ONTP_CONFIG} \
--use-conda --conda-prefix ${CONDA_PREFIX}/pipeline \
--cluster-config ${ONTP_SLURM} --cluster "sbatch ${ONTP_CLUSTER}"
......@@ -5,7 +5,7 @@ __default__:
nodes: 1
n: 1
explicit: ""
job-name: "ONT_pilot.{rule}"
job-name: "ONT_GANGES.{rule}"
# output: "slurm-%j.%N-%x.out"
# error: "slurm-%j.%N-%x.err"
# mail-type: "end"
......
......@@ -15,7 +15,7 @@ checkpoint guppy_gpu_basecalling:
shell:
"""
(date && \
{config[guppy][gpu][bin]} --input_path $(dirname {input[0]}) --save_path {output} \
{config[guppy][gpu][bin]} --input_path {input} --save_path {output} \
--config {config[guppy][config]} \
--disable_pings --compress_fastq \
--cpu_threads_per_caller {threads} \
......
......@@ -65,6 +65,8 @@ rule link_input_files:
from pathlib import Path
# metaG, FAST5
if not NO_BASECALLING:
if not os.path.exists(os.path.join(RESULTS_DIR, "input/metag/ont")):
os.makedirs(os.path.join(RESULTS_DIR, "input/metag/ont"))
for ifname in config["data"]["metag"]["ont"]["files"]:
ofname = os.path.join(RESULTS_DIR, "input/metag/ont", os.path.basename(ifname))
os.symlink(os.path.abspath(ifname), ofname, target_is_directory=False)
......@@ -79,9 +81,9 @@ rule link_input_files:
os.symlink(os.path.abspath(ifname), ofname, target_is_directory=False)
# metaG, SR
os.symlink(os.path.abspath(config["data"]["metag"]["sr"]["r1"]), os.path.join(RESULTS_DIR, "input/metag/sr/R1.fq.gz"), target_is_directory=False)
os.symlink(os.path.abspath(config["data"]["metag"]["sr"]["r2"]), os.path.join(RESULTS_DIR, "input/metag/sr/R1.fq.gz"), target_is_directory=False)
os.symlink(os.path.abspath(config["data"]["metag"]["sr"]["r2"]), os.path.join(RESULTS_DIR, "input/metag/sr/R2.fq.gz"), target_is_directory=False)
# metaT, SR
if "metat" in META_TYPES:
os.symlink(os.path.abspath(config["data"]["metat"]["sr"]["r1"]), os.path.join(RESULTS_DIR, "input/metat/sr/R1.fq.gz"), target_is_directory=False)
os.symlink(os.path.abspath(config["data"]["metat"]["sr"]["r2"]), os.path.join(RESULTS_DIR, "input/metat/sr/R1.fq.gz"), target_is_directory=False)
os.symlink(os.path.abspath(config["data"]["metat"]["sr"]["r2"]), os.path.join(RESULTS_DIR, "input/metat/sr/R2.fq.gz"), target_is_directory=False)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment