Commit 57e94a06 authored by Carlos GO's avatar Carlos GO
Browse files

parse script

parent a155db76
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from RNAstats import loop_counter
def structure_info(df, sse='multi'):
Compute counts for a given SSE feature.
df[sse] = df['structure'].apply(lambda x: loop_counter(x)[sse])
return df
def struc_plot(df, sse='multi'):
df = structure_info(df, sse=sse)
strucs = df.groupby('mutations').mean()
sse_mean = strucs[sse]
# print(sse_mean)
def mut_plot():
sig = lambda e: 1 / (1 + np.exp(-e/10))
plt.plot([sig(x) for x in np.arange(-30, 0, 1)])
if __name__ == "__main__":
path = "maternal_50_adaptive_0.csv"
df = pd.read_csv(path)
struc_plot(df, sse='multi')
# mut_plot()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment