Checkpointing some bugfixes with zero-length version directories and missing
Picard metrics files before the push back into svn. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@6069 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
171e20a111
commit
d92055d1f9
|
|
@ -3,8 +3,8 @@ onCMDLine = ! is.na(args[1])
|
|||
|
||||
if ( onCMDLine ) {
|
||||
reference_dataset = '/Users/mhanna/metrics.perSample.formatted.table'
|
||||
inputTSV = args[2]
|
||||
outputPDF = args[3]
|
||||
inputTSV = args[1]
|
||||
outputPDF = args[2]
|
||||
} else {
|
||||
reference_dataset = '/Users/mhanna/metrics.perSample.formatted.table'
|
||||
inputTSV = 'GoT2D_exomes_batch_005.tsv'
|
||||
|
|
@ -13,7 +13,6 @@ if ( onCMDLine ) {
|
|||
|
||||
require('ggplot2')
|
||||
|
||||
inputTSV = "GoT2D_exomes_batch_005.tsv"
|
||||
data <- read.table(inputTSV,header=T)
|
||||
|
||||
complete <- read.table(reference_dataset,header=T)
|
||||
|
|
|
|||
|
|
@ -90,19 +90,17 @@ for sample_id,filename in samples.items():
|
|||
if fingerprinting_summary_metrics != None:
|
||||
haplotypes_confidently_matching = [str(metric.HAPLOTYPES_CONFIDENTLY_MATCHING) for metric in fingerprinting_summary_metrics]
|
||||
fingerprint_lods = [str(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:
|
||||
haplotypes_confidently_matching = []
|
||||
fingerprint_lods = []
|
||||
# min_haplotypes_confidently_matching = 'NA'
|
||||
# max_haplotypes_confidently_matching = 'NA'
|
||||
# median_haplotypes_confidently_matching = 'NA'
|
||||
|
||||
data = [sample_id,'c('+string.join(fingerprint_lods,',')+')','c('+string.join(haplotypes_confidently_matching,',')+')']
|
||||
|
||||
for metrics_type,metrics_extension in sample_summary_metrics_types:
|
||||
metrics = get_sample_summary_metrics('%s.%s' % (basepath,metrics_extension))
|
||||
data.extend([getattr(metrics, metrics_field_name) for metrics_field_name in get_sample_summary_metrics_fields(metrics_type)])
|
||||
metrics_pathname = '%s.%s' % (basepath,metrics_extension)
|
||||
if os.path.exists(metrics_pathname):
|
||||
metrics = get_sample_summary_metrics(metrics_pathname)
|
||||
data.extend([getattr(metrics, metrics_field_name) for metrics_field_name in get_sample_summary_metrics_fields(metrics_type)])
|
||||
else:
|
||||
data.extend(['NA' for metrics_field_name in get_sample_summary_metrics_fields(metrics_type)])
|
||||
print string.join(['%s']*len(header),'\t')%tuple(data)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ def create_reader(filename):
|
|||
extension = os.path.splitext(filename)[1]
|
||||
if extension == '.xls' or extension == '.xlsx':
|
||||
return excel_reader(filename)
|
||||
elif extensions == '.tsv' or extension == '.txt':
|
||||
elif extension == '.tsv' or extension == '.txt':
|
||||
return tsv_reader(filename)
|
||||
else:
|
||||
print 'Unrecognized file extension',extension
|
||||
|
|
@ -73,6 +73,8 @@ for project,sample in create_reader(input_filename):
|
|||
print 'Hit a path name that cannot be parsed: ',version_path
|
||||
sys.exit(1)
|
||||
versions.append(int(version_path[1:]))
|
||||
if len(versions) == 0:
|
||||
continue
|
||||
versions = sorted(versions)
|
||||
bam_file = '%s/v%d/%s.bam' % (sample_path,versions[-1],sample)
|
||||
if not os.path.exists(bam_file):
|
||||
|
|
|
|||
Loading…
Reference in New Issue