Commit 9d148849 authored by Marc Duez's avatar Marc Duez
parents eddb4503 eabef38a
......@@ -7,6 +7,7 @@ import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--min-ratio', '-r', type=float, default=.01, help='minimal reads ratio of the clone (%(default).3f)')
parser.add_argument('--min', '-m', type=int, default=1, help='minimal number of reads in the clone (%(default)d)')
parser.add_argument('--top', '-t', type=int, default=5, help='maximal number of clones to displlay (%(default)d)')
parser.add_argument('--verbose', '-v', action='store_true', help='verbose output')
......@@ -25,10 +26,15 @@ def main():
data = fuse.ListWindows()
data.load(i, False, verbose = args.verbose)
print '%% ', i
print '%% ', data.d["reads"]
segmented_reads = data.d['reads'].d['segmented'][0]
out = []
for w in data:
if w.d['reads'][0] >= args.min:
out += [(-w.d['reads'][0], w.latex())]
reads = w.d['reads'][0]
ratio = float(reads)/segmented_reads
if reads >= args.min and ratio >= args.min_ratio:
out += [(-reads, w.latex(base=segmented_reads))]
for bla, ltx in sorted(out[:args.top]):
print ltx
......
......@@ -33,7 +33,7 @@ print "=== Recent analysis saved, last %d hours" % LAST_HOURS
for res in db((db.analysis_file.analyze_date >= yesterday) & (db.patient.id == db.analysis_file.patient_id)).select():
print " ", res.analysis_file.analyze_date,
print "\t", "pat-%04d (%s %s)" % (res.patient.id, res.patient.first_name, res.patient.last_name),
print "\t", "pat-%04d (%s)" % (res.patient.id, res.patient.last_name[:3]),
print "\t", ellipsis(res.analysis_file.analysis_file, 50)
print
......@@ -51,7 +51,7 @@ for res in db((db.results_file.run_date >= yesterday) & RUN_CONFIG_SEQ_PATIENT).
print " ", "sch-%04d" % res.results_file.scheduler_task_id, "\t", res.scheduler_task.status, " ",
print "\t", res.results_file.run_date, "\t", res.config.name, # "\t", res.data_file,
print "\t", "seq-%04d" % res.sequence_file.id, "%-20s" % res.sequence_file.filename,
print "\t", "pat-%04d (%s %s)" % (res.patient.id, res.patient.first_name, res.patient.last_name),
print "\t", "pat-%04d (%s)" % (res.patient.id, res.patient.last_name[:3]),
print "\t", tmp_dir(res.scheduler_task.args), ellipsis(res.results_file.data_file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment