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
a8a6af81
Commit
a8a6af81
authored
6 years ago
by
Pappas
Browse files
Options
Downloads
Patches
Plain Diff
Update centrifuge command and add kreport task
parent
c5815a22
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!13
Centrifuge classify and kreport tasks
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
centrifuge.wdl
+46
-6
46 additions, 6 deletions
centrifuge.wdl
with
46 additions
and
6 deletions
centrifuge.wdl
+
46
−
6
View file @
a8a6af81
...
...
@@ -56,14 +56,16 @@ task build {
task classify {
String outputDir
Boolean compressOutput = true
String? preCommand
String indexPrefix
File? unpairedReads
File read1
File? read2
Boolean? fastaInput
String? outputFile = outputDir + "/centrifuge.out"
String? reportFile = outputDir + "/centrifuge_report.tsv"
String? outputFilePath = outputDir + "/centrifuge.out"
String? reportFilePath = outputDir + "/centrifuge_report.tsv"
String? metFilePath # If this is specified, the report file is empty
Int? assignments
Int? minHitLen
Int? minTotalLen
...
...
@@ -84,17 +86,17 @@ task classify {
${true="-1 " false="-U " defined(read2)} ${read1} \
${"-2 " + read2} \
${"-U " + unpairedReads} \
${"--report-file " + reportFile} \
${"--report-file " + reportFile
Path
} \
${"--min-hitlen " + minHitLen} \
${"--min-totallen " + minTotalLen} \
${true="--host-taxids " false="" defined(hostTaxIds)} ${sep=',' hostTaxIds} \
${true="--exclude-taxids " false="" defined(excludeTaxIds)} ${sep=',' excludeTaxIds} \
${
"-S " + outputFile
}
${
true="| gzip -c > " false="-S " compressOutput}${outputFilePath}${true=".gz" false="" compressOutput
}
}
output {
File
outFile =
select_first([outputFile])
File reportFile = select_first([reportFile])
File
classifiedReads = if (compressOutput) then select_first([outputFilePath + ".gz"]) else
select_first([outputFile
Path
])
File reportFile = select_first([reportFile
Path
])
}
runtime {
...
...
@@ -163,3 +165,41 @@ task downloadTaxonomy {
}
}
task kreport {
String? preCommand
String outputDir
File centrifugeOut
Boolean inputIsCompressed
String kreportPath=sub(centrifugeOut, "\\.out.*", "\\.kreport")
String indexPrefix
Boolean? onlyUnique
Boolean? showZeros
Boolean? isCountTable
Int? minScore
Int? minLength
Int? cores
Int? memory
command {
set -e -o pipefail
${preCommand}
centrifuge-kreport \
-x ${indexPrefix} \
${true="--only-unique" false="" onlyUnique} \
${true="show-zeros" false="" showZeros} \
${true="--is-count-table" false="" isCountTable} \
${"--min-score " + minScore} \
${"--min-length " + minLength} \
${true="<(zcat " false="" inputIsCompressed}${centrifugeOut}${true=")" false="" inputIsCompressed} \
> ${kreportPath}
}
output {
File kreport = select_first([kreportPath])
}
runtime {
cpu: select_first([cores, 1])
memory: select_first([memory, 4])
}
}
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