Skip to content

Commit

Permalink
Adding median coverage metric to mitochondria pipeline (#7253)
Browse files Browse the repository at this point in the history
  • Loading branch information
meganshand authored May 18, 2021
1 parent c74323a commit 4cccab3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/mitochondria_m2_wdl/AlignAndCall.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ workflow AlignAndCall {
File theoretical_sensitivity_metrics = CollectWgsMetrics.theoretical_sensitivity
File contamination_metrics = GetContamination.contamination_file
Int mean_coverage = CollectWgsMetrics.mean_coverage
Float median_coverage = CollectWgsMetrics.median_coverage
String major_haplogroup = GetContamination.major_hg
Float contamination = FilterContamination.contamination
}
Expand Down Expand Up @@ -373,6 +374,7 @@ task CollectWgsMetrics {
R --vanilla <<CODE
df = read.table("metrics.txt",skip=6,header=TRUE,stringsAsFactors=FALSE,sep='\t',nrows=1)
write.table(floor(df[,"MEAN_COVERAGE"]), "mean_coverage.txt", quote=F, col.names=F, row.names=F)
write.table(df[,"MEDIAN_COVERAGE"], "median_coverage.txt", quote=F, col.names=F, row.names=F)
CODE
>>>
runtime {
Expand All @@ -385,6 +387,7 @@ task CollectWgsMetrics {
File metrics = "metrics.txt"
File theoretical_sensitivity = "theoretical_sensitivity.txt"
Int mean_coverage = read_int("mean_coverage.txt")
Float median_coverage = read_float("median_coverage.txt")
}
}
Expand Down
1 change: 1 addition & 0 deletions scripts/mitochondria_m2_wdl/MitochondriaPipeline.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ workflow MitochondriaPipeline {
File contamination_metrics = AlignAndCall.contamination_metrics
File base_level_coverage_metrics = CoverageAtEveryBase.table
Int mean_coverage = AlignAndCall.mean_coverage
Float median_coverage = AlignAndCall.median_coverage
String major_haplogroup = AlignAndCall.major_haplogroup
Float contamination = AlignAndCall.contamination
}
Expand Down

0 comments on commit 4cccab3

Please sign in to comment.