Skip to content

Commit

Permalink
perf: updated cutadapt version, formatted files, and improved docs. (#…
Browse files Browse the repository at this point in the history
…505)

* Updated cutadapt version, formated files, and improved docs.

* Small version fix

* Change channel order due to new strict policy

Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
  • Loading branch information
fgvieira and johanneskoester committed Aug 15, 2022
1 parent 47d4047 commit 3a20eb7
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bio/cutadapt/pe/environment.yaml
Expand Up @@ -3,4 +3,4 @@ channels:
- bioconda
- nodefaults
dependencies:
- cutadapt ==3.4
- cutadapt =4.1
4 changes: 4 additions & 0 deletions bio/cutadapt/pe/meta.yaml
@@ -1,6 +1,7 @@
name: cutadapt-pe
description: |
Trim paired-end reads using cutadapt.
url: https://github.com/marcelm/cutadapt
authors:
- Julian de Ruiter
- David Laehnemann
Expand All @@ -9,3 +10,6 @@ input:
output:
- two trimmed (paired-end) fastq files
- text file containing trimming statistics
notes: |
* The `extra` param allows for additional program arguments.
* The `adapters` param allows for separatelly specifying adapter options (optional).
10 changes: 5 additions & 5 deletions bio/cutadapt/pe/test/Snakefile
@@ -1,17 +1,17 @@
rule cutadapt:
input:
["reads/{sample}.1.fastq", "reads/{sample}.2.fastq"]
["reads/{sample}.1.fastq", "reads/{sample}.2.fastq"],
output:
fastq1="trimmed/{sample}.1.fastq",
fastq2="trimmed/{sample}.2.fastq",
qc="trimmed/{sample}.qc.txt"
qc="trimmed/{sample}.qc.txt",
params:
# https://cutadapt.readthedocs.io/en/stable/guide.html#adapter-types
adapters="-a AGAGCACACGTCTGAACTCCAGTCAC -g AGATCGGAAGAGCACACGT -A AGAGCACACGTCTGAACTCCAGTCAC -G AGATCGGAAGAGCACACGT",
# https://cutadapt.readthedocs.io/en/stable/guide.html#
extra="--minimum-length 1 -q 20"
extra="--minimum-length 1 -q 20",
log:
"logs/cutadapt/{sample}.log"
threads: 4 # set desired number of threads here
"logs/cutadapt/{sample}.log",
threads: 4 # set desired number of threads here
wrapper:
"master/bio/cutadapt/pe"
2 changes: 1 addition & 1 deletion bio/cutadapt/pe/wrapper.py
Expand Up @@ -22,11 +22,11 @@

shell(
"cutadapt"
" --cores {snakemake.threads}"
" {adapters}"
" {extra}"
" -o {snakemake.output.fastq1}"
" -p {snakemake.output.fastq2}"
" -j {snakemake.threads}"
" {snakemake.input}"
" > {snakemake.output.qc} {log}"
)
2 changes: 1 addition & 1 deletion bio/cutadapt/se/environment.yaml
Expand Up @@ -3,4 +3,4 @@ channels:
- bioconda
- nodefaults
dependencies:
- cutadapt ==3.4
- cutadapt =4.1
4 changes: 4 additions & 0 deletions bio/cutadapt/se/meta.yaml
@@ -1,10 +1,14 @@
name: cutadapt-se
description: |
Trim single-end reads using cutadapt.
url: https://github.com/marcelm/cutadapt
authors:
- Julian de Ruiter
input:
- fastq file
output:
- trimmed fastq file
- text file containing trimming statistics
notes: |
* The `extra` param allows for additional program arguments.
* The `adapters` param allows for separatelly specifying adapter options (optional).
10 changes: 5 additions & 5 deletions bio/cutadapt/se/test/Snakefile
@@ -1,14 +1,14 @@
rule cutadapt:
input:
"reads/{sample}.fastq"
"reads/{sample}.fastq",
output:
fastq="trimmed/{sample}.fastq",
qc="trimmed/{sample}.qc.txt"
qc="trimmed/{sample}.qc.txt",
params:
adapters="-a AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC",
extra="-q 20"
extra="-q 20",
log:
"logs/cutadapt/{sample}.log"
threads: 4 # set desired number of threads here
"logs/cutadapt/{sample}.log",
threads: 4 # set desired number of threads here
wrapper:
"master/bio/cutadapt/se"
2 changes: 1 addition & 1 deletion bio/cutadapt/se/wrapper.py
Expand Up @@ -22,9 +22,9 @@

shell(
"cutadapt"
" --cores {snakemake.threads}"
" {adapters}"
" {extra}"
" -j {snakemake.threads}"
" -o {snakemake.output.fastq}"
" {snakemake.input[0]}"
" > {snakemake.output.qc} {log}"
Expand Down

0 comments on commit 3a20eb7

Please sign in to comment.