Commit c775efe0 authored by Mathieu Giraud's avatar Mathieu Giraud

latex.py, fuse.py: display tag in .latex() output

parent 421d784b
......@@ -115,11 +115,12 @@ class Window:
return obj
def latex(self, point=0, base=10000):
def latex(self, point=0, base=10000, tag=''):
reads = self.d["reads"][point]
ratio = float(reads)/base
return r" & & %7d & %5.2f\%% & %-50s \\ %% %s" % (reads, ratio * 100,
self.d["name"] if 'name' in self.d else self.d["id"], self.d["id"])
return r" & & %7d & %5.2f\%% & %-50s \\ %% %4s %s" % (reads, ratio * 100,
self.d["name"] if 'name' in self.d else self.d["id"],
tag, self.d["id"])
### print essential info about Window
def __str__(self):
......
......@@ -57,9 +57,9 @@ def main():
reads = w.d['reads'][0]
ratio = float(reads)/segmented_reads
if reads >= args.min and ratio >= args.min_ratio:
out += [(-reads, w)]
for bla, w in sorted(out[:args.top]):
print(w.latex(base=segmented_reads))
out += [(-reads, w, tag)]
for bla, w, tag in sorted(out[:args.top]):
print(w.latex(base=segmented_reads, tag=tag))
if not out:
print(r'\\')
......
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