|
|
|
|
|
|
|
|
|
|
|
task TMB { |
|
|
|
|
|
|
|
|
|
|
|
String sample |
|
|
|
|
|
File hg38_CDS |
|
|
|
|
|
File regions |
|
|
|
|
|
File snpindel_txt |
|
|
|
|
|
String docker |
|
|
|
|
|
String cluster_config |
|
|
|
|
|
String disk_size |
|
|
|
|
|
Boolean AF_filter |
|
|
|
|
|
|
|
|
|
|
|
command <<< |
|
|
|
|
|
set -o pipefail |
|
|
|
|
|
set -e |
|
|
|
|
|
nt=$(nproc) |
|
|
|
|
|
|
|
|
|
|
|
if [ ${regions} ];then |
|
|
|
|
|
sort -k1,1 -k2,2n ${regions} | bedtools merge -i - > merged.bed |
|
|
|
|
|
bedtools intersect -a merged.bed -b ${hg38_CDS} > merged_intersect.bed |
|
|
|
|
|
size=`awk -F'\t' 'BEGIN{SUM=0}{SUM+=$3-$2}END{print SUM}' merged_intersect.bed` |
|
|
|
|
|
else |
|
|
|
|
|
size=`awk -F'\t' 'BEGIN{SUM=0}{SUM+=$3-$2}END{print SUM}' ${hg38_CDS}` |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# analysis in python |
|
|
|
|
|
if ${AF_filter};then |
|
|
|
|
|
python ~/tmb.py ${snpindel_txt} $size ${sample} 'yes' |
|
|
|
|
|
else |
|
|
|
|
|
python ~/tmb.py ${snpindel_txt} $size ${sample} 'no' |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
>>> |
|
|
|
|
|
|
|
|
|
|
|
runtime { |
|
|
|
|
|
docker: docker |
|
|
|
|
|
cluster: cluster_config |
|
|
|
|
|
systemDisk: "cloud_ssd 40" |
|
|
|
|
|
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
output { |
|
|
|
|
|
File snp_indel="${sample}.snp_indel.txt" |
|
|
|
|
|
File tmb="${sample}.TMB.txt" |
|
|
|
|
|
} |
|
|
|
|
|
} |