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
No related tags found
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
# Copyright Sequencing Analysis Support Core - Leiden University Medical Center 2018
#
#
# Tasks from centrifuge
# Tasks from centrifuge
task Build {
task Build {
File conversionTable
input {
File taxonomyTree
File conversionTable
File inputFasta
File taxonomyTree
String centrifugeIndexBase
File inputFasta
String? preCommand
String centrifugeIndexBase
String? centrifugeBuildExecutable = "centrifuge-build"
String? preCommand
#Boolean? c = false
String? centrifugeBuildExecutable = "centrifuge-build"
Boolean? largeIndex = false
#Boolean? c = false
Boolean? noAuto = false
Boolean? largeIndex = false
Int? bMax
Boolean? noAuto = false
Int? bMaxDivn
Int? bMax
Boolean? noDiffCover = false
Int? bMaxDivn
Boolean? noRef = false
Boolean? noDiffCover = false
Boolean? justRef = false
Boolean? noRef = false
Int? offRate
Boolean? justRef = false
Int? fTabChars
Int? offRate
File? nameTable
Int? fTabChars
File? sizeTable
File? nameTable
Int? seed
File? sizeTable
Int? kmerCount
Int? seed
Int? kmerCount
Int? threads
Int? memory
Int? threads
Int? memory
}
command {
command {
set -e -o pipefail
set -e -o pipefail
$
{preCommand}
~
{preCommand}
$
{"mkdir -p $(dirname " + centrifugeIndexBase + ")"}
~
{"mkdir -p $(dirname " + centrifugeIndexBase + ")"}
$
{centrifugeBuildExecutable} \
~
{centrifugeBuildExecutable} \
$
{true='--large-index' false='' largeIndex} \
~
{true='--large-index' false='' largeIndex} \
$
{true='--noauto' false='' noAuto} \
~
{true='--noauto' false='' noAuto} \
$
{'--bmax ' + bMax} \
~
{'--bmax ' + bMax} \
$
{'--bmaxdivn ' + bMaxDivn} \
~
{'--bmaxdivn ' + bMaxDivn} \
$
{true='--nodc' false='' noDiffCover} \
~
{true='--nodc' false='' noDiffCover} \
$
{true='--noref' false='' noRef} \
~
{true='--noref' false='' noRef} \
$
{true='--justref' false='' justRef} \
~
{true='--justref' false='' justRef} \
$
{'--offrate ' + offRate} \
~
{'--offrate ' + offRate} \
$
{'--ftabchars ' + fTabChars} \
~
{'--ftabchars ' + fTabChars} \
$
{'--name-table ' + nameTable } \
~
{'--name-table ' + nameTable } \
$
{'--size-table ' + sizeTable} \
~
{'--size-table ' + sizeTable} \
$
{'--seed ' + seed} \
~
{'--seed ' + seed} \
$
{'--kmer-count' + kmerCount} \
~
{'--kmer-count' + kmerCount} \
$
{'--threads ' + threads} \
~
{'--threads ' + threads} \
--conversion-table
$
{conversionTable} \
--conversion-table
~
{conversionTable} \
--taxonomy-tree
$
{taxonomyTree} \
--taxonomy-tree
~
{taxonomyTree} \
$
{inputFasta} \
~
{inputFasta} \
$
{centrifugeIndexBase}
~
{centrifugeIndexBase}
}
}
runtime {
runtime {
cpu: select_first([threads, 8])
cpu: select_first([threads, 8])
...
@@ -57,49 +59,53 @@ task Build {
...
@@ -57,49 +59,53 @@ task Build {
}
}
task Classify {
task Classify {
String outputDir
input {
Boolean? compressOutput = true
String outputDir
String? preCommand
Boolean? compressOutput = true
String indexPrefix
String? preCommand
Array[File]? unpairedReads
String indexPrefix
Array[File]+ read1
Array[File]? unpairedReads
Array[File]? read2
Array[File]+ read1
Boolean? fastaInput
Array[File]? read2
# Variables for handling output
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 outputFilePath = outputDir + "/centrifuge.out"
String reportFilePath = outputDir + "/centrifuge_report.tsv"
String reportFilePath = outputDir + "/centrifuge_report.tsv"
String finalOutputPath = if (compressOutput == true)
String finalOutputPath = if (compressOutput == true)
then outputFilePath + ".gz"
then outputFilePath + ".gz"
else outputFilePath
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 {
command {
set -e -o pipefail
set -e -o pipefail
mkdir -p
$
{outputDir}
mkdir -p
~
{outputDir}
$
{preCommand}
~
{preCommand}
centrifuge \
centrifuge \
$
{"-p " + select_first([threads, 4])} \
~
{"-p " + select_first([threads, 4])} \
$
{"-x " + indexPrefix} \
~
{"-x " + indexPrefix} \
$
{true="-f" false="" fastaInput} \
~
{true="-f" false="" fastaInput} \
$
{true="-k" false="" defined(assignments)}
$
{assignments} \
~
{true="-k" false="" defined(assignments)}
~
{assignments} \
$
{true="-1" false="-U" defined(read2)}
$
{sep=',' read1} \
~
{true="-1" false="-U" defined(read2)}
~
{sep=',' read1} \
$
{true="-2" false="" defined(read2)}
$
{sep=',' read2} \
~
{true="-2" false="" defined(read2)}
~
{sep=',' read2} \
$
{true="-U" false="" defined(unpairedReads)}
$
{sep=',' unpairedReads} \
~
{true="-U" false="" defined(unpairedReads)}
~
{sep=',' unpairedReads} \
$
{"--report-file " + reportFilePath} \
~
{"--report-file " + reportFilePath} \
$
{"--min-hitlen " + minHitLen} \
~
{"--min-hitlen " + minHitLen} \
$
{"--min-totallen " + minTotalLen} \
~
{"--min-totallen " + minTotalLen} \
$
{"--met-file " + metFilePath} \
~
{"--met-file " + metFilePath} \
$
{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}
$
{finalOutputPath}
~
{true="| gzip -c >" false="-S" compressOutput}
~
{finalOutputPath}
}
}
output {
output {
...
@@ -114,58 +120,60 @@ task Classify {
...
@@ -114,58 +120,60 @@ task Classify {
}
}
task Download {
task Download {
String libraryPath
input {
Array[String]? domain
String libraryPath
String? executable = "centrifuge-download"
Array[String]? domain
String? preCommand
String? executable = "centrifuge-download"
String? seqTaxMapPath
String? preCommand
String? database = "refseq"
String? seqTaxMapPath
String? assemblyLevel
String? database = "refseq"
String? refseqCategory
String? assemblyLevel
Array[String]? taxIds
String? refseqCategory
Boolean? filterUnplaced = false
Array[String]? taxIds
Boolean? maskLowComplexRegions = false
Boolean? filterUnplaced = false
Boolean? downloadRnaSeqs = false
Boolean? maskLowComplexRegions = false
Boolean? modifyHeader = false
Boolean? downloadRnaSeqs = false
Boolean? downloadGiMap = false
Boolean? modifyHeader = false
Boolean? downloadGiMap = false
}
# This will use centrifuge-download to download.
# This will use centrifuge-download to download.
# The bash statement at the beginning is to make sure
# The bash statement at the beginning is to make sure
# the directory for the SeqTaxMapPath exists.
# the directory for the SeqTaxMapPath exists.
command {
command {
set -e -o pipefail
set -e -o pipefail
$
{preCommand}
~
{preCommand}
$
{"mkdir -p $(dirname " + seqTaxMapPath + ")"}
~
{"mkdir -p $(dirname " + seqTaxMapPath + ")"}
$
{executable} \
~
{executable} \
-o
$
{libraryPath} \
-o
~
{libraryPath} \
$
{true='-d ' false='' defined(domain)}
$
{sep=',' domain} \
~
{true='-d ' false='' defined(domain)}
~
{sep=',' domain} \
$
{'-a "' + assemblyLevel + '"'} \
~
{'-a "' + assemblyLevel + '"'} \
$
{"-c " + refseqCategory} \
~
{"-c " + refseqCategory} \
$
{true='-t' false='' defined(taxIds)} '
$
{sep=',' taxIds}' \
~
{true='-t' false='' defined(taxIds)} '
~
{sep=',' taxIds}' \
$
{true='-r' false='' downloadRnaSeqs} \
~
{true='-r' false='' downloadRnaSeqs} \
$
{true='-u' false='' filterUnplaced} \
~
{true='-u' false='' filterUnplaced} \
$
{true='-m' false='' maskLowComplexRegions} \
~
{true='-m' false='' maskLowComplexRegions} \
$
{true='-l' false='' modifyHeader} \
~
{true='-l' false='' modifyHeader} \
$
{true='-g' false='' downloadGiMap} \
~
{true='-g' false='' downloadGiMap} \
$
{database}
$
{">> " + seqTaxMapPath}
~
{database}
~
{">> " + seqTaxMapPath}
}
}
output {
output {
File seqTaxMap = "
$
{seqTaxMapPath}"
File seqTaxMap = "
~
{seqTaxMapPath}"
File library = libraryPath
File library = libraryPath
Array[File] fastaFiles = glob(libraryPath + "/*/*.fna")
Array[File] fastaFiles = glob(libraryPath + "/*/*.fna")
}
}
}
}
task DownloadTaxonomy {
task DownloadTaxonomy {
String centrifugeTaxonomyDir
input {
String? executable = "centrifuge-download"
String centrifugeTaxonomyDir
String? preCommand
String? executable = "centrifuge-download"
String? preCommand
}
command {
command {
set -e -o pipefail
set -e -o pipefail
$
{preCommand}
~
{preCommand}
$
{executable} \
~
{executable} \
-o
$
{centrifugeTaxonomyDir} \
-o
~
{centrifugeTaxonomyDir} \
taxonomy
taxonomy
}
}
...
@@ -176,36 +184,37 @@ task DownloadTaxonomy {
...
@@ -176,36 +184,37 @@ task DownloadTaxonomy {
}
}
task Kreport {
task Kreport {
String? preCommand
input {
File centrifugeOut
String? preCommand
Boolean inputIsCompressed
File centrifugeOut
String outputDir
Boolean inputIsCompressed
String? suffix = "kreport"
String outputDir
String? prefix = "centrifuge"
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 kreportFilePath = outputDir + "/" + prefix + "." + suffix
String indexPrefix
Boolean? onlyUnique
Boolean? showZeros
Boolean? isCountTable
Int? minScore
Int? minLength
Int? cores
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="<(zcat" false="" inputIsCompressed}
~
{centrifugeOut}\
$
{true=")" false="" inputIsCompressed} \
~
{true=")" false="" inputIsCompressed} \
>
$
{kreportFilePath}
>
~
{kreportFilePath}
}
}
output {
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