Commit db3f356d authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team -r, minimal ratio

parent 87ee66e7
......@@ -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')
......@@ -30,8 +31,10 @@ def main():
out = []
for w in data:
if w.d['reads'][0] >= args.min:
out += [(-w.d['reads'][0], w.latex(base=segmented_reads))]
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[]):
print ltx
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment