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
c078fe7c
Commit
c078fe7c
authored
6 years ago
by
Cats
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into BIOWDL-25
parents
d4c5ec42
306d5ec0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!15
Biowdl 25
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
biopet.wdl
+101
-71
101 additions, 71 deletions
biopet.wdl
bwa.wdl
+9
-8
9 additions, 8 deletions
bwa.wdl
picard.wdl
+35
-0
35 additions, 0 deletions
picard.wdl
samtools.wdl
+37
-0
37 additions, 0 deletions
samtools.wdl
spades.wdl
+5
-4
5 additions, 4 deletions
spades.wdl
with
187 additions
and
83 deletions
biopet.wdl
+
101
−
71
View file @
c078fe7c
# PLEASE ADD TASKS IN ALPHABETIC ORDER.
# This makes searching a lot easier.
task BaseCounter {
String? preCommand
String tool_jar #Should this be of type File?
File bam
File refFlat
String outputDir
String prefix
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 12.0]))
command {
set -e -o pipefail
${preCommand}
mkdir -p ${outputDir}
java -Xmx${mem}G -jar ${tool_jar} \
-b ${bam} \
-r ${refFlat} \
-o ${outputDir} \
-p ${prefix}
}
output {
File exonAntisense = outputDir + "/" + prefix + ".base.exon.antisense.counts"
File exon = outputDir + "/" + prefix + ".base.exon.counts"
File exonMergeAntisense = outputDir + "/" + prefix + ".base.exon.merge.antisense.counts"
File exonMerge = outputDir + "/" + prefix + ".base.exon.merge.counts"
File exonMergeSense = outputDir + "/" + prefix + ".base.exon.merge.sense.counts"
File exonSense = outputDir + "/" + prefix + ".base.exon.sense.counts"
File geneAntisense = outputDir + "/" + prefix + ".base.gene.antisense.counts"
File gene = outputDir + "/" + prefix + ".base.gene.counts"
File geneExonicAntisense = outputDir + "/" + prefix + ".base.gene.exonic.antisense.counts"
File geneExonic = outputDir + "/" + prefix + ".base.gene.exonic.counts"
File geneExonicSense = outputDir + "/" + prefix + ".base.gene.exonic.sense.counts"
File geneIntronicAntisense = outputDir + "/" + prefix + ".base.gene.intronic.antisense.counts"
File geneIntronic = outputDir + "/" + prefix + ".base.gene.intronic.counts"
File geneIntronicSense = outputDir + "/" + prefix + ".base.gene.intronic.sense.counts"
File geneSense = outputDir + "/" + prefix + ".base.gene.sense.counts"
File intronAntisense = outputDir + "/" + prefix + ".base.intron.antisense.counts"
File intron = outputDir + "/" + prefix + ".base.intron.counts"
File intronMergeAntisense = outputDir + "/" + prefix + ".base.intron.merge.antisense.counts"
File intronMerge = outputDir + "/" + prefix + ".base.intron.merge.counts"
File intronMergeSense = outputDir + "/" + prefix + ".base.intron.merge.sense.counts"
File intronSense = outputDir + "/" + prefix + ".base.intron.sense.counts"
File metaExonsNonStranded = outputDir + "/" + prefix + ".base.metaexons.non_stranded.counts"
File metaExonsStrandedAntisense = outputDir + "/" + prefix + ".base.metaexons.stranded.antisense.counts"
File metaExonsStranded = outputDir + "/" + prefix + ".base.metaexons.stranded.counts"
File metaExonsStrandedSense = outputDir + "/" + prefix + ".base.metaexons.stranded.sense.counts"
File transcriptAntisense = outputDir + "/" + prefix + ".base.transcript.antisense.counts"
File transcript = outputDir + "/" + prefix + ".base.transcript.counts"
File transcriptExonicAntisense = outputDir + "/" + prefix + ".base.transcript.exonic.antisense.counts"
File transcriptExonic = outputDir + "/" + prefix + ".base.transcript.exonic.counts"
File transcriptExonicSense = outputDir + "/" + prefix + ".base.transcript.exonic.sense.counts"
File transcriptIntronicAntisense = outputDir + "/" + prefix + ".base.transcript.intronic.antisense.counts"
File transcriptIntronic = outputDir + "/" + prefix + ".base.transcript.intronic.counts"
File transcriptIntronicSense = outputDir + "/" + prefix + ".base.transcript.intronic.sense.counts"
File transcriptSense = outputDir + "/" + prefix + ".base.transcript.sense.counts"
}
runtime {
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
task FastqSplitter {
String? preCommand
File inputFastq
...
...
@@ -23,36 +90,30 @@ task FastqSplitter {
}
}
task
ScatterRegions
{
task
FastqSync
{
String? preCommand
File ref_fasta
File ref_dict
String outputDirPath
String tool_jar
Int? scatterSize
File? regions
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
File ref1
File ref2
File in1
File in2
String out1path
String out2path
File tool_jar
command {
set -e -o pipefail
${preCommand}
mkdir -p ${outputDirPath}
java -Xmx${mem}G -jar ${tool_jar} \
-R ${ref_fasta} \
-o ${outputDirPath} \
${"-s " + scatterSize} \
${"-L " + regions}
mkdir -p $(dirname ${out1path}) $(dirname ${out2path})
java -jar ${tool_jar} \
--in1 ${in1} \
--in2 ${in2} \
--ref1 ${ref1} \
--ref2 ${ref2} \
--out1 ${out1path} \
--out2 ${out2path}
}
output {
Array[File] scatters = glob(outputDirPath + "/scatter-*.bed")
}
runtime {
memory: ceil(mem * select_first([memoryMultiplier, 2.0]))
File out1 = out1path
File out2 = out2path
}
}
...
...
@@ -96,67 +157,36 @@ task SampleConfig {
}
}
task
BaseCounter
{
task
ScatterRegions
{
String? preCommand
String tool_jar #Should this be of type File?
File bam
File refFlat
String outputDir
String prefix
File ref_fasta
File ref_dict
String outputDirPath
String tool_jar
Int? scatterSize
File? regions
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory,
12
.0]))
Int mem = ceil(select_first([memory,
4
.0]))
command {
set -e -o pipefail
${preCommand}
mkdir -p ${outputDir}
mkdir -p ${outputDir
Path
}
java -Xmx${mem}G -jar ${tool_jar} \
-b ${bam
} \
-r ${refFl
at} \
-o
${
outputDir
} \
-p
${
prefix
}
-R ${ref_fasta
} \
-o ${outputDirP
at
h
} \
${
"-s " + scatterSize
} \
${
"-L " + regions
}
}
output {
File exonAntisense = outputDir + "/" + prefix + ".base.exon.antisense.counts"
File exon = outputDir + "/" + prefix + ".base.exon.counts"
File exonMergeAntisense = outputDir + "/" + prefix + ".base.exon.merge.antisense.counts"
File exonMerge = outputDir + "/" + prefix + ".base.exon.merge.counts"
File exonMergeSense = outputDir + "/" + prefix + ".base.exon.merge.sense.counts"
File exonSense = outputDir + "/" + prefix + ".base.exon.sense.counts"
File geneAntisense = outputDir + "/" + prefix + ".base.gene.antisense.counts"
File gene = outputDir + "/" + prefix + ".base.gene.counts"
File geneExonicAntisense = outputDir + "/" + prefix + ".base.gene.exonic.antisense.counts"
File geneExonic = outputDir + "/" + prefix + ".base.gene.exonic.counts"
File geneExonicSense = outputDir + "/" + prefix + ".base.gene.exonic.sense.counts"
File geneIntronicAntisense = outputDir + "/" + prefix + ".base.gene.intronic.antisense.counts"
File geneIntronic = outputDir + "/" + prefix + ".base.gene.intronic.counts"
File geneIntronicSense = outputDir + "/" + prefix + ".base.gene.intronic.sense.counts"
File geneSense = outputDir + "/" + prefix + ".base.gene.sense.counts"
File intronAntisense = outputDir + "/" + prefix + ".base.intron.antisense.counts"
File intron = outputDir + "/" + prefix + ".base.intron.counts"
File intronMergeAntisense = outputDir + "/" + prefix + ".base.intron.merge.antisense.counts"
File intronMerge = outputDir + "/" + prefix + ".base.intron.merge.counts"
File intronMergeSense = outputDir + "/" + prefix + ".base.intron.merge.sense.counts"
File intronSense = outputDir + "/" + prefix + ".base.intron.sense.counts"
File metaExonsNonStranded = outputDir + "/" + prefix + ".base.metaexons.non_stranded.counts"
File metaExonsStrandedAntisense = outputDir + "/" + prefix + ".base.metaexons.stranded.antisense.counts"
File metaExonsStranded = outputDir + "/" + prefix + ".base.metaexons.stranded.counts"
File metaExonsStrandedSense = outputDir + "/" + prefix + ".base.metaexons.stranded.sense.counts"
File transcriptAntisense = outputDir + "/" + prefix + ".base.transcript.antisense.counts"
File transcript = outputDir + "/" + prefix + ".base.transcript.counts"
File transcriptExonicAntisense = outputDir + "/" + prefix + ".base.transcript.exonic.antisense.counts"
File transcriptExonic = outputDir + "/" + prefix + ".base.transcript.exonic.counts"
File transcriptExonicSense = outputDir + "/" + prefix + ".base.transcript.exonic.sense.counts"
File transcriptIntronicAntisense = outputDir + "/" + prefix + ".base.transcript.intronic.antisense.counts"
File transcriptIntronic = outputDir + "/" + prefix + ".base.transcript.intronic.counts"
File transcriptIntronicSense = outputDir + "/" + prefix + ".base.transcript.intronic.sense.counts"
File transcriptSense = outputDir + "/" + prefix + ".base.transcript.sense.counts"
Array[File] scatters = glob(outputDirPath + "/scatter-*.bed")
}
runtime {
memory: ceil(mem * select_first([memoryMultiplier,
1.5
]))
memory: ceil(mem * select_first([memoryMultiplier,
2.0
]))
}
}
This diff is collapsed.
Click to expand it.
bwa.wdl
+
9
−
8
View file @
c078fe7c
task
BwaM
em {
task
m
em {
String? preCommand
File inputR1
File? inputR2
String
referenceFasta
File
referenceFasta
Array[File] indexFiles # These indexFiles need to be added, otherwise cromwell will not find them.
String outputPath
String? readgroup
...
...
@@ -10,6 +10,7 @@ task BwaMem {
Int? threads
Int? memory
command {
set -e -o pipefail
mkdir -p $(dirname ${outputPath})
...
...
@@ -23,8 +24,8 @@ task BwaMem {
File bamFile = outputPath
}
runtime{
cpu:
if defined(threads) then threads else 1
memory:
if defined(memory) then memory else 8
cpu:
select_first([threads,1])
memory:
select_first([memory,8])
}
}
...
...
@@ -35,6 +36,7 @@ task index {
Int? blockSize
String? outputDir
String fastaFilename = basename(fasta)
String outputFile = if (defined(outputDir)) then outputDir + "/" + fastaFilename else fasta
command {
set -e -o pipefail
...
...
@@ -47,13 +49,12 @@ task index {
bwa index \
${"-a " + constructionAlgorithm} \
${"-b" + blockSize} \
${output
Dir + "/"}${fastaFilenam
e}
${output
Fil
e}
}
output {
File indexBase = if (defined(outputDir)) then select_first([outputDir]) + "/" + fastaFilename else fastaFilename
File indexedFasta = indexBase
Array[File] indexFiles = [indexBase + ".bwt",indexBase + ".pac",indexBase + ".sa",indexBase + ".amb",indexBase + ".ann"]
File indexedFasta = outputFile
Array[File] indexFiles = [outputFile + ".bwt",outputFile + ".pac",outputFile + ".sa",outputFile + ".amb",outputFile + ".ann"]
}
parameter_meta {
fasta: "Fasta file to be indexed"
...
...
This diff is collapsed.
Click to expand it.
picard.wdl
+
35
−
0
View file @
c078fe7c
...
...
@@ -147,6 +147,41 @@ task MergeVCFs {
File output_vcf_index = output_vcf_path + ".tbi"
}
runtime {
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
task SamToFastq {
String? preCommand
File inputBam
String outputRead1
String? outputRead2
String? outputUnpaired
String picard_jar
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 16.0])) # High memory default to avoid crashes.
command {
set -e -o pipefail
${preCommand}
java \
-Xmx${mem}G \
-jar ${picard_jar} \
SamToFastq \
I=${inputBam} \
${"FASTQ=" + outputRead1} \
${"SECOND_END_FASTQ=" + outputRead2} \
${"UNPAIRED_FASTQ=" + outputUnpaired}
}
output {
File read1 = outputRead1
File? read2 = outputRead2
File? unpairedRead = outputUnpaired
}
runtime {
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
...
...
This diff is collapsed.
Click to expand it.
samtools.wdl
+
37
−
0
View file @
c078fe7c
...
...
@@ -118,3 +118,40 @@ task fastq {
}
}
task view {
String? preCommand
File inFile
File? referenceFasta
String outputFileName
Boolean? outputBam
Boolean? uncompressedBamOutput
Int? includeFilter
Int? excludeFilter
Int? excludeSpecificFilter
Int? threads
Int? memory
command {
set -e -o pipefail
${preCommand}
samtools view \
${"-T " + referenceFasta} \
${"-o " + outputFileName} \
${true="-b " false="" outputBam} \
${true="-u " false="" uncompressedBamOutput} \
${"-f " + includeFilter} \
${"-F " + excludeFilter} \
${"-G " + excludeSpecificFilter} \
${"--threads " + threads - 1} \
${inFile}
}
output {
File outputFile = outputFileName
}
runtime {
cpu: select_first([threads, 1])
memory: select_first([memory, 1])
}
}
This diff is collapsed.
Click to expand it.
spades.wdl
+
5
−
4
View file @
c078fe7c
...
...
@@ -22,14 +22,15 @@ task spades {
Boolean? disableRepeatResolution
File? dataset
Int? threads
In
t? memoryGb
Floa
t? memoryGb
File? tmpDir
String? k
Float? covCutoff
Int? phredOffset
Int finalThreads = select_first([threads,1])
Int totalMemory = select_first([memoryGb, finalThreads * 16])
Int clusterMemory = totalMemory / finalThreads
Float totalMemory = select_first([memoryGb, finalThreads * 16.0])
Int finalMemory = ceil(totalMemory)
Int clusterMemory = ceil(totalMemory / finalThreads)
command {
set -e -o pipefail
...
...
@@ -57,7 +58,7 @@ task spades {
${true="--disable-rr" false="" disableRepeatResolution } \
${"--dataset " + dataset } \
${"--threads " + finalThreads} \
${"--memory " +
tot
alMemory } \
${"--memory " +
fin
alMemory } \
${"-k " + k } \
${"--cov-cutoff " + covCutoff } \
${"--phred-offset " + phredOffset }
...
...
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