Commit fa9fd13c authored by Mathieu Giraud's avatar Mathieu Giraud

latex.py, fuse.py: display also ratio by locus

parent 79a08c53
......@@ -115,10 +115,11 @@ class Window:
return obj
def latex(self, point=0, base=10000, tag=''):
def latex(self, point=0, base_germline=10000, base=10000, tag=''):
reads = self.d["reads"][point]
ratio_germline = float(reads)/base_germline
ratio = float(reads)/base
return r" & & %7d & %5.2f\%% & %-50s \\ %% %4s %s" % (reads, ratio * 100,
return r" & & %7d & %5.2f\%% & of %-4s & %5.2f\%% & %-50s \\ %% %4s %s" % (reads, ratio_germline * 100, self.d['germline'], ratio * 100,
self.d["name"] if 'name' in self.d else self.d["id"],
tag, self.d["id"])
......
......@@ -65,7 +65,8 @@ def main():
if reads >= args.min and ratio >= args.min_ratio:
out += [(-reads, w, tag)]
for bla, w, tag in sorted(out[:args.top]):
print(w.latex(base=segmented_reads, tag=tag))
segmented_reads_germline = data.d['reads'].d['germline'][w.d['germline']][0]
print(w.latex(base_germline=segmented_reads_germline, 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