Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
a56f08f3
Commit
a56f08f3
authored
Oct 05, 2018
by
Ryan Herbert
Browse files
sample_set.py stats_decorator.py alter genescan decorator.
parent
9dd1f073
Pipeline
#42529
failed with stages
in 2 minutes and 4 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/controllers/sample_set.py
View file @
a56f08f3
...
...
@@ -709,14 +709,14 @@ def getFusedStats(file_name, res, dest):
tmp
[
arl
]
+=
c
[
'reads'
][
result_index
]
min_len
=
int
(
min
(
tmp
.
keys
()))
max_len
=
int
(
max
(
tmp
.
keys
()))
tmp_dict
=
{}
for
i
in
range
(
max_len
-
min_len
):
cursor
=
i
+
min_len
if
cursor
in
tmp
:
tmp_dict
[
i
]
=
100.0
*
math
.
log
(
tmp
[
cursor
])
/
math
.
log
(
reads
)
tmp_list
=
[]
for
i
in
range
(
min_len
,
max_len
):
if
i
in
tmp
:
tmp_val
=
100.0
*
math
.
log
(
tmp
[
i
])
/
math
.
log
(
reads
)
else
:
tmp_dict
[
i
]
=
0
dest
[
'genescan'
]
=
tmp_dict
tmp_val
=
0
tmp_list
.
append
((
i
,
tmp_val
))
dest
[
'genescan'
]
=
tmp_list
#dest['bool'] = False
#dest['bool_true'] = True
...
...
server/web2py/applications/vidjil/models/stats_decorator.py
View file @
a56f08f3
...
...
@@ -59,9 +59,8 @@ class GenescanDecorator(LabeledBarChartDecorator):
def
decorate
(
self
,
data
):
import
operator
sorted_values
=
sorted
(
data
.
items
(),
key
=
operator
.
itemgetter
(
0
))
new_values
=
[]
for
t
in
sorted_values
:
for
t
in
data
:
new_key
=
"%d%% at %dbp"
%
(
t
[
1
],
t
[
0
])
new_values
.
append
((
new_key
,
t
[
1
]))
return
super
(
GenescanDecorator
,
self
).
decorate
(
new_values
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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