|
|
@@ -0,0 +1,76 @@ |
|
|
|
task Sentieon_BQSR{ |
|
|
|
File ref_dir |
|
|
|
File dbsnp_dir |
|
|
|
File dbmills_dir |
|
|
|
|
|
|
|
String sample_id |
|
|
|
String ref_fasta |
|
|
|
String dbsnp |
|
|
|
String db_mills |
|
|
|
|
|
|
|
File deduped_bam |
|
|
|
File deduped_bam_index |
|
|
|
|
|
|
|
File? regions |
|
|
|
Int? interval_padding |
|
|
|
|
|
|
|
# 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 [${regions}];then |
|
|
|
INTERVAL="--interval ${regions} --interval_padding ${interval_padding}" |
|
|
|
else |
|
|
|
INTERVAL="" |
|
|
|
fi |
|
|
|
|
|
|
|
sentieon driver -t $nt \ |
|
|
|
-r ${ref_dir}/${ref_fasta} -i ${deduped_bam} \ |
|
|
|
$INTERVAL \ |
|
|
|
--algo QualCal \ |
|
|
|
-k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} \ |
|
|
|
${sample_id}_recal_data.table |
|
|
|
|
|
|
|
sentieon driver -t $nt \ |
|
|
|
-r ${ref_dir}/${ref_fasta} -i ${deduped_bam} \ |
|
|
|
-q ${sample_id}_recal_data.table \ |
|
|
|
--algo QualCal \ |
|
|
|
-k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} \ |
|
|
|
${sample_id}_recal_data.table.post \ |
|
|
|
--algo ReadWriter ${sample_id}.sorted.deduped.recaled.bam |
|
|
|
|
|
|
|
sentieon driver -t $nt --algo QualCal \ |
|
|
|
--plot --before ${sample_id}_recal_data.table --after ${sample_id}_recal_data.table.post ${sample_id}_recal_data.csv |
|
|
|
|
|
|
|
sentieon plot bqsr -o ${sample_id}_bqsrreport.pdf ${sample_id}_recal_data.csv |
|
|
|
>>> |
|
|
|
|
|
|
|
runtime{ |
|
|
|
docker:docker |
|
|
|
cluster:cluster_config |
|
|
|
systemDisk:"cloud_ssd 40" |
|
|
|
dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/" |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
output{ |
|
|
|
File recal_table = "${sample_id}_recal_data.table" |
|
|
|
File recal_post = "${sample_id}_recal_data.table.post" |
|
|
|
File recaled_bam = "${sample_id}.sorted.deduped.recaled.bam" |
|
|
|
File recaled_bam_index = "${sample_id}.sorted.deduped.recaled.bam.bai" |
|
|
|
File recal_csv = "${sample_id}_recal_data.csv" |
|
|
|
File bqsrreport_pdf = "${sample_id}_bqsrreport.pdf" |
|
|
|
|
|
|
|
} |
|
|
|
} |