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

feat: add trimmomatic to tools/ #192

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ results/

# ignore any tags files that are generated
tags

.idea/

9 changes: 9 additions & 0 deletions tests/tools/input_json/trimmomatic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"inputfile": "tests/input/test_R1.fq.gz",
"output_name": "trimmomatic_output.fastq.gz",
"leading": 3,
"trailing": 3,
"window_size": 4,
"window_quality": 15,
"minlen": 36
}
50 changes: 50 additions & 0 deletions tools/trimmomatic.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version 1.1

task trim_single_end {
meta {
description: "Performs both single end and paired end trimming of reads using the Trimmomatic tool."
outputs: {
trimmed_reads: "The trimmed reads in FASTQ format."
}
}

parameter_meta {
input_file: "Input FASTQ format file to run Trimmomatic on."
output_name: "Output FASTQ format file of trimmed reads."
# adapter_file: "Adapter file to use for trimming."
leading: "Cut bases off the start of a read, if below a threshold quality."
trailing: "Cut bases off the end of a read, if below a threshold quality."
window_size: "Specifies the number of bases to average across for the sliding window."
window_quality: "Specifies the average quality required in the sliding window."
minlen: "Drop the read if it is below a specified length."
}

input {
File inputfile
String output_name
# String adapter_file
Int leading
Int trailing
Int window_size
Int window_quality
Int minlen
}

command <<<
cd /usr/local/share/trimmomatic-0.36-5
java -jar trimmomatic.jar SE -phred33 ~{inputfile} output.fq.gz ILLUMINACLIP:/usr/local/share/trimmomatic-0.36-5/adapters/TruSeq3-SE.fa:2:30:10 LEADING:~{leading} TRAILING:~{trailing} SLIDINGWINDOW:~{window_size}:~{window_quality} MINLEN:~{minlen}
ls -l
>>>

output {
File trimmed_reads = "output.fq.gz"
}

runtime {
memory: "16 GB"
disks: "100 GB"
container: "quay.io/biocontainers/trimmomatic:0.36--5"
cpu: 8
maxRetries: 0
}
}