Skip to content
Snippets Groups Projects
Commit c6fe0300 authored by Ruben Vorderman's avatar Ruben Vorderman
Browse files

Use samtools dict instead of Picard CreateSequenceDictionary

parent 46bf6537
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ that users understand how the changes affect the new version. ...@@ -9,7 +9,7 @@ that users understand how the changes affect the new version.
--> -->
version 5.1.0-dev version 5.1.0-dev
--------------------------- ---------------------------
+ Add a combined Picard CreateSequenceDictionary and samtools faidx task. + Add a combined samtools dict and samtools faidx task.
+ Add a BWA index task. + Add a BWA index task.
+ Move all memory notation to `KiB`, `MiB` and `GiB` from `K`, `M` and `G` + Move all memory notation to `KiB`, `MiB` and `GiB` from `K`, `M` and `G`
previously. The WDL spec clearly distuingishes between SI and binary previously. The WDL spec clearly distuingishes between SI and binary
......
...@@ -72,49 +72,4 @@ task InputConverter { ...@@ -72,49 +72,4 @@ task InputConverter {
# outputs # outputs
json: {description: "JSON file version of the input sample sheet."} json: {description: "JSON file version of the input sample sheet."}
} }
}
task IndexFastaFile {
input {
File inputFile
String javaXmx = "2G"
String memory = "3GiB"
}
String outputFile = basename(inputFile)
# Capture .fa¸ .fna and .fasta
String outputDict = sub(outputFile, "\.fn?as?t?a?$", "") + ".dict"
# This executes both picard and samtools, so indexes are co-located in the same folder.
command <<<
set -e
cp ~{inputFile} ~{outputFile}
picard -Xmx~{javaXmx} \
-XX:ParallelGCThreads=1 \
CreateSequenceDictionary \
REFERENCE=~{inputFile} \
OUTPUT="~{outputDict}"
samtools faidx ~{outputFile} --fai-idx ~{outputFile}.fai
>>>
output {
File outputFasta = outputFile
File outputFastaDict = outputDict
File outputFastaFai = outputFile + ".fai"
}
runtime {
memory: memory
# Contains picard 2.27.4, samtools 1.15.1
docker: "quay.io/biocontainers/mulled-v2-b0664646864bfdb46c5343b1b2b93fc05adb4b77:39a005770a3e30fb6aa3bf424b57ddf52bae7ece-0"
}
parameter_meta {
# inputs
inputFile: {description: "The input fasta file.", category: "required"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.", category: "advanced"}
memory: {description: "The amount of memory available to the job.", category: "advanced"}
# outputs
outputFasta: {description: "Fasta file that is co-located with the indexes"}
outputFastaFai: {description: "Fasta index file for the outputFasta file."}
outputFastaDict: {description: "Sequence dictionary for the outputFasta file."}
}
} }
\ No newline at end of file
...@@ -66,6 +66,49 @@ task BgzipAndIndex { ...@@ -66,6 +66,49 @@ task BgzipAndIndex {
} }
} }
task DictAndFaidx {
input {
File inputFile
String javaXmx = "2G"
String memory = "3GiB"
String dockerImage = "quay.io/biocontainers/samtools:1.11--h6270b1f_0"
}
String outputFile = basename(inputFile)
# Capture .fa¸ .fna and .fasta
String outputDict = sub(outputFile, "\.fn?as?t?a?$", "") + ".dict"
# This executes both dict and faidx, so indexes are co-located in the same folder.
command <<<
set -e
cp ~{inputFile} ~{outputFile}
samtools dict -o ~{outputDict} ~{outputFile}
samtools faidx ~{outputFile} --fai-idx ~{outputFile}.fai
>>>
output {
File outputFasta = outputFile
File outputFastaDict = outputDict
File outputFastaFai = outputFile + ".fai"
}
runtime {
memory: memory
docker: dockerImage
}
parameter_meta {
# inputs
inputFile: {description: "The input fasta file.", category: "required"}
javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.", category: "advanced"}
memory: {description: "The amount of memory available to the job.", category: "advanced"}
# outputs
outputFasta: {description: "Fasta file that is co-located with the indexes"}
outputFastaFai: {description: "Fasta index file for the outputFasta file."}
outputFastaDict: {description: "Sequence dictionary for the outputFasta file."}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
}
}
task Faidx { task Faidx {
input { input {
File inputFile File inputFile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment