Commit 0285f9db authored by ahb-ufz's avatar ahb-ufz

nextseq fix merged to IMP3anna

parent 8002d1b5
Pipeline #39769 failed with stages
in 18 seconds
...@@ -11,8 +11,6 @@ if config['nextseq']: ...@@ -11,8 +11,6 @@ if config['nextseq']:
'Preprocessing/{type}.se2.trimmoed.fq' 'Preprocessing/{type}.se2.trimmoed.fq'
threads: 10 threads: 10
params: params:
adapter = lambda wildcards: config["trimmomatic"]["adapter"][wildcards.type]
resources:
runtime="12:00:00", runtime="12:00:00",
mem = MEMCORE mem = MEMCORE
conda: ENVDIR + "/IMP_preprocessing.yaml" conda: ENVDIR + "/IMP_preprocessing.yaml"
...@@ -21,7 +19,7 @@ if config['nextseq']: ...@@ -21,7 +19,7 @@ if config['nextseq']:
shell: shell:
""" """
trimmomatic PE -threads {threads} {input[0]} {input[1]} {output} \ trimmomatic PE -threads {threads} {input[0]} {input[1]} {output} \
ILLUMINACLIP:{DBPATH}/adapters/{params.adapter}.fa:{config[trimmomatic][seed_mismatch]}:{config[trimmomatic][palindrome_clip_threshold]}:{config[trimmomatic][simple_clip_threshold]} \ ILLUMINACLIP:{DBPATH}/adapters/{config[trimmomatic][adapter]}.fa:{config[trimmomatic][seed_mismatch]}:{config[trimmomatic][palindrome_clip_threshold]}:{config[trimmomatic][simple_clip_threshold]} \
LEADING:{config[trimmomatic][leading]} \ LEADING:{config[trimmomatic][leading]} \
TRAILING:{config[trimmomatic][trailing]} \ TRAILING:{config[trimmomatic][trailing]} \
SLIDINGWINDOW:{config[trimmomatic][window_size]}:{config[trimmomatic][window_quality]} \ SLIDINGWINDOW:{config[trimmomatic][window_size]}:{config[trimmomatic][window_quality]} \
...@@ -38,7 +36,7 @@ if config['nextseq']: ...@@ -38,7 +36,7 @@ if config['nextseq']:
wildcard_constraints: wildcard_constraints:
read="se[1|2]" read="se[1|2]"
threads: 10 threads: 10
resources: params:
runtime="12:00:00", runtime="12:00:00",
mem = MEMCORE mem = MEMCORE
conda: ENVDIR + "/IMP_preprocessing.yaml" conda: ENVDIR + "/IMP_preprocessing.yaml"
...@@ -58,11 +56,14 @@ if config['nextseq']: ...@@ -58,11 +56,14 @@ if config['nextseq']:
output: output:
'Preprocessing/{type}.r1.trimmed.fq', 'Preprocessing/{type}.r1.trimmed.fq',
'Preprocessing/{type}.r2.trimmed.fq', 'Preprocessing/{type}.r2.trimmed.fq',
'Preprocessing/{type}.seCut.trimmed.fq', 'Preprocessing/{type}.r1Cut.trimmed.fq',
'Preprocessing/{type}.r2Cut.trimmed.fq',
'Preprocessing/{type}.se1Cut.trimmed.fq',
'Preprocessing/{type}.se2Cut.trimmed.fq',
'Preprocessing/{type}.r1.trimmoed.fq.gz', 'Preprocessing/{type}.r1.trimmoed.fq.gz',
'Preprocessing/{type}.r2.trimmoed.fq.gz' 'Preprocessing/{type}.r2.trimmoed.fq.gz'
threads: 10 threads: 10
resources: params:
runtime="12:00:00", runtime="12:00:00",
mem = MEMCORE mem = MEMCORE
conda: ENVDIR + "/IMP_preprocessing.yaml" conda: ENVDIR + "/IMP_preprocessing.yaml"
...@@ -72,24 +73,36 @@ if config['nextseq']: ...@@ -72,24 +73,36 @@ if config['nextseq']:
""" """
cutadapt -j {threads} --nextseq-trim={config[trimmomatic][trailing]} \ cutadapt -j {threads} --nextseq-trim={config[trimmomatic][trailing]} \
--minimum-length {config[trimmomatic][minlen]}:{config[trimmomatic][minlen]} \ --minimum-length {config[trimmomatic][minlen]}:{config[trimmomatic][minlen]} \
-o {output[0]} -p {output[1]} --too-short-paired-output {output[2]} {input[0]} {input[1]} >> {log} 2>&1 -o {output[0]} -p {output[1]} --too-short-output {output[2]} --too-short-paired-output {output[3]} \
{input[0]} {input[1]} >> {log} 2>&1
cutadapt -j {threads} \
--minimum-length {config[trimmomatic][minlen]} \
-o {output[4]} {output[2]} >> {log} 2>&1
cutadapt -j {threads} \
--minimum-length {config[trimmomatic][minlen]} \
-o {output[5]} {output[3]} >> {log} 2>&1
pigz -p {threads} {input} >> {log} 2>&1 pigz -p {threads} {input} >> {log} 2>&1
""" """
rule cat_se_trimmed: rule cat_se_trimmed:
input: input:
'Preprocessing/{type}.se1.trimmed.fq', 'Preprocessing/{type}.se1.trimmed.fq',
'Preprocessing/{type}.se2.trimmed.fq', 'Preprocessing/{type}.se2.trimmed.fq',
'Preprocessing/{type}.seCut.trimmed.fq' 'Preprocessing/{type}.se1Cut.trimmed.fq',
'Preprocessing/{type}.se2Cut.trimmed.fq',
'Preprocessing/{type}.r1Cut.trimmed.fq',
'Preprocessing/{type}.r2Cut.trimmed.fq'
output: output:
'Preprocessing/{type}.se.trimmed.fq' 'Preprocessing/{type}.se.trimmed.fq',
threads: 1 threads: 1
resources: params:
runtime="12:00:00", runtime="12:00:00",
mem = MEMCORE mem = MEMCORE
conda: ENVDIR + "/IMP_preprocessing.yaml"
message: "cat_se_trimmed: Concatenating trimmed single end {wildcards.type} reads" message: "cat_se_trimmed: Concatenating trimmed single end {wildcards.type} reads"
shell: shell:
""" """
cat {input[0]} {input[1]} > {output} cat {input[0]} {input[1]} {input[2]} {input[3]} > {output}
pigz -p {threads} {input}
""" """
else: else:
rule trimming: rule trimming:
...@@ -104,8 +117,6 @@ else: ...@@ -104,8 +117,6 @@ else:
'Preprocessing/{type}.se2.trimmed.fq' 'Preprocessing/{type}.se2.trimmed.fq'
threads: 10 threads: 10
params: params:
adapter = lambda wildcards: config["trimmomatic"]["adapter"][wildcards.type]
resources:
runtime="12:00:00", runtime="12:00:00",
mem = MEMCORE mem = MEMCORE
conda: ENVDIR + "/IMP_preprocessing.yaml" conda: ENVDIR + "/IMP_preprocessing.yaml"
...@@ -114,7 +125,7 @@ else: ...@@ -114,7 +125,7 @@ else:
shell: shell:
""" """
trimmomatic PE -threads {threads} {input[0]} {input[1]} {output} \ trimmomatic PE -threads {threads} {input[0]} {input[1]} {output} \
ILLUMINACLIP:{DBPATH}/adapters/{params.adapter}.fa:{config[trimmomatic][seed_mismatch]}:{config[trimmomatic][palindrome_clip_threshold]}:{config[trimmomatic][simple_clip_threshold]} \ ILLUMINACLIP:{DBPATH}/adapters/{config[trimmomatic][adapter]}.fa:{config[trimmomatic][seed_mismatch]}:{config[trimmomatic][palindrome_clip_threshold]}:{config[trimmomatic][simple_clip_threshold]} \
LEADING:{config[trimmomatic][leading]} \ LEADING:{config[trimmomatic][leading]} \
TRAILING:{config[trimmomatic][trailing]} \ TRAILING:{config[trimmomatic][trailing]} \
SLIDINGWINDOW:{config[trimmomatic][window_size]}:{config[trimmomatic][window_quality]} \ SLIDINGWINDOW:{config[trimmomatic][window_size]}:{config[trimmomatic][window_quality]} \
...@@ -129,7 +140,7 @@ else: ...@@ -129,7 +140,7 @@ else:
output: output:
'Preprocessing/{type}.se.trimmed.fq' 'Preprocessing/{type}.se.trimmed.fq'
threads: 1 threads: 1
resources: params:
runtime="12:00:00", runtime="12:00:00",
mem = MEMCORE mem = MEMCORE
message: "cat_se_trimmed: Concatenating trimmed single end {wildcards.type} reads" message: "cat_se_trimmed: Concatenating trimmed single end {wildcards.type} reads"
......
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