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
c775efe0
Commit
c775efe0
authored
Jul 30, 2015
by
Mathieu Giraud
Browse files
latex.py, fuse.py: display tag in .latex() output
parent
421d784b
Changes
2
Hide whitespace changes
Inline
Side-by-side
tools/fuse.py
View file @
c775efe0
...
...
@@ -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
):
...
...
tools/latex.py
View file @
c775efe0
...
...
@@ -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
'\\'
)
...
...
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