-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: TOLGA <ayazsevent@email.chop.edu>
- Loading branch information
1 parent
a3d7be1
commit e5e49c9
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |