Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
vidjil
vidjil
Commits
49046ca6
Commit
49046ca6
authored
Sep 05, 2014
by
Marc Duez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse.py : build stats about reads distribution / mute "others" artificial clones
TODO : auto-compute others clones with javascript
parent
ed2596aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
server/fuse.py
server/fuse.py
+22
-3
No files found.
server/fuse.py
View file @
49046ca6
...
...
@@ -205,8 +205,26 @@ class ListWindows:
return
raise
IOError
(
"File '%s' is too old -- please regenerate it with a newer version of Vidjil"
%
filepath
)
### compute statistics about clones
def
build_stat
(
self
):
ranges
=
[
1000
,
100
,
10
,
1
]
result
=
[[
0
for
col
in
range
(
len
(
self
.
d
[
'reads_segmented'
]))]
for
row
in
range
(
len
(
ranges
))]
for
w
in
self
.
d
[
"windows"
]:
for
i
,
s
in
enumerate
(
w
.
d
[
"size"
]):
for
r
in
range
(
len
(
ranges
)):
if
s
>=
ranges
[
r
]:
break
result
[
r
][
i
]
+=
s
print
result
for
r
in
range
(
len
(
ranges
)):
self
.
d
[
"reads-distribution-"
+
str
(
ranges
[
r
])]
=
result
[
r
]
#TODO V/D/J distrib and more
### save / load to .json
def
save_json
(
self
,
output
):
'''save ListWindows in .json format'''
print
"==>"
,
output
...
...
@@ -363,8 +381,8 @@ class ListWindows:
win
=
self
.
d
[
"windows"
][
index
]
if
(
int
(
win
.
d
[
"top"
])
<
limit
or
limit
==
0
)
:
w
.
append
(
win
)
else
:
others
+=
win
#
else:
#
others += win
self
.
d
[
"windows"
]
=
w
+
list
(
others
)
self
.
d
[
"germline"
]
=
self
.
d
[
"germline"
][
0
]
...
...
@@ -754,6 +772,7 @@ def main():
jlist_fused
.
d
[
"point"
]
=
ll
print
jlist_fused
.
build_stat
()
jlist_fused
.
cut
(
args
.
top
,
len
(
l
))
print
"
\t
"
,
jlist_fused
print
...
...
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