From e0d203434f1517ef2ac17a29689c6f0f2ec80d92 Mon Sep 17 00:00:00 2001 From: droazen Date: Wed, 22 Jun 2011 22:54:09 +0000 Subject: [PATCH] Add a column summing the fingerprint LOD scores. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@6041 348d0f76-0448-11de-a6fe-93d51630548a --- python/generate_per_sample_metrics.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/generate_per_sample_metrics.py b/python/generate_per_sample_metrics.py index 62373ee70..97211be4b 100644 --- a/python/generate_per_sample_metrics.py +++ b/python/generate_per_sample_metrics.py @@ -64,7 +64,7 @@ sample_summary_metrics_types = [ (HsMetrics,'hybrid_selection_metrics'), (InsertSizeMetrics, 'insert_size_metrics'), (DbSnpMatchMetrics, 'dbsnp_matches') ] -header = ['sample','HAPLOTYPES_CONFIDENTLY_MATCHING.MIN','HAPLOTYPES_CONFIDENTLY_MATCHING.MAX','HAPLOTYPES_CONFIDENTLY_MATCHING.MEDIAN'] +header = ['sample','SUM_OF_FINGERPRINT_LODS','HAPLOTYPES_CONFIDENTLY_MATCHING.MIN','HAPLOTYPES_CONFIDENTLY_MATCHING.MAX','HAPLOTYPES_CONFIDENTLY_MATCHING.MEDIAN'] for metric_type in sample_summary_metrics_types: header.extend(get_sample_summary_metrics_fields(metric_type[0])) print string.join(header,'\t') @@ -89,15 +89,17 @@ for sample_id,filename in samples.items(): if fingerprinting_summary_metrics != None: haplotypes_confidently_matching = [metric.HAPLOTYPES_CONFIDENTLY_MATCHING for metric in fingerprinting_summary_metrics] + sum_of_fingerprint_lods = str(sum([metric.LOD_EXPECTED_SAMPLE for metric in fingerprinting_summary_metrics])) min_haplotypes_confidently_matching = str(min(haplotypes_confidently_matching)) max_haplotypes_confidently_matching = str(max(haplotypes_confidently_matching)) median_haplotypes_confidently_matching = str(median(haplotypes_confidently_matching)) else: + sum_of_fingerprint_lods = 'NA' min_haplotypes_confidently_matching = 'NA' max_haplotypes_confidently_matching = 'NA' median_haplotypes_confidently_matching = 'NA' - data = [sample_id,min_haplotypes_confidently_matching,max_haplotypes_confidently_matching,median_haplotypes_confidently_matching] + data = [sample_id,sum_of_fingerprint_lods,min_haplotypes_confidently_matching,max_haplotypes_confidently_matching,median_haplotypes_confidently_matching] for metrics_type,metrics_extension in sample_summary_metrics_types: metrics = get_sample_summary_metrics('%s.%s' % (basepath,metrics_extension))