Commit 0ee93f84 authored by Raphael Müller's avatar Raphael Müller
Browse files

Added rule for big assembly. Changed path from absolute to relative

parent 99065d98
......@@ -7,6 +7,7 @@ NFS = config["nextflow_script"]
OPS = config["original_perl_script"]
DATA = config["datadir"]
ASSEMBLY = config["assembly"]
ASSEMBLY_BIG = config["assembly_big"]
WD = config["workdir"]+"/"
include: "snakemake_workflows/bam_prep.smk"
......@@ -78,6 +79,7 @@ rule all:
rules.bams_illumina_paired_pacbio_nanopore_perl.output,
rules.bams_illumina_paired_pacbio_nanopore_nextflow.output,
rules.bams_with_assembly_illumina_paired_pacbio_nanopore_nextflow.output,
rules.assembly_big_single_pacbio_nextflow.output,
rule data_prep:
......@@ -126,7 +128,7 @@ rule nanosim:
output:
"data_prep/nanopore.sim.{number}.fastq"
conda: "envs/nanosim.yml"
shadow: "full"
shadow: "minimal"
threads: 8
shell:
"""
......
......@@ -3,7 +3,8 @@ benchmark_repeats: 3
workdir: "results"
original_perl_script: "perl ../original_wf/backmap/backmap.pl"
nextflow_script: "nextflow ../nextflow/backmap.nf -c nextflow.config --threads 16"
assembly: "/vol/cb/projects/112020_tbg_backmap/dataset/dgal.big.fasta"
assembly: "dataset/dgal_ra_pb-target-and-other_ill-confilter.blobfilter.rmmt_sspace-lr3_lrgc3_pg3_pilon_3.fasta"
assembly_big: "dataset/dgal.big.fasta"
datadir: "dataset/"
unpaired: dgal.confilter.fq
paired_1: dgal_1.paired.confilter.fq
......
OF = WD+"assembly_single_pacbio/perl/"
perl2nf = lambda s: s.replace(r"/perl/",r"/nextflow/")
perl2nf_big = lambda s: s.replace(r"/perl/",r"/nextflow_big/")
NAME = "sepb"
dir_outputs = [OF+"multiqc_data",OF+NAME+".sort_stats"]
......@@ -41,6 +42,7 @@ rule assembly_single_pacbio_nextflow:
output:
[perl2nf(x) for x in rules.assembly_single_pacbio_perl.output if x not in dir_outputs],
[directory(perl2nf(x)) for x in dir_outputs],
OF+NAME+".results.txt"
params:
prefix=rules.assembly_single_pacbio_perl.params.prefix,
outdir=perl2nf(rules.assembly_single_pacbio_perl.params.outdir),
......@@ -58,3 +60,28 @@ rule assembly_single_pacbio_nextflow:
{params.prgm} --keep-temporary --assembly {input.assembly} --output {params.outdir} --prefix {params.prefix} --single-end {input.unpaired} --pacbio {input.pacbio} 1> {log.stdout} 2> {log.stderr}
"""
rule assembly_big_single_pacbio_nextflow:
input:
assembly = ASSEMBLY_BIG,
unpaired = rules.assembly_single_pacbio_perl.input.unpaired,
pacbio = rules.assembly_single_pacbio_perl.input.pacbio,
output:
[perl2nf_big(x) for x in rules.assembly_single_pacbio_perl.output if x not in dir_outputs],
[directory(perl2nf_big(x)) for x in dir_outputs],
OF+NAME+".results.txt"
params:
prefix=rules.assembly_single_pacbio_perl.params.prefix,
outdir=perl2nf_big(rules.assembly_single_pacbio_perl.params.outdir),
prgm=config["nextflow_script"]
threads: 16
conda: "../envs/nextflow.yml"
benchmark: repeat("benchmarks/nextflow/{}.tsv".format(NAME), config["benchmark_repeats"])
log:
stdout = perl2nf_big(rules.assembly_single_pacbio_perl.log.stdout),
stderr = perl2nf_big(rules.assembly_single_pacbio_perl.log.stderr),
shell:
"""
rm -rf {params.outdir};
mkdir -p {params.outdir};
{params.prgm} --keep-temporary --assembly {input.assembly} --output {params.outdir} --prefix {params.prefix} --single-end {input.unpaired} --pacbio {input.pacbio} 1> {log.stdout} 2> {log.stderr}
"""
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