Package: qc-metric-aggregator
qc-metric-aggregatorParse individual metrics out of a directory of QC results for genomic data and output a report containing the desired metrics and the overall PASS/FAIL status of the sample.Installationpip install qc-metric-aggregatorUsageusage: aggregate-qc-metrics [-h]
                            sample_name metrics_dir output_file threshold_file

positional arguments:
  sample_name     The sample name or id for which the QC metrics apply
  metrics_dir     The directory to search for metric files, often a cromwell
                  run directory
  output_file     File path to store the finalized mertrics TSV
  threshold_file  Path to the yml thresholds file to validate against

optional arguments:
  -h, --help      show this help message and exitExample invocation:aggregate-qc-metrics HG00096 /opt/qc/results/HG00096/WholeGenomeSingleSampleQc /opt/qc/scores/qc_results.tsv thresholds.ymlOutput formatsComing soon...Threshold fileYou will need to pass in a YAML file containing pass/fail threshold tests for the metrics you are interested in. The file format consists of a list of objects each containing the following keys:KeyValueCommentsmetric_nameName of the metric to checkThis can be anysupported metricand should be the value returned byname.operatorWhich operation to use to compare the metric value to the PASS/FAIL threshold<,<=,>,>=, and=are all supported. If you instead specifyreportthe metric will be reported in the final output, but not factored into the PASS/FAIL status.valueThe PASS/FAIL threshold to compare the metric value toThis field is optional ifreportis specified for theoperator.An example can befound hereSupported MetricsNameDescriptionOriginating ToolFREEMIXFreemixVerifyBamId2Q20_BASESTotal bases with Q20 or higherPicard CollectQualityYieldMetricsMEAN_COVERAGEHaploid CoveragePicard CollectWgsMetricsPCT_10XPercent coverage at 10xPicard CollectWgsMetricsPCT_20XPercent coverage at 20xPicard CollectWgsMetricsPCT_30XPercent coverage at 30xPicard CollectWgsMetricsPCT_CHIMERASPercent chimeras (PAIR)Picard CollectAlignmentSummaryMetricsREAD1_PF_MISMATCH_RATERead 1 base mismatch ratePicard CollectAlignmentSummaryMetricsREAD2_PF_MISMATCH_RATERead 2 base mismatch ratePicard CollectAlignmentSummaryMetricsMEDIAN_INSERT_SIZELibrary insert size medianPicard CollectInsertSizeMetricsMEDIAN_ABSOLUTE_DEVIATIONLibrary insert size madPicard CollectInsertSizeMetricsPERCENT_DUPLICATIONPercent duplicate marked readsPicard CollectDuplicateMetricsMEAN_TARGET_COVERAGEThe mean coverage of a target region.Picard CollectHsMetricsPCT_TARGET_BASES_10XThe fraction of all target bases achieving 10X or greater coveragePicard CollectHsMetricsPCT_TARGET_BASES_20XThe fraction of all target bases achieving 20X or greater coveragePicard CollectHsMetricsPCT_TARGET_BASES_30XThe fraction of all target bases achieving 30X or greater coveragePicard CollectHsMetricsAdding Additional MetricsTo add support for additional metrics you simply need to subclassMetricand register it inAvailableMetricsBecause many QC metrics are output in TSV format, there is a helper classTSVMetricthat you can inherent from in addition toMetricthat will make that easier. All of the currently supported metrics use this helper, so you should be able to look to them for examples.