Skip to content

Commit

Permalink
Add vadr_flagged to TheiaCov
Browse files Browse the repository at this point in the history
  • Loading branch information
HNHalstead committed Mar 14, 2024
1 parent 0761e23 commit ff15ebd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tasks/quality_control/task_vadr.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,20 @@ task vadr {
# prep alerts into a tsv file for parsing
cut -f 5 "~{out_base}/~{out_base}.vadr.alt.list" | tail -n +2 > "~{out_base}.vadr.alerts.tsv"
cat "~{out_base}.vadr.alerts.tsv" | wc -l > NUM_ALERTS

# create flag for manual curation
vadr_test=$(cat "~{out_base}/~{out_base}.vadr.alt" | grep "nmiscftr" | grep "ORF3a\|ORF6\|ORF7a\|ORF7b\|ORF8\|ORF10" | wc -l)
echo $vadr_test
if [ "$vadr_test" -gt 2 ]; then
echo "FLAGGED" | tee VADR_FLAG
else
echo "PASS" | tee VADR_FLAG
fi


else
echo "VADR skipped due to poor assembly; assembly length (unambiguous) = ~{assembly_length_unambiguous}" > NUM_ALERTS
touch VADR_FLAG
fi

>>>
Expand All @@ -58,6 +69,7 @@ task vadr {
File? alerts_list = "~{out_base}/~{out_base}.vadr.alt.list"
File? outputs_tgz = "~{out_base}.vadr.tar.gz"
File? vadr_fastas_zip_archive = "~{out_base}_vadr-fasta-files.zip"
String? vadr_flag = read_string("VADR_FLAG")
String vadr_docker = docker
}
runtime {
Expand All @@ -66,5 +78,6 @@ task vadr {
cpu: cpu
dx_instance_type: "mem1_ssd1_v2_x2"
maxRetries: 3
continueOnReturnCode: "True"
}
}
}
1 change: 1 addition & 0 deletions workflows/theiacov/wf_theiacov_illumina_pe.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ workflow theiacov_illumina_pe {
String? vadr_num_alerts = vadr.num_alerts
String? vadr_docker = vadr.vadr_docker
File? vadr_fastas_zip_archive = vadr.vadr_fastas_zip_archive
String? vadr_flag = vadr.vadr_flag
# Flu IRMA and Abricate Outputs
String? irma_version = irma.irma_version
String? irma_type = irma.irma_type
Expand Down

0 comments on commit ff15ebd

Please sign in to comment.