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
6cc4acb4
Commit
6cc4acb4
authored
6 years ago
by
Pappas
Browse files
Options
Downloads
Patches
Plain Diff
Requested changes
parent
a7a1986c
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
+29
-24
29 additions, 24 deletions
centrifuge.wdl
with
29 additions
and
24 deletions
centrifuge.wdl
+
29
−
24
View file @
6cc4acb4
...
@@ -22,7 +22,8 @@ task build {
...
@@ -22,7 +22,8 @@ task build {
File? nameTable
File? nameTable
File? sizeTable
File? sizeTable
Int? seed
Int? seed
Int? threads = 1
Int? threads
Int? memory
Int? kmerCount
Int? kmerCount
command {
command {
...
@@ -50,22 +51,25 @@ task build {
...
@@ -50,22 +51,25 @@ task build {
${centrifugeIndexBase}
${centrifugeIndexBase}
}
}
runtime {
runtime {
cpu: select_first([threads])
cpu: select_first([threads, 8])
memory: select_first([memory, 20])
}
}
}
}
task classify {
task classify {
String outputDir
String outputDir
Boolean compressOutput = true
Boolean
?
compressOutput = true
String? preCommand
String? preCommand
String indexPrefix
String indexPrefix
File? unpairedReads
File? unpairedReads
File read1
File read1
File? read2
File? read2
Boolean? fastaInput
Boolean? fastaInput
String? outputFilePath = outputDir + "/centrifuge.out"
# Variables for handling output
String? reportFilePath = outputDir + "/centrifuge_report.tsv"
String outputFileName = outputDir + "/centrifuge.out"
String? metFilePath # If this is specified, the report file is empty
String reportFileName = outputDir + "/centrifuge_report.tsv"
String finalOutputName = if (compressOutput == true) then outputFileName + ".gz" else outputFileName
String? metFileName # If this is specified, the report file is empty
Int? assignments
Int? assignments
Int? minHitLen
Int? minHitLen
Int? minTotalLen
Int? minTotalLen
...
@@ -86,17 +90,18 @@ task classify {
...
@@ -86,17 +90,18 @@ task classify {
${true="-1 " false="-U " defined(read2)} ${read1} \
${true="-1 " false="-U " defined(read2)} ${read1} \
${"-2 " + read2} \
${"-2 " + read2} \
${"-U " + unpairedReads} \
${"-U " + unpairedReads} \
${"--report-file " + reportFile
Path
} \
${"--report-file " + reportFile
Name
} \
${"--min-hitlen " + minHitLen} \
${"--min-hitlen " + minHitLen} \
${"--min-totallen " + minTotalLen} \
${"--min-totallen " + minTotalLen} \
${"--met-file " + metFileName} \
${true="--host-taxids " false="" defined(hostTaxIds)} ${sep=',' hostTaxIds} \
${true="--host-taxids " false="" defined(hostTaxIds)} ${sep=',' hostTaxIds} \
${true="--exclude-taxids " false="" defined(excludeTaxIds)} ${sep=',' excludeTaxIds} \
${true="--exclude-taxids " false="" defined(excludeTaxIds)} ${sep=',' excludeTaxIds} \
${true="| gzip -c >
" false="-S
" compressOutput}${
outputFilePath}${true=".gz" false="" compress
Output}
${true="| gzip -c >" false="-S" compressOutput}
${
final
Output
Name
}
}
}
output {
output {
File classifiedReads =
if (compressOutput) then select_first([outputFilePath + ".gz"]) else select_first([outputFilePath])
File classifiedReads =
finalOutputName
File reportFile =
select_first([
reportFile
Path])
File reportFile = reportFile
Name
}
}
runtime {
runtime {
...
@@ -167,10 +172,9 @@ task downloadTaxonomy {
...
@@ -167,10 +172,9 @@ task downloadTaxonomy {
task kreport {
task kreport {
String? preCommand
String? preCommand
String outputDir
File centrifugeOut
File centrifugeOut
Boolean inputIsCompressed
Boolean inputIsCompressed
String kreport
Path
=sub(centrifugeOut, "\\.out
.*
", "\\.kreport")
String kreport
FileName
=sub(centrifugeOut, "\\.out
$|\\.out\\.gz$
", "\\.kreport")
String indexPrefix
String indexPrefix
Boolean? onlyUnique
Boolean? onlyUnique
Boolean? showZeros
Boolean? showZeros
...
@@ -181,21 +185,22 @@ task kreport {
...
@@ -181,21 +185,22 @@ task kreport {
Int? memory
Int? memory
command {
command {
set -e -o pipefail
set -e -o pipefail
${preCommand}
${preCommand}
centrifuge-kreport \
centrifuge-kreport \
-x ${indexPrefix} \
-x ${indexPrefix} \
${true="--only-unique" false="" onlyUnique} \
${true="--only-unique" false="" onlyUnique} \
${true="show-zeros" false="" showZeros} \
${true="--show-zeros" false="" showZeros} \
${true="--is-count-table" false="" isCountTable} \
${true="--is-count-table" false="" isCountTable} \
${"--min-score " + minScore} \
${"--min-score " + minScore} \
${"--min-length " + minLength} \
${"--min-length " + minLength} \
${true="<(zcat " false="" inputIsCompressed}${centrifugeOut}${true=")" false="" inputIsCompressed} \
${true="<(zcat" false="" inputIsCompressed} ${centrifugeOut}\
> ${kreportPath}
${true=")" false="" inputIsCompressed} \
> ${kreportFileName}
}
}
output {
output {
File kreport =
select_first([kreportPath])
File kreport =
kreportFileName
}
}
runtime {
runtime {
...
...
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