Skip to content

Commit

Permalink
add avg depth
Browse files Browse the repository at this point in the history
  • Loading branch information
sage-wright committed Oct 11, 2023
1 parent 7828f47 commit 8979cf0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/species_typing/task_tbp_parser.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ task tbp_parser {
Int coverage_threshold = 100
Boolean tbp_parser_debug = false

String docker = "us-docker.pkg.dev/general-theiagen/theiagen/tbp-parser:1.0.1"
String docker = "us-docker.pkg.dev/general-theiagen/theiagen/tbp-parser:1.0.5"
Int disk_size = 100
Int memory = 4
Int cpu = 1
Expand All @@ -34,13 +34,17 @@ task tbp_parser {
# get genome percent coverage for the entire reference genome length over min_depth
genome=$(samtools depth -J ~{tbprofiler_bam} | awk -F "\t" '{if ($3 >= ~{min_depth}) print;}' | wc -l )
python3 -c "print ( ($genome / 4411532 ) * 100 )" | tee GENOME_PC

# get genome average depth
samtools depth -J ~{tbprofiler_bam} | awk -F "\t" '{sum+=$3} END { print sum/NR }' | tee AVG_DEPTH
>>>
output {
File tbp_parser_looker_report_csv = "~{samplename}.looker_report.csv"
File tbp_parser_laboratorian_report_csv = "~{samplename}.laboratorian_report.csv"
File tbp_parser_lims_report_csv = "~{samplename}.lims_report.csv"
File tbp_parser_coverage_report = "~{samplename}.percent_gene_coverage.csv"
Float tbp_parser_genome_percent_coverage = read_float("GENOME_PC")
Float tbp_parser_average_genome_depth = read_float("AVG_DEPTH")
String tbp_parser_version = read_string("VERSION")
String tbp_parser_docker = docker
}
Expand Down

0 comments on commit 8979cf0

Please sign in to comment.