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
Charlotte Volk
mateRNAl
Commits
dd187c0f
Commit
dd187c0f
authored
Apr 19, 2018
by
Carlos GO
Browse files
parse average over runs
parent
57e94a06
Changes
2
Hide whitespace changes
Inline
Side-by-side
mateRNAl.py
View file @
dd187c0f
...
...
@@ -324,4 +324,4 @@ def start(generations=20, size=10, length=50, fit='energy', gc=0.5,\
if
__name__
==
"__main__"
:
start
(
mutation_rate
=-
1
,
verbose
=
True
,
generations
=
1000
,
size
=
1000
,
runs
=
20
,
\
dest
=
"maternal_50_a10.csv"
)
dest
=
"maternal_50_a10.csv"
,
procs
=
10
)
parse.py
View file @
dd187c0f
...
...
@@ -12,13 +12,16 @@ def structure_info(df, sse='multi'):
"""
df
[
sse
]
=
df
[
'structure'
].
apply
(
lambda
x
:
loop_counter
(
x
)[
sse
])
return
df
def
mean_stats
(
dfs
):
return
pd
.
concat
(
list
(
dfs
)).
groupby
(
'mutations'
).
mean
()
def
struc_plot
(
df
,
sse
=
'multi'
):
df
=
structure_info
(
df
,
sse
=
sse
)
print
(
df
)
strucs
=
df
.
groupby
(
'mutations'
).
mean
(
)
def
struc_plot
(
df
s
,
sse
=
'multi'
):
df
s
=
(
structure_info
(
df
)
for
df
in
dfs
)
strucs
=
pd
.
concat
(
dfs
).
groupby
(
'mutations'
).
mean
(
)
print
(
strucs
)
sse_mean
=
strucs
[
sse
]
sns
.
tsplot
(
sse_mean
)
plt
.
savefig
(
"multis_adapt.pdf"
,
format
=
"pdf"
)
plt
.
show
()
# print(sse_mean)
...
...
@@ -29,7 +32,7 @@ def mut_plot():
plt
.
show
()
if
__name__
==
"__main__"
:
path
=
"maternal_50_adaptive_0.csv"
df
=
pd
.
read_csv
(
path
)
struc_plot
(
df
,
sse
=
'multi'
)
df
s
=
(
pd
.
read_csv
(
f
"maternal_50_a10_
{
i
}
.csv"
)
for
i
in
range
(
20
)
)
struc_plot
(
df
s
,
sse
=
'multi'
)
# mut_plot()
pass
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