Commit 1910a774 authored by Mathieu Giraud's avatar Mathieu Giraud

latex.py: output clones in a LaTeX table

parent 38c3c801
......@@ -158,6 +158,9 @@ class Window:
return obj
def latex(self, point=0):
return r" & & %s & %-50s \\ %% %s" % (self.d["reads"][0], self.d["name"], self.d["id"])
### print essential info about Window
def __str__(self):
return "<window : %s %s %s>" % ( self.d["reads"], '*' if self.d["top"] == sys.maxint else self.d["top"], self.d["id"])
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import fuse
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--threshold', '-t', type=float, default=0.1, help='threshold (%(default)d)')
parser.add_argument('--verbose', '-v', action='store_true', help='verbose output')
parser.add_argument('file', nargs='+', help='''.vidjil files''')
def main():
args = parser.parse_args()
datas = []
for i in args.file:
data = fuse.ListWindows()
data.load(i, False, verbose = args.verbose)
print ' ', i
for w in data:
if w.d['reads'][0] >= args.threshold:
print w.latex()
print r' \hline'
if __name__ =='__main__':
main()
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