Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: updated cutadapt version, formated files, and improved docs. #505

Merged
merged 4 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bio/cutadapt/pe/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
channels:
- bioconda
- conda-forge
- bioconda
- defaults
dependencies:
- cutadapt ==3.4
- cutadapt =4.1
4 changes: 4 additions & 0 deletions bio/cutadapt/pe/meta.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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}"
)
4 changes: 2 additions & 2 deletions bio/cutadapt/se/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
channels:
- bioconda
- conda-forge
- bioconda
- defaults
dependencies:
- cutadapt ==3.4
- cutadapt =4.1
4 changes: 4 additions & 0 deletions bio/cutadapt/se/meta.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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