Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
BICF
Software
TReNCo
Commits
a47fb6a2
Commit
a47fb6a2
authored
Sep 16, 2019
by
Christopher Bennett
Browse files
Full working version of TReNCo
parent
59201a03
Changes
1
Hide whitespace changes
Inline
Side-by-side
trenco_modules/trenco_core.py
View file @
a47fb6a2
...
...
@@ -936,19 +936,16 @@ def tis_enh_gene_net(sample, outdir, matrix1, matrix2, gene_vect, threads):
p
.
join
()
print
(
'Gathering all weights from all TADs'
)
all_network
=
tf_pro_mx
.
multiply
(
g_vect
.
T
,
axis
=
1
)
all_network
.
to_csv
(
'process/{}_tf_promoter_matrix.txt'
.
format
(
sample
),
sep
=
'
\t
'
)
tf_gene_wgt
=
tf_pro_mx
.
multiply
(
g_vect
.
T
,
axis
=
1
)
tf_gene_wgt
.
to_csv
(
'process/{}_tf_promoter_matrix.txt'
.
format
(
sample
),
sep
=
'
\t
'
)
for
df
in
dfs
:
all_network
.
add
(
df
)
all_network
=
pd
.
concat
(
dfs
,
sort
=
False
,
axis
=
1
)
all_network
.
fillna
(
0
,
inplace
=
True
)
#all_network = pd.concat(dfs, sort = False)
#all_network.fillna(0, inplace=True)
#all_network_add = all_network.add(tfxpro_wgt, fill_value=0)
all_network_add
=
all_network
.
add
(
tf_gene_wgt
,
fill_value
=
0
)
hdf
=
pd
.
HDFStore
(
'results/networks/{}_full_network.h5'
.
format
(
sample
))
hdf
[
'results/network'
]
=
all_network
hdf
[
'results/network'
]
=
all_network
_add
hdf
.
close
()
print
(
all_network
.
shape
)
...
...
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