Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
fa9fd13c
Commit
fa9fd13c
authored
Jul 30, 2015
by
Mathieu Giraud
Browse files
latex.py, fuse.py: display also ratio by locus
parent
79a08c53
Changes
2
Hide whitespace changes
Inline
Side-by-side
tools/fuse.py
View file @
fa9fd13c
...
...
@@ -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"
])
...
...
tools/latex.py
View file @
fa9fd13c
...
...
@@ -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
'\\'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment