Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
bird_pipeline_registry
SRP-pipeline
Commits
11ea84a1
Commit
11ea84a1
authored
Sep 22, 2020
by
Philippe BORDRON
Browse files
Reduce significative numbers stored in html for enrichment gene ratios
parent
8815b3ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
SCRIPTS/make_html.py
View file @
11ea84a1
...
...
@@ -255,10 +255,11 @@ for c in conditionVS:
table
[
'geneID'
]
=
newGeneID
# We add some columns
precision
=
5
table
=
table
.
assign
(
GenesInQuery
=
[
int
(
q
[
1
])
for
q
in
table
[
'GeneRatio'
].
str
.
split
(
"/"
)])
table
=
table
.
assign
(
GenesInTermBackground
=
[
int
(
q
[
0
])
for
q
in
table
[
'BgRatio'
].
str
.
split
(
"/"
)])
table
=
table
.
assign
(
GeneQueryRatio
=
table
[
'Count'
]
/
table
[
'GenesInQuery'
])
table
=
table
.
assign
(
GeneTermRatio
=
table
[
'Count'
]
/
table
[
'GenesInTermBackground'
])
table
=
table
.
assign
(
GeneQueryRatio
=
round
(
table
[
'Count'
]
/
table
[
'GenesInQuery'
]
,
precision
)
)
table
=
table
.
assign
(
GeneTermRatio
=
round
(
table
[
'Count'
]
/
table
[
'GenesInTermBackground'
]
,
precision
)
)
# Format in scientific notation until we found a way in DataTable
table
[
'pvalue'
]
=
[
str
(
"%.2e"
%
s
)
for
s
in
table
[
'pvalue'
]]
table
[
'p.adjust'
]
=
[
str
(
"%.2e"
%
s
)
for
s
in
table
[
'p.adjust'
]]
...
...
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