Commit ee7f4134 authored by Noordijk, Ben's avatar Noordijk, Ben

Final Commit

parent 092a3a62
......@@ -2,23 +2,39 @@ import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
"""
This script analyses the output .csv of FRET_efficiency calculator
"""
with open("../Testscripts_en_output/FRET_KS_test_results_2.csv","r") as f:
df = pd.read_csv(f)
# All column headers
print(df.keys())
min_models = 2
print(len(df["Name"].unique()))
# Only select proteins with more than two models generated
sufficient = df[(df["No. Original models"] > min_models) & (df["No. Extended models"] > min_models)]
print()
print(len(sufficient['Name'].unique()))
print(len(sufficient['Name']))
print()
print(sufficient[sufficient['P value']<0.05]["Name"])
\ No newline at end of file
def main():
"""
This script analyses the output .csv of FRET_efficiency calculator
"""
with open("../Testscripts_en_output/FRET_KS_test_results_2.csv","r") as f:
df = pd.read_csv(f)
# All column headers
print(df.keys())
print(df["Name"].unique())
min_models = 2 # Protein are only analysed when more than #min_models have been generated
print(len(df["Name"].unique()))
# Only select proteins with more than two models generated
sufficient = df[(df["No. Original models"] > min_models) & (df["No. Extended models"] > min_models)]
print()
print(len(sufficient['Name'].unique()))
print(len(sufficient['Name']))
print()
significant = sufficient[sufficient['P value']<0.05][["Name","No. Original models","No. Extended models","Tag no.",
"Original_Median","Original_Stddev","Extended_Median","Extended_Stddev",
"P value"]]
print(significant)
# ax = significant.plot.bar(x="Name", y=["Original_Median","Extended_Median"])
# ax.set_ylabel("FRET Efficiency")
# ax.set_xlabel("Protein name")
# plt.show()
# plt.savefig("../Testscripts_en_output/FRET_bar_chart_1.png")
# significant.to_excel("../Testscripts_en_output/FRET_KS_significant_results.xlsx", index=False)
if __name__ == "__main__":
main()
\ No newline at end of file
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