Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,712
Issues
1,712
List
Boards
Labels
Service Desk
Milestones
Merge Requests
87
Merge Requests
87
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
1cf43f19
Commit
1cf43f19
authored
Sep 12, 2018
by
Ryan Herbert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sample_set.py stats_decorator.py add loci list
See
#3456
parent
df9a97dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
server/web2py/applications/vidjil/controllers/sample_set.py
server/web2py/applications/vidjil/controllers/sample_set.py
+3
-0
server/web2py/applications/vidjil/models/stats_decorator.py
server/web2py/applications/vidjil/models/stats_decorator.py
+12
-0
No files found.
server/web2py/applications/vidjil/controllers/sample_set.py
View file @
1cf43f19
...
...
@@ -659,6 +659,7 @@ def getStatHeaders():
b
=
BooleanDecorator
()
p
=
BarDecorator
()
bc
=
BarChartDecorator
()
l
=
LociListDecorator
()
return
[(
'sample_sets'
,
'db'
,
s
),
(
'main_clone'
,
'parser'
,
m
),
(
'reads'
,
'parser'
,
m
),
...
...
@@ -666,6 +667,7 @@ def getStatHeaders():
(
'mapped_percent'
,
'parser'
,
p
),
(
'bool'
,
'parser'
,
b
),
(
'bool_true'
,
'parser'
,
b
),
(
'loci'
,
'parser'
,
l
),
(
'genescan'
,
'parser'
,
bc
)
]
...
...
@@ -698,6 +700,7 @@ def getFusedStats(file_name, res, dest):
dest
[
'mapped_percent'
]
=
100.0
*
(
float
(
data
[
'reads'
][
'segmented'
][
result_index
])
/
float
(
reads
))
dest
[
'bool'
]
=
False
dest
[
'bool_true'
]
=
True
dest
[
'loci'
]
=
[
x
for
x
in
data
[
'reads'
][
'germline'
]
if
data
[
'reads'
][
'germline'
][
x
][
result_index
]
>=
0
]
dest
[
'genescan'
]
=
[
68
,
27
,
18
,
45
,
89
,
63
,
53
,
64
,
93
,
21
,
47
,
5
,
64
,
68
,
46
,
68
,
18
,
72
,
36
,
70
,
39
,
21
,
84
,
32
,
29
,
4
,
76
,
51
,
33
,
67
,
14
,
57
,
75
,
61
,
29
,
11
,
81
,
71
,
91
,
32
,
40
,
71
,
87
,
54
,
50
,
88
,
72
,
59
,
29
,
80
,
48
,
...
...
server/web2py/applications/vidjil/models/stats_decorator.py
View file @
1cf43f19
...
...
@@ -51,3 +51,15 @@ class SetsDecorator(StatDecorator):
d
=
DIV
(
"(%d) %s"
%
(
sample_set
[
'id'
],
sample_set
[
'name'
]))
ssets
.
append
(
d
)
return
DIV
(
*
ssets
)
class
LociListDecorator
(
StatDecorator
):
def
__init__
(
self
):
super
(
LociListDecorator
,
self
).
__init__
()
def
decorate
(
self
,
data
):
loci
=
[]
for
locus
in
data
:
span
=
SPAN
(
locus
)
loci
.
append
(
span
)
return
DIV
(
*
loci
)
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