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
37f0afb7
Commit
37f0afb7
authored
6 years ago
by
Ruben Vorderman
Browse files
Options
Downloads
Patches
Plain Diff
centrifuge to 1.0
parent
1c1f8955
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!34
Move all files to version 1.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
centrifuge.wdl
+151
-142
151 additions, 142 deletions
centrifuge.wdl
with
151 additions
and
142 deletions
centrifuge.wdl
+
151
−
142
View file @
37f0afb7
version 1.0
# Copyright Sequencing Analysis Support Core - Leiden University Medical Center 2018
#
# Tasks from centrifuge
task Build {
File conversionTable
File taxonomyTree
File inputFasta
String centrifugeIndexBase
String? preCommand
String? centrifugeBuildExecutable = "centrifuge-build"
#Boolean? c = false
Boolean? largeIndex = false
Boolean? noAuto = false
Int? bMax
Int? bMaxDivn
Boolean? noDiffCover = false
Boolean? noRef = false
Boolean? justRef = false
Int? offRate
Int? fTabChars
File? nameTable
File? sizeTable
Int? seed
Int? kmerCount
Int? threads
Int? memory
input {
File conversionTable
File taxonomyTree
File inputFasta
String centrifugeIndexBase
String? preCommand
String? centrifugeBuildExecutable = "centrifuge-build"
#Boolean? c = false
Boolean? largeIndex = false
Boolean? noAuto = false
Int? bMax
Int? bMaxDivn
Boolean? noDiffCover = false
Boolean? noRef = false
Boolean? justRef = false
Int? offRate
Int? fTabChars
File? nameTable
File? sizeTable
Int? seed
Int? kmerCount
Int? threads
Int? memory
}
command {
set -e -o pipefail
$
{preCommand}
$
{"mkdir -p $(dirname " + centrifugeIndexBase + ")"}
$
{centrifugeBuildExecutable} \
$
{true='--large-index' false='' largeIndex} \
$
{true='--noauto' false='' noAuto} \
$
{'--bmax ' + bMax} \
$
{'--bmaxdivn ' + bMaxDivn} \
$
{true='--nodc' false='' noDiffCover} \
$
{true='--noref' false='' noRef} \
$
{true='--justref' false='' justRef} \
$
{'--offrate ' + offRate} \
$
{'--ftabchars ' + fTabChars} \
$
{'--name-table ' + nameTable } \
$
{'--size-table ' + sizeTable} \
$
{'--seed ' + seed} \
$
{'--kmer-count' + kmerCount} \
$
{'--threads ' + threads} \
--conversion-table
$
{conversionTable} \
--taxonomy-tree
$
{taxonomyTree} \
$
{inputFasta} \
$
{centrifugeIndexBase}
~
{preCommand}
~
{"mkdir -p $(dirname " + centrifugeIndexBase + ")"}
~
{centrifugeBuildExecutable} \
~
{true='--large-index' false='' largeIndex} \
~
{true='--noauto' false='' noAuto} \
~
{'--bmax ' + bMax} \
~
{'--bmaxdivn ' + bMaxDivn} \
~
{true='--nodc' false='' noDiffCover} \
~
{true='--noref' false='' noRef} \
~
{true='--justref' false='' justRef} \
~
{'--offrate ' + offRate} \
~
{'--ftabchars ' + fTabChars} \
~
{'--name-table ' + nameTable } \
~
{'--size-table ' + sizeTable} \
~
{'--seed ' + seed} \
~
{'--kmer-count' + kmerCount} \
~
{'--threads ' + threads} \
--conversion-table
~
{conversionTable} \
--taxonomy-tree
~
{taxonomyTree} \
~
{inputFasta} \
~
{centrifugeIndexBase}
}
runtime {
cpu: select_first([threads, 8])
...
...
@@ -57,49 +59,53 @@ task Build {
}
task Classify {
String outputDir
Boolean? compressOutput = true
String? preCommand
String indexPrefix
Array[File]? unpairedReads
Array[File]+ read1
Array[File]? read2
Boolean? fastaInput
# Variables for handling output
input {
String outputDir
Boolean? compressOutput = true
String? preCommand
String indexPrefix
Array[File]? unpairedReads
Array[File]+ read1
Array[File]? read2
Boolean? fastaInput
# Variables for handling output
String? metFilePath # If this is specified, the report file is empty
Int? assignments
Int? minHitLen
Int? minTotalLen
Array[String]? hostTaxIds
Array[String]? excludeTaxIds
Int? threads
Int? memory
}
String outputFilePath = outputDir + "/centrifuge.out"
String reportFilePath = outputDir + "/centrifuge_report.tsv"
String finalOutputPath = if (compressOutput == true)
then outputFilePath + ".gz"
else outputFilePath
String? metFilePath # If this is specified, the report file is empty
Int? assignments
Int? minHitLen
Int? minTotalLen
Array[String]? hostTaxIds
Array[String]? excludeTaxIds
Int? threads
Int? memory
command {
set -e -o pipefail
mkdir -p
$
{outputDir}
$
{preCommand}
mkdir -p
~
{outputDir}
~
{preCommand}
centrifuge \
$
{"-p " + select_first([threads, 4])} \
$
{"-x " + indexPrefix} \
$
{true="-f" false="" fastaInput} \
$
{true="-k" false="" defined(assignments)}
$
{assignments} \
$
{true="-1" false="-U" defined(read2)}
$
{sep=',' read1} \
$
{true="-2" false="" defined(read2)}
$
{sep=',' read2} \
$
{true="-U" false="" defined(unpairedReads)}
$
{sep=',' unpairedReads} \
$
{"--report-file " + reportFilePath} \
$
{"--min-hitlen " + minHitLen} \
$
{"--min-totallen " + minTotalLen} \
$
{"--met-file " + metFilePath} \
$
{true="--host-taxids " false="" defined(hostTaxIds)}
$
{sep=',' hostTaxIds} \
$
{true="--exclude-taxids " false="" defined(excludeTaxIds)}
$
{sep=',' excludeTaxIds} \
$
{true="| gzip -c >" false="-S" compressOutput}
$
{finalOutputPath}
~
{"-p " + select_first([threads, 4])} \
~
{"-x " + indexPrefix} \
~
{true="-f" false="" fastaInput} \
~
{true="-k" false="" defined(assignments)}
~
{assignments} \
~
{true="-1" false="-U" defined(read2)}
~
{sep=',' read1} \
~
{true="-2" false="" defined(read2)}
~
{sep=',' read2} \
~
{true="-U" false="" defined(unpairedReads)}
~
{sep=',' unpairedReads} \
~
{"--report-file " + reportFilePath} \
~
{"--min-hitlen " + minHitLen} \
~
{"--min-totallen " + minTotalLen} \
~
{"--met-file " + metFilePath} \
~
{true="--host-taxids " false="" defined(hostTaxIds)}
~
{sep=',' hostTaxIds} \
~
{true="--exclude-taxids " false="" defined(excludeTaxIds)}
~
{sep=',' excludeTaxIds} \
~
{true="| gzip -c >" false="-S" compressOutput}
~
{finalOutputPath}
}
output {
...
...
@@ -114,58 +120,60 @@ task Classify {
}
task Download {
String libraryPath
Array[String]? domain
String? executable = "centrifuge-download"
String? preCommand
String? seqTaxMapPath
String? database = "refseq"
String? assemblyLevel
String? refseqCategory
Array[String]? taxIds
Boolean? filterUnplaced = false
Boolean? maskLowComplexRegions = false
Boolean? downloadRnaSeqs = false
Boolean? modifyHeader = false
Boolean? downloadGiMap = false
input {
String libraryPath
Array[String]? domain
String? executable = "centrifuge-download"
String? preCommand
String? seqTaxMapPath
String? database = "refseq"
String? assemblyLevel
String? refseqCategory
Array[String]? taxIds
Boolean? filterUnplaced = false
Boolean? maskLowComplexRegions = false
Boolean? downloadRnaSeqs = false
Boolean? modifyHeader = false
Boolean? downloadGiMap = false
}
# This will use centrifuge-download to download.
# The bash statement at the beginning is to make sure
# the directory for the SeqTaxMapPath exists.
command {
set -e -o pipefail
$
{preCommand}
$
{"mkdir -p $(dirname " + seqTaxMapPath + ")"}
$
{executable} \
-o
$
{libraryPath} \
$
{true='-d ' false='' defined(domain)}
$
{sep=',' domain} \
$
{'-a "' + assemblyLevel + '"'} \
$
{"-c " + refseqCategory} \
$
{true='-t' false='' defined(taxIds)} '
$
{sep=',' taxIds}' \
$
{true='-r' false='' downloadRnaSeqs} \
$
{true='-u' false='' filterUnplaced} \
$
{true='-m' false='' maskLowComplexRegions} \
$
{true='-l' false='' modifyHeader} \
$
{true='-g' false='' downloadGiMap} \
$
{database}
$
{">> " + seqTaxMapPath}
~
{preCommand}
~
{"mkdir -p $(dirname " + seqTaxMapPath + ")"}
~
{executable} \
-o
~
{libraryPath} \
~
{true='-d ' false='' defined(domain)}
~
{sep=',' domain} \
~
{'-a "' + assemblyLevel + '"'} \
~
{"-c " + refseqCategory} \
~
{true='-t' false='' defined(taxIds)} '
~
{sep=',' taxIds}' \
~
{true='-r' false='' downloadRnaSeqs} \
~
{true='-u' false='' filterUnplaced} \
~
{true='-m' false='' maskLowComplexRegions} \
~
{true='-l' false='' modifyHeader} \
~
{true='-g' false='' downloadGiMap} \
~
{database}
~
{">> " + seqTaxMapPath}
}
output {
File seqTaxMap = "
$
{seqTaxMapPath}"
File seqTaxMap = "
~
{seqTaxMapPath}"
File library = libraryPath
Array[File] fastaFiles = glob(libraryPath + "/*/*.fna")
}
}
task DownloadTaxonomy {
String centrifugeTaxonomyDir
String? executable = "centrifuge-download"
String? preCommand
input {
String centrifugeTaxonomyDir
String? executable = "centrifuge-download"
String? preCommand
}
command {
set -e -o pipefail
$
{preCommand}
$
{executable} \
-o
$
{centrifugeTaxonomyDir} \
~
{preCommand}
~
{executable} \
-o
~
{centrifugeTaxonomyDir} \
taxonomy
}
...
...
@@ -176,36 +184,37 @@ task DownloadTaxonomy {
}
task Kreport {
String? preCommand
File centrifugeOut
Boolean inputIsCompressed
String outputDir
String? suffix = "kreport"
String? prefix = "centrifuge"
input {
String? preCommand
File centrifugeOut
Boolean inputIsCompressed
String outputDir
String? suffix = "kreport"
String? prefix = "centrifuge"
String indexPrefix
Boolean? onlyUnique
Boolean? showZeros
Boolean? isCountTable
Int? minScore
Int? minLength
Int? cores
Int? memory
}
String kreportFilePath = outputDir + "/" + prefix + "." + suffix
String indexPrefix
Boolean? onlyUnique
Boolean? showZeros
Boolean? isCountTable
Int? minScore
Int? minLength
Int? cores
Int? memory
command {
set -e -o pipefail
$
{preCommand}
~
{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} \
>
$
{kreportFilePath}
-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} \
>
~
{kreportFilePath}
}
output {
...
...
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