|
|
@@ -4,7 +4,7 @@ task batch { |
|
|
|
Array[File] tumor_bai |
|
|
|
Array[File] normal_bam |
|
|
|
Array[File] normal_bai |
|
|
|
File bed |
|
|
|
File? bed |
|
|
|
File faidx |
|
|
|
File fasta |
|
|
|
File? ref_flat |
|
|
@@ -15,9 +15,9 @@ task batch { |
|
|
|
String cluster_config |
|
|
|
String disk_size |
|
|
|
|
|
|
|
String annotate_opt = if (ref_flat != "") then "--annotate ${ref_flat}" else "" |
|
|
|
String reference_opt = if (reference != "") then "--reference ${reference}" else "" |
|
|
|
String access_opt = if (method == "amplicon") then "--access ${bed}" else "--access ${access_bed}" |
|
|
|
String annotate_opt = if (ref_flat != "") then "--annotate ref_flat.txt" else "" |
|
|
|
String reference_opt = if (reference != "") then "--reference my_reference.cnn" else "" |
|
|
|
String access_opt = if (method == "amplicon") then "--access amplicon.bed" else "--access access-mappable.bed" |
|
|
|
|
|
|
|
command <<< |
|
|
|
set -o pipefail |
|
|
@@ -25,15 +25,21 @@ task batch { |
|
|
|
mkdir -p /cromwell_root/tmp/cnvkit |
|
|
|
cp ${sep=' ' normal_bai} /cromwell_root/tmp/cnvkit |
|
|
|
cp ${sep=' ' tumor_bai} /cromwell_root/tmp/cnvkit |
|
|
|
# must exist parameters |
|
|
|
cp ${fasta} /cromwell_root/tmp/cnvkit/hg38.fa |
|
|
|
cp ${faidx} /cromwell_root/tmp/cnvkit/hg38.fai |
|
|
|
cp ${access_bed} /cromwell_root/tmp/cnvkit/access-mappable.bed |
|
|
|
# optional parameters |
|
|
|
if [ ${bed} != "" ]; then cp ${bed} /cromwell_root/tmp/cnvkit/amplicon.bed; fi |
|
|
|
if [ ${ref_flat} != "" ]; then cp ${ref_flat} /cromwell_root/tmp/cnvkit/ref_flat.txt; fi |
|
|
|
if [ ${reference} != "" ]; then cp ${reference} /cromwell_root/tmp/cnvkit/my_reference.cnn; fi |
|
|
|
cd /cromwell_root/tmp/cnvkit |
|
|
|
|
|
|
|
mkdir results |
|
|
|
cnvkit.py batch ${sep=' ' tumor_bam} --normal ${sep=' ' normal_bam} \ |
|
|
|
--method ${method} \ |
|
|
|
--targets ${bed} ${annotate_opt} \ |
|
|
|
--fasta hg38.fa ${access_opt} ${reference_opt} \ |
|
|
|
--targets amplicon.bed ${access_opt} ${annotate_opt} \ |
|
|
|
--fasta hg38.fa ${reference_opt} \ |
|
|
|
--output-reference ~/${sample_id}.reference.cnn \ |
|
|
|
--output-dir ./results/ \ |
|
|
|
--drop-low-coverage --diagram --scatter |