task lohhla { String sample_id File normBAM File normBAM_bai File tumorBAM File tumorBAM_bai File hlas File ascat String docker String cluster String disk_size command <<< set -o pipefail set -e now_path=`pwd` echo $now_path > $now_path/test.txt mkdir -p ./ana/${sample_id}/ cp ${normBAM} ./ana/${sample_id}/ cp ${normBAM_bai} ./ana/${sample_id}/ cp ${tumorBAM} ./ana/${sample_id}/ cp ${tumorBAM_bai} ./ana/${sample_id}/ cp ${hlas} ./ana/ cp ${ascat} ./ana/ for line in `ls ./ana/${sample_id}|sed 's/.bam.*//'|sort|uniq` do new_name=`echo $line|sed 's/\./_/g'` mv ./ana/${sample_id}/$line.bam ./ana/${sample_id}/$new_name.bam mv ./ana/${sample_id}/$line.bam.bai ./ana/${sample_id}/$new_name.bam.bai done normBAM_file=`ls ./ana/${sample_id}/|grep bam|grep -v "TT"|grep -v "bai"|grep -v "_T_sorted"` Rscript /software/lohhla_hg38/LOHHLAscript_hg38.R --patientId ${sample_id} \ --outputDir $now_path/ana/${sample_id}_output \ --normalBAMfile $now_path/ana/${sample_id}/$normBAM_file \ --BAMDir $now_path/ana/${sample_id} \ --hlaPath $now_path/ana/${sample_id}_winners.hlas \ --HLAfastaLoc /software/lohhla_hg38/data/abc_complete.fasta \ --CopyNumLoc $now_path/ana/${sample_id}_ascat.txt \ --mappingStep TRUE --minCoverageFilter 10 --fishingStep TRUE --cleanUp FALSE \ --gatkDir /software/picard-tools-1.122 \ --novoDir /opt/conda/bin \ --HLAexonLoc /software/lohhla_hg38/data/hla.dat tar -zcvf ./ana/${sample_id}_output.tgz ./ana/${sample_id}_output >>> runtime { docker : docker cluster: cluster systemDisk: "cloud_ssd 40" dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" } output { Array[File] lohhla_xls = glob("./ana/${sample_id}_output/*.xls") Array[File] lohhla_pdf = glob("./ana/${sample_id}_output/Figures/*.pdf") Array[File] lohhla_tgz = glob("./ana/*.tgz") } }