Browse Source

上传文件至 'tasks'

master
meng 2 years ago
parent
commit
3df2a90517
1 changed files with 45 additions and 0 deletions
  1. +45
    -0
      tasks/tmb.wdl

+ 45
- 0
tasks/tmb.wdl View File

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"
}
}

Loading…
Cancel
Save