Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TFSEE
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
GCRB
TFSEE
Commits
cffef5f6
Commit
cffef5f6
authored
7 years ago
by
Venkat Malladi
Browse files
Options
Downloads
Patches
Plain Diff
Add in overlap of enhacners.
parent
f1d15a09
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
intervene_test/Enhancer_percentages.png
+0
-0
0 additions, 0 deletions
intervene_test/Enhancer_percentages.png
intervene_test/enhancer_percentages.py
+62
-0
62 additions, 0 deletions
intervene_test/enhancer_percentages.py
with
62 additions
and
0 deletions
intervene_test/Enhancer_percentages.png
0 → 100644
+
0
−
0
View file @
cffef5f6
17 KiB
This diff is collapsed.
Click to expand it.
intervene_test/enhancer_percentages.py
0 → 100644
+
62
−
0
View file @
cffef5f6
import
pandas
as
pd
import
matplotlib.pyplot
as
plt
import
numpy
as
np
raw_data
=
{
'
Cell
'
:
[
'
H3K4me1
'
,
'
H3K27ac
'
,
'
GRO-seq
'
],
'
1 method
'
:
[
float
((
153327
)),
float
((
12510
)),
float
((
3754
))],
'
2 method
'
:
[
float
((
55923
)),
float
((
55820
)),
float
((
611
))],
'
3 method
'
:
[
float
((
609
)),
float
((
609
)),
float
((
609
))]}
df
=
pd
.
DataFrame
(
raw_data
,
columns
=
[
'
Cell
'
,
'
1 method
'
,
'
2 method
'
,
'
3 method
'
])
# Create a figure with a single subplot
f
,
ax
=
plt
.
subplots
(
1
,
figsize
=
(
10
,
5
))
# Set bar width at 1
bar_width
=
0.5
# positions of the left bar-boundaries
bar_l
=
[
i
for
i
in
range
(
len
(
df
[
'
1 method
'
]))]
# positions of the x-axis ticks (center of the bars as bar labels)
tick_pos
=
[
i
+
(
bar_width
/
2
)
for
i
in
bar_l
]
# Create the total enhancers
totals
=
[
i
+
j
+
k
for
i
,
j
,
k
in
zip
(
df
[
'
1 method
'
],
df
[
'
2 method
'
],
df
[
'
3 method
'
])]
# Create the percentage of the total unmarked enhancers value for each cell was
meth_1
=
[
i
/
float
(
j
)
*
100
for
i
,
j
in
zip
(
df
[
'
1 method
'
],
totals
)]
# Create the percentage of the total H3K4me1 alone enhancers value for each cell
meth_2
=
[
i
/
float
(
j
)
*
100
for
i
,
j
in
zip
(
df
[
'
2 method
'
],
totals
)]
# Create the percentage of the total H3K4me1+, H3K27ac+ enhancers value for each cell
meth_3
=
[
i
/
float
(
j
)
*
100
for
i
,
j
in
zip
(
df
[
'
3 method
'
],
totals
)]
N
=
3
ind
=
np
.
arange
(
N
)
# the x locations for the groups
width
=
0.5
# the width of the bars: can also be len(x) sequence
p1
=
plt
.
bar
(
ind
,
meth_1
,
width
,
color
=
'
#6DA2DB
'
)
p2
=
plt
.
bar
(
ind
,
meth_2
,
width
,
bottom
=
meth_1
,
color
=
'
#D2D5D4
'
)
p3
=
plt
.
bar
(
ind
,
meth_3
,
width
,
bottom
=
[
i
+
j
for
i
,
j
in
zip
(
meth_1
,
meth_2
)],
color
=
'
#D52114
'
)
plt
.
ylabel
(
'
% total enhancers
'
)
plt
.
title
(
'
Stage
'
)
plt
.
xticks
(
ind
,
(
'
H3K4me1
'
,
'
H3K27ac
'
,
'
GRo-seq
'
))
plt
.
yticks
(
np
.
arange
(
0
,
110
,
10
))
plt
.
savefig
(
'
Enhancer_percentages.png
'
)
plt
.
clf
()
H3K27ac_enhancers
=
12510
,
H3K27ac_enhancers
&
H3K4me1_enhancers
=
55566
,
H3K4me1_enhancers
=
153327
,
GRO
-
seq_enhancers
&
H3K27ac_enhancers
&
H3K4me1_enhancers
=
609
,
GRO
-
seq_enhancers
&
H3K27ac_enhancers
=
254
,
GRO
-
seq_enhancers
=
3754
,
GRO
-
seq_enhancers
&
H3K4me1_enhancers
=
357
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment