@@ -0,0 +1,53 @@ | |||
task sentieon_TNscope{ | |||
String sample_id | |||
File tumor_bam | |||
File tumor_bam_bai | |||
File? normal_bam | |||
File? normal_bam_bai | |||
String tumor_name | |||
String normal_name | |||
File tumor_recall_data | |||
File normal_recall_data | |||
File ref_dir | |||
String ref_fasta | |||
File dbsnp_dir | |||
String dbsnp | |||
# excute env | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
String SENTIEON_LICENSE | |||
command <<< | |||
set -o pipefail | |||
set -exo | |||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||
nt=$(nproc) | |||
sentieon driver -t $nt -r ${ref_dir}/${ref_fasta} \ | |||
-i ${tumor_bam} -q ${tumor_recall_data} \ | |||
-i ${normal_bam} -q ${normal_recall_data} \ | |||
--algo TNscope --tumor_sample ${tumor_name} --normal_sample ${normal_name} \ | |||
--disable_detector sv --trim_soft_clip \ | |||
--dbsnp ${dbsnp_dir}/${dbsnp} ${sample_id}.TNscope.vcf || { echo "TNscope failed"; exit 1; } | |||
ls ./ | |||
>>> | |||
runtime{ | |||
docker:docker | |||
cluster:cluster_config | |||
systemDisk:"cloud_ssd 40" | |||
dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output{ | |||
File vcf = "${sample_id}.TNscope.vcf" | |||
File vcf_index = "${sample_id}.TNscope.vcf.idx" | |||
} | |||
} |
@@ -0,0 +1,79 @@ | |||
task sentieon_TNseq{ | |||
String sample_id | |||
File tumor_bam | |||
File tumor_bam_bai | |||
File? normal_bam | |||
File? normal_bam_bai | |||
String tumor_name | |||
String normal_name | |||
File ref_dir | |||
String ref_fasta | |||
File germline_resource | |||
File germline_resource_tbi | |||
# excute env | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
String SENTIEON_LICENSE | |||
command <<< | |||
set -o pipefail | |||
set -exo | |||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||
nt=$(nproc) | |||
if [${normal_bam}];then | |||
INPUT="-i ${tumor_bam} -i ${normal_bam}" | |||
SAMPLE="--tumor_sample ${tumor_name} --normal_sample ${normal_name}" | |||
else | |||
INPUT="-i ${tumor_bam}" | |||
SAMPLE="--tumor_sample ${tumor_name}" | |||
fi | |||
sentieon driver -t $nt -r ${ref_dir}/${ref_fasta} \ | |||
$INPUT \ | |||
--algo TNhaplotyper2 $SAMPLE \ | |||
--germline_vcf ${germline_resource} \ | |||
${sample_id}.TNseq.raw.vcf \ | |||
--algo OrientationBias --tumor_sample ${tumor_name} \ | |||
${sample_id}.orientation \ | |||
--algo ContaminationModel $SAMPLE \ | |||
--vcf ${germline_resource} \ | |||
--tumor_segments ${sample_id}.contamination.segments \ | |||
${sample_id}.contamination | |||
sentieon driver -t $nt \ | |||
-r ${ref_dir}/${ref_fasta} \ | |||
--algo TNfilter $SAMPLE \ | |||
-v ${sample_id}.TNseq.raw.vcf \ | |||
--contamination ${sample_id}.contamination \ | |||
--tumor_segments ${sample_id}.contamination.segments \ | |||
--orientation_priors ${sample_id}.orientation \ | |||
${sample_id}.bwa_TNseq.vcf | |||
>>> | |||
runtime{ | |||
docker:docker | |||
cluster:cluster_config | |||
systemDisk:"cloud_ssd 40" | |||
dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output{ | |||
File raw_vcf = "${sample_id}.TNseq.raw.vcf" | |||
File raw_vcf_index = "${sample_id}.TNseq.raw.vcf.idx" | |||
File vcf = "${sample_id}.bwa_TNseq.vcf" | |||
File vcf_index = "${sample_id}.bwa_TNseq.vcf.idx" | |||
File contamination = "${sample_id}.contamination" | |||
File contamination_segments = "${sample_id}.contamination.segments" | |||
File orientation = "${sample_id}.orientation" | |||
} | |||
} |
@@ -0,0 +1,31 @@ | |||
task qualimap{ | |||
String sample_id | |||
File bam_file | |||
File bam_bai | |||
File annot_gff | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
String out_dir = sample_id+'_BamQC' | |||
command <<< | |||
set -o pipefail | |||
set -exo | |||
nt=$(nproc) | |||
/opt/qualimap/qualimap bamqc -bam ${bam_file} -gff ${annot_gff} -outformat PDF:HTML -nt $nt -outdir ${out_dir} --java-mem-size=32G | |||
tar -zcvf ${out_dir}.tar ${out_dir} | |||
>>> | |||
runtime{ | |||
docker:docker | |||
cluster:cluster_config | |||
systemDisk:"cloud_ssd 40" | |||
dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output{ | |||
File out_file = "${out_dir}.tar" | |||
} | |||
} |
@@ -0,0 +1,47 @@ | |||
task strelka_calling{ | |||
File tumor_bam | |||
File tumor_bam_bai | |||
File normal_bam | |||
File normal_bam_bai | |||
String ref_fasta | |||
File ref_dir | |||
String sample_id | |||
File manta_indel_vcf | |||
File manta_indel_vcf_index | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
String out_dir = "${sample_id}_result" | |||
command <<< | |||
set -exo pipefail | |||
nt=$(nproc) | |||
/home/biosoft/strelka-2.9.10.centos6_x86_64/bin/configureStrelkaSomaticWorkflow.py \ | |||
--normalBam ${normal_bam} \ | |||
--tumorBam ${tumor_bam} \ | |||
--referenceFasta ${ref_dir}/${ref_fasta} \ | |||
--indelCandidates ${manta_indel_vcf} \ | |||
--runDir ${out_dir} | |||
ls ${out_dir} | |||
python2.7 ${out_dir}/runWorkflow.py -m local -j $nt | |||
ls ${out_dir} | |||
tar cvf ${out_dir}.tar ${out_dir} | |||
>>> | |||
runtime{ | |||
docker:docker | |||
cluster:cluster_config | |||
systemDisk:"cloud_ssd 40" | |||
dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output{ | |||
File out_file = "${out_dir}.tar" | |||
} | |||
} |