Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tasks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
biowdl
tasks
Commits
d993500b
Commit
d993500b
authored
5 years ago
by
Ruben Vorderman
Browse files
Options
Downloads
Patches
Plain Diff
allow for single adapter and contaminations input in cutadapt
parent
c59afe49
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cutadapt.wdl
+19
-5
19 additions, 5 deletions
cutadapt.wdl
with
19 additions
and
5 deletions
cutadapt.wdl
+
19
−
5
View file @
d993500b
...
...
@@ -13,6 +13,10 @@ task Cutadapt {
Array[String]+? adapterRead2
Array[String]+? frontRead2
Array[String]+? anywhereRead2
# FIXME: default should be set at the subworkflow level, not here. Needs to wait for cromwell fix.
Array[String]+? adapterBoth = ["AGATCGGAAGAG"]
# contaminations = anywhereBoth
Array[String]+? contaminations
Boolean? interleaved
String? pairFilter
Float? errorRate
...
...
@@ -33,7 +37,7 @@ task Cutadapt {
String? stripSuffix
String? prefix
String? suffix
Int? minimumLength =
1
# Necessary to prevent creation of empty reads
Int? minimumLength =
2
# Necessary to prevent creation of empty reads
or 1 base reads.
Int? maximumLength
Int? maxN
Boolean? discardTrimmed
...
...
@@ -66,6 +70,16 @@ task Cutadapt {
then "mkdir -p $(dirname " + read2output + ")"
else ""
# Some WDL magic here to set both adapters with one setting.
# If then else's are needed to keep the variable optional and undefined
Array[String]+? adapterForward = if (defined(adapter) || defined(adapterBoth)) then select_first([adapter, adapterBoth]) else adapter
# Assume adapterRead2 will not be set when read2 is not set.
Array[String]+? adapterReverse = if defined(read2) then select_first([adapterRead2, adapterBoth]) else adapterRead2
# Same for contaminations
Array[String]+? anywhereForward = if (defined(anywhere) || defined(contaminations)) then select_first([anywhere, contaminations]) else anywhere
Array[String]+? anywhereReverse = if (defined(anywhereRead2) || defined(contaminations)) then select_first([anywhereRead2, contaminations]) else anywhereRead2
command {
set -e
~{"mkdir -p $(dirname " + read1output + ")"}
...
...
@@ -73,12 +87,12 @@ task Cutadapt {
~{"mkdir -p $(dirname " + reportPath + ")"}
cutadapt \
~{"--cores=" + cores} \
~{true="-a" false="" defined(adapter)} ~{sep=" -a " adapter} \
~{true="-A" false="" defined(adapterRe
ad2
)} ~{sep=" -A " adapterRe
ad2
} \
~{true="-a" false="" defined(adapter
Forward
)} ~{sep=" -a " adapter
Forward
} \
~{true="-A" false="" defined(adapterRe
verse
)} ~{sep=" -A " adapterRe
verse
} \
~{true="-g" false="" defined(front)} ~{sep=" -g " front} \
~{true="-G" false="" defined(frontRead2)} ~{sep=" -G " frontRead2} \
~{true="-b" false="" defined(anywhere)} ~{sep=" -b " anywhere} \
~{true="-B" false="" defined(anywhereRe
ad2
)} ~{sep=" -B " anywhereRe
ad2
} \
~{true="-b" false="" defined(anywhere
Forward
)} ~{sep=" -b " anywhere
Forward
} \
~{true="-B" false="" defined(anywhereRe
verse
)} ~{sep=" -B " anywhereRe
verse
} \
--output ~{read1output} ~{"--paired-output " + read2output} \
~{"--to-short-output " + tooShortOutputPath} \
~{"--to-short-paired-output " + tooShortPairedOutputPath} \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment