Skip to content

Commit

Permalink
BCFTools Sort task (#155)
Browse files Browse the repository at this point in the history
Co-authored-by: TOLGA <ayazsevent@email.chop.edu>
  • Loading branch information
Tayazseven and TOLGA authored Aug 28, 2020
1 parent a3d7be1 commit e5e49c9
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions bcftools/Sort.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version 1.0
# -------------------------------------------------------------------------------------------------
# Package Name: bcftools sort
# Task Summary: sort VCF file
# Tool Name: bcftools sort
# Documentation:
# * https://https://samtools.github.io/bcftools/bcftools.html
# -------------------------------------------------------------------------------------------------

task BCFToolsSort {
input {
# Tools
File ? bcftools

# Inputs
File input_file
String sample_id
String ? userString
String filename_prefix = ""

# Run time variables
Array[String] modules = []
Float memory = 4
Int cpu = 1

# Output file names
String output_filename = sample_id + filename_prefix + ".sorted.vcf"
}

command {
set -Eeuxo pipefail;

for MODULE in ~{sep=' ' modules}; do
module load $MODULE
done;

~{default="bcftools" bcftools} sort \
~{userString} \
-o ~{output_filename} \
~{input_file};
}

output {
File output_file = "~{output_filename}"
}

runtime {
memory: memory + " GB"
cpu: cpu
}

parameter_meta {
sample_id: "sample id"
bcftools: "bcftools executable."
input_file: "VCF file"
}

meta {
author: "Tolga Ayazseven"
email: "ayazsevent@email.chop.edu"
bcftools_version: "1.9"
version: "1.0.0"
}
}

0 comments on commit e5e49c9

Please # to comment.