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
5456be43
Commit
5456be43
authored
Sep 23, 2020
by
Eric CHARPENTIER
🐍
Browse files
Merge branch 'master' of
https://gitlab.univ-nantes.fr/bird_pipeline_registry/srp-pipeline
parents
1ec38943
dcf94c2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
SCRIPTS/make_html.py
View file @
5456be43
...
...
@@ -255,11 +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
(
GenesInOntologyBackground
=
[
int
(
q
[
1
])
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'
]]
...
...
@@ -269,9 +269,9 @@ for c in conditionVS:
table
=
table
.
rename
(
columns
=
{
'GeneRatio'
:
'GeneQueryRatio'
,
'pvalue'
:
'pval'
,
'p.adjust'
:
'padj'
,
'qvalue'
:
'qval'
})
# We select and order interesting columns
if
annot
==
"annotGo"
:
table
=
table
[[
'ONTOLOGY'
,
'ID'
,
'GeneTermRatio'
,
'GeneQueryRatio'
,
'pval'
,
'padj'
,
'qval'
,
'Description'
,
'Count'
,
'GenesInQuery'
,
'GenesInTermBackground'
,
'GenesInOntologyBackground'
,
'geneID'
]]
table
=
table
[[
'ONTOLOGY'
,
'ID'
,
'GeneTermRatio'
,
'GeneQueryRatio'
,
'pval'
,
'padj'
,
'qval'
,
'Description'
,
'Count'
,
'GenesInQuery'
,
'GenesInTermBackground'
,
'geneID'
]]
else
:
table
=
table
[[
'ID'
,
'GeneTermRatio'
,
'GeneQueryRatio'
,
'pval'
,
'padj'
,
'qval'
,
'Description'
,
'Count'
,
'GenesInQuery'
,
'GenesInTermBackground'
,
'GenesInOntologyBackground'
,
'geneID'
]]
table
=
table
[[
'ID'
,
'GeneTermRatio'
,
'GeneQueryRatio'
,
'pval'
,
'padj'
,
'qval'
,
'Description'
,
'Count'
,
'GenesInQuery'
,
'GenesInTermBackground'
,
'geneID'
]]
# We export them
templateVars
[
"deseqres"
][
c
[
"condition1"
]
+
"__vs__"
+
c
[
"condition2"
]][
annot
]
=
dataframe_to_list_of_dicts
(
table
)
...
...
@@ -328,7 +328,6 @@ for c in conditionVS:
g
[
"number_of_genes_in_background"
]
=
ls
[
3
]
g
[
"gene_ratio"
]
=
str
(
"%.2f"
%
(
int
(
ls
[
2
])
/
int
(
ls
[
3
])))
g
[
"ncbiTaxonId"
]
=
ls
[
4
]
g
[
"inputGenes"
]
=
', '
.
join
(
ls
[
5
].
split
(
','
))
gc
=
[]
for
g1
,
g2
in
zip
(
ls
[
5
].
split
(
','
),
ls
[
6
].
split
(
','
)):
fc
=
templateVars
[
"deseqres"
][
c
[
"condition1"
]
+
"__vs__"
+
c
[
"condition2"
]][
"fc"
][
g1
]
...
...
@@ -343,7 +342,6 @@ for c in conditionVS:
sign
=
""
gc
.
append
(
'<font color="{}">{}</font>'
.
format
(
color
,
g2
))
g
[
"coloredPreferredNames"
]
=
', '
.
join
(
gc
)
g
[
"preferredNames"
]
=
', '
.
join
(
ls
[
6
].
split
(
','
))
g
[
"p_value"
]
=
ls
[
7
]
g
[
"fdr"
]
=
ls
[
8
]
g
[
"description"
]
=
ls
[
9
]
...
...
TEMPLATE/index_SA.html
View file @
5456be43
...
...
@@ -323,7 +323,6 @@
<th>
Description
</th>
<th>
GenesInQuery
</th>
<th>
GenesInTermBackground
</th>
<th>
GenesInOntologyBackground"
</th>
<th>
geneID
</th>
</tr>
</thead>
...
...
@@ -360,7 +359,6 @@
<th>
Description
</th>
<th>
GenesInQuery
</th>
<th>
GenesInTermBackground
</th>
<th>
GenesInOntologyBackground"
</th>
<th>
geneID
</th>
</tr>
</thead>
...
...
@@ -436,8 +434,6 @@
<th>
Term
</th>
<th>
Count
</th>
<th>
Ratio
of genes
in
term
</th>
<th>
inputGenes
</th>
<th>
preferredNames
</th>
<th>
pvalue
</th>
<th>
fdr
</th>
<th>
Description
</th>
...
...
@@ -630,7 +626,7 @@
function
gen_stringdb_table
(
table_id
,
comp
){
var
table
=
$
(
'
#
'
+
table_id
).
DataTable
({
"
order
"
:
[[
8
,
"
asc
"
]],
"
order
"
:
[[
6
,
"
asc
"
]],
"
data
"
:{{
stringParams
}}[
comp
][
"
enrich
"
],
"
columns
"
:[
{
...
...
@@ -643,18 +639,10 @@
{
"
data
"
:
"
term
"
},
{
"
data
"
:
"
number_of_genes
"
},
{
"
data
"
:
"
gene_ratio
"
},
{
"
data
"
:
"
inputGenes
"
},
{
"
data
"
:
"
preferredNames
"
},
{
"
data
"
:
"
p_value
"
},
{
"
data
"
:
"
fdr
"
},
{
"
data
"
:
"
description
"
}
],
"
columnDefs
"
:
[
{
"
targets
"
:
[
5
,
6
],
"
visible
"
:
false
}
],
"
initComplete
"
:
function
()
{
this
.
api
().
columns
([
1
]).
every
(
function
()
{
var
column
=
this
;
...
...
@@ -733,12 +721,11 @@
{
"
data
"
:
"
Description
"
},
{
"
data
"
:
"
GenesInQuery
"
,
render
:
$
.
fn
.
dataTable
.
render
.
number
(
'
'
,
'
.
'
,
2
)},
{
"
data
"
:
"
GenesInTermBackground
"
,
render
:
$
.
fn
.
dataTable
.
render
.
number
(
'
'
,
'
.
'
,
2
)},
{
"
data
"
:
"
GenesInOntologyBackground
"
,
render
:
$
.
fn
.
dataTable
.
render
.
number
(
'
'
,
'
.
'
,
2
)},
{
"
data
"
:
"
geneID
"
}
],
"
columnDefs
"
:
[
{
"
targets
"
:
[
10
,
11
,
12
,
13
],
"
targets
"
:
[
10
,
11
,
12
],
"
visible
"
:
false
}
],
...
...
@@ -801,12 +788,11 @@
{
"
data
"
:
"
Description
"
},
{
"
data
"
:
"
GenesInQuery
"
,
render
:
$
.
fn
.
dataTable
.
render
.
number
(
'
'
,
'
.
'
,
2
)},
{
"
data
"
:
"
GenesInTermBackground
"
,
render
:
$
.
fn
.
dataTable
.
render
.
number
(
'
'
,
'
.
'
,
2
)},
{
"
data
"
:
"
GenesInOntologyBackground
"
,
render
:
$
.
fn
.
dataTable
.
render
.
number
(
'
'
,
'
.
'
,
2
)},
{
"
data
"
:
"
geneID
"
}
],
"
columnDefs
"
:
[
{
"
targets
"
:
[
9
,
10
,
11
,
12
],
"
targets
"
:
[
9
,
10
,
11
],
"
visible
"
:
false
}
]});
...
...
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