def get_RSA_frequencies(natural_proteins, lower_RSA_boundary, upper_RSA_boundary): natural_distribution = af.get_AA_distribution(natural_proteins) natural_RSA = af.get_RSA_Values(natural_proteins) natural_RSA_array = af.make_array(natural_RSA) seq_length = len(natural_RSA) bin_1 = [] bin_2 = [] bin_3 = [] bin_4 = [] bin_5 = [] i = 0 count = 0 for site in natural_distribution: if (lower_RSA_boundary<=natural_RSA_array[i] and natural_RSA_array[i]<= upper_RSA_boundary): #print natural_RSA_array[i] #print site[0:4] bin_1.append(site[0]) bin_2.append(site[1]) bin_3.append(site[2]) bin_4.append(site[3]) bin_5.append(site[4]) i = i + 1 count = count + 1 else: i = i + 1 if count == 0: frequency_data = [0.0, 0.0, 0.0, 0.0, 0.0] else: frequency_data = [mean(bin_1)/mean(bin_1), mean(bin_2)/mean(bin_1), mean(bin_3)/mean(bin_1), mean(bin_4)/mean(bin_1), mean(bin_5)/mean(bin_1)] if (mean(bin_1)) == 0.0: print "MEAN OF BIN 1 is ZERO!!!!" print frequency_data #frequency_data = [mean(bin_1), mean(bin_2), mean(bin_3), mean(bin_4), mean(bin_5)] print "Number of residues in bin: " + str(count) return frequency_data
def get_mixed_entropy_values(PDB, buried_temp, surface_temp): new_entropies = [] #Make the files buried_file = "align_data_array_" + PDB + "_" + str(buried_temp) + ".dat" surface_file = "align_data_array_" + PDB + "_" + str(surface_temp) + ".dat" #Get the RSA Values RSA = af.make_array(af.get_RSA_Values(buried_file)) buried_entropies = af.get_native_entropy(buried_file) surface_entropies = af.get_native_entropy(surface_file) #Get the entropy values for i in xrange(len(RSA)): if (float(RSA[i]) <=0.25): new_entropies.append(buried_entropies[i]) else: new_entropies.append(surface_entropies[i]) return RSA, new_entropies
def get_RSA_frequencies(natural_proteins, lower_RSA_boundary, upper_RSA_boundary): #natural_distribution = af.get_AA_distribution(natural_proteins) natural_distribution = get_AA_distribution_mod(natural_proteins) #natural_dis_array = array(natural_distribution) #m,n = natural_dis_array.shape #print "num_residues, length of alignment: " + str(n),m #print natural_distribution natural_RSA = af.get_RSA_Values(natural_proteins) natural_RSA_array = af.make_array(natural_RSA) seq_length = len(natural_RSA) frequency_data = [] all_k_values = [] k_values = [] k_lists = [] bin_1 = [] bin_2 = [] bin_3 = [] bin_4 = [] bin_5 = [] bin_6 = [] bin_7 = [] bin_8 = [] bin_9 = [] bin_10 = [] bin_11 = [] bin_12 = [] bin_13 = [] bin_14 = [] bin_15 = [] bin_16 = [] bin_17 = [] bin_18 = [] bin_19 = [] bin_20 = [] i = 0 count = 0 for site in natural_distribution: if (lower_RSA_boundary<=natural_RSA_array[i] and natural_RSA_array[i]<= upper_RSA_boundary): #print natural_RSA_array[i] #print site[0:4] bin_1.append(site[0]) bin_2.append(site[1]) bin_3.append(site[2]) bin_4.append(site[3]) bin_5.append(site[4]) bin_6.append(site[5]) bin_7.append(site[6]) bin_8.append(site[7]) bin_9.append(site[8]) bin_10.append(site[9]) bin_11.append(site[10]) bin_12.append(site[11]) bin_13.append(site[12]) bin_14.append(site[13]) bin_15.append(site[14]) bin_16.append(site[15]) bin_17.append(site[16]) bin_18.append(site[17]) bin_19.append(site[18]) bin_20.append(site[19]) i = i + 1 count = count + 1 else: i = i + 1 if count != 0: #Need to find a way to exclude the point frequencies = [np.mean(bin_1)/np.mean(bin_1), np.mean(bin_2)/np.mean(bin_1), np.mean(bin_3)/np.mean(bin_1), np.mean(bin_4)/np.mean(bin_1), np.mean(bin_5)/np.mean(bin_1), np.mean(bin_6)/np.mean(bin_1), np.mean(bin_7)/np.mean(bin_1), np.mean(bin_8)/np.mean(bin_1), np.mean(bin_9)/np.mean(bin_1), np.mean(bin_10)/np.mean(bin_1), np.mean(bin_11)/np.mean(bin_1), np.mean(bin_12)/np.mean(bin_1), np.mean(bin_13)/np.mean(bin_1), np.mean(bin_14)/np.mean(bin_1), np.mean(bin_15)/np.mean(bin_1), np.mean(bin_16)/np.mean(bin_1), np.mean(bin_17)/np.mean(bin_1), np.mean(bin_18)/np.mean(bin_1), np.mean(bin_19)/np.mean(bin_1), np.mean(bin_20)/np.mean(bin_1)] all_k_values = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] k_count = 0 for element in frequencies: if element == 0.0: continue else: frequency_data.append(np.log(element)) k_values.append(all_k_values[k_count]) k_count = k_count + 1 set_k_r(k_values, lower_RSA_boundary, upper_RSA_boundary) return frequency_data
for PDB in PDBS: RSA1, entropy_mix1 = get_mixed_entropy_values(PDB, 0.0, 0.1) RSA2, entropy_mix2 = get_mixed_entropy_values(PDB, 0.03, 0.1) [cor_entropy_RSA_mix1, pvalue1] = pearsonr(RSA1, entropy_mix1) cor_entropy_RSA_mix1 = float(cor_entropy_RSA_mix1) cor_values1.append(cor_entropy_RSA_mix1) [cor_entropy_RSA_mix2, pvalue2] = pearsonr(RSA2, entropy_mix2) cor_entropy_RSA_mix2 = float(cor_entropy_RSA_mix2) cor_values2.append(cor_entropy_RSA_mix2) natural_file = "align_natural_data_array_" + PDB + ".dat" natural_RSA = af.make_array(af.get_RSA_Values(natural_file)) natural_entropy = af.get_native_entropy(natural_file) [natural_cor_entropy_RSA, pvalue3] = pearsonr(natural_RSA, natural_entropy) natural_cor_entropy_RSA = float(natural_cor_entropy_RSA) natural_cor_values.append(natural_cor_entropy_RSA) fig = plt.figure(1, dpi = 400, figsize = (16,6)) correlation_values = [cor_values1, cor_values2, natural_cor_values] correlation_values_transpose = transpose(correlation_values) (m,n) = correlation_values_transpose.shape #rcParams['lines.linewidth'] = 2 ax = axes([0.066, 0.115, 0.43, 0.85]) #text(-0.37, 0.6, "A", fontweight = 'bold', ha = 'center', va = 'center', fontsize = 20) '''
buried_all_temp_data = [] intermediate_all_temp_data = [] surface_all_temp_data = [] noah_buried_all_temp_mean_entropy_data_array = [] noah_intermediate_all_temp_mean_entropy_data_array = [] noah_surface_all_temp_mean_entropy_data_array = [] noah_buried_medians = [] noah_intermediate_medians = [] noah_surface_medians = [] for line in buried_mean_entropy_temp_data: data = re.split("\t", line) data.pop(0) data_array = analysis_functions.make_array(data) buried_all_temp_data.append(data_array) #mean_entropy_temp_values_array = analysis_functions.make_array(data) noah_buried_all_temp_mean_entropy_data_array = array(buried_all_temp_data) print len(noah_buried_all_temp_mean_entropy_data_array) noah_buried_medians = median(noah_buried_all_temp_mean_entropy_data_array, axis = 0) print len(noah_buried_medians) for line in intermediate_mean_entropy_temp_data: data = re.split("\t", line) data.pop(0) data_array = analysis_functions.make_array(data) intermediate_all_temp_data.append(data_array) #mean_entropy_temp_values_array = analysis_functions.make_array(data) noah_intermediate_all_temp_mean_entropy_data_array = array(intermediate_all_temp_data) noah_intermediate_medians = median(noah_intermediate_all_temp_mean_entropy_data_array, axis = 0)
mean_KL_method_data = mean_KL_method_file.readlines() mean_KL_method_file.close() header = mean_KL_method_data.pop(0) ''' mean_KL_method_ordered_file = open("graph_mean_KL_all_method_data_ordered.csv", "r") mean_KL_method_ordered_data = mean_KL_method_ordered_file.readlines() mean_KL_method_ordered_file.close() ordered_header = mean_KL_method_ordered_data.pop(0) ''' all_method_data = [] all_method_mean_KL_data_array = [] for line in mean_KL_method_data: data = re.split("\t", line) data.pop(0) data_array = analysis_functions.make_array(data) all_method_data.append(data_array) mean_KL_method_values_array = analysis_functions.make_array(data) all_method_mean_KL_data_array = array(all_method_data) ''' all_method_ordered_data = [] all_method_ordered_mean_KL_data_array = [] for line in mean_KL_method_ordered_data: data = re.split("\t", line) data.pop(0) data_array = analysis_functions.make_array(data) all_method_ordered_data.append(data_array) mean_KL_ordered_method_values_array = analysis_functions.make_array(data) all_method_ordered_mean_KL_data_array = array(all_method_ordered_data) '''
ax.get_yaxis().tick_left() ax.set_xticks([1, 2, 3]) ax.set_xticklabels(["designed", "evolved \n from design", "natural"]) # mean KL data mean_KL_method_file = open("graph_mean_KL_all_method_data.csv", "r") mean_KL_method_data = mean_KL_method_file.readlines() mean_KL_method_file.close() header = mean_KL_method_data.pop(0) all_method_data = [] all_method_mean_KL_data_array = [] for line in mean_KL_method_data: data = re.split("\t", line) data.pop(0) data_array = af.make_array(data) all_method_data.append(data_array) mean_KL_method_values_array = af.make_array(data) all_method_mean_KL_data_array = array(all_method_data) # effective number data all_temp_entropy_values = [] protein_file_name = "graph_mean_data_natural.csv" [natural_mean_RSA_values, natural_mean_entropy_values, natural_cor_entropy_RSA_values, natural_mean_split_KL_values, natural_cor_entropy_icn_values, natural_cor_entropy_iwcn_values] = af.get_mean_designed_data(protein_file_name) protein_file_name = "graph_mean_data_rosetta.csv" [designed_mean_RSA_values_rosetta, designed_mean_entropy_values_rosetta, designed_cor_entropy_RSA_values_rosetta, designed_mean_KL_values_rosetta, designed_cor_entropy_icn_values_rosetta, designed_cor_entropy_iwcn_values_rosetta] = af.get_mean_designed_data(protein_file_name) protein_file_name = "graph_mean_data_evolved.csv"
header = natural_protein_data.pop(0) for line in natural_protein_data: data = re.split("\t", line) natural_data.append(data) for data in natural_data: #print data pdb_names.append(data[0]) chain_names.append(data[1]) natural_mean_RSA_values.append(data[2]) natural_mean_entropy_values.append(data[3]) natural_cor_entropy_RSA_values.append(data[4]) natural_intercept_values.append(data[6]) natural_slope_values.append(data[7]) natural_mean_RSA_values_array = analysis_functions.make_array(natural_mean_RSA_values) natural_mean_entropy_values_array = analysis_functions.make_array(natural_mean_entropy_values) natural_cor_entropy_RSA_values_array = analysis_functions.make_array(natural_cor_entropy_RSA_values) natural_intercept_values_array = analysis_functions.make_array(natural_intercept_values) natural_slope_values_array = analysis_functions.make_array(natural_slope_values) protein_file_name = "graph_mean_data_ordered_0.0_noah.csv" [designed_mean_RSA_values_00, designed_mean_entropy_values_00, designed_cor_entropy_RSA_values_00, designed_mean_KL_values_00, designed_intercept_values_00, designed_slope_values_00] = analysis_functions.get_mean_ordered_designed_data(protein_file_name) designed_mean_RSA_values_array_00 = array(designed_mean_RSA_values_00) designed_mean_entropy_values_array_00 = array(designed_mean_entropy_values_00) designed_cor_entropy_RSA_values_array_00 = array(designed_cor_entropy_RSA_values_00) designed_mean_KL_values_array_00 = array(designed_mean_KL_values_00) designed_intercept_values_array_00 = array(designed_intercept_values_00) designed_slope_values_array_00 = array(designed_slope_values_00)
mean_KL_temp_ordered_file = open("graph_mean_KL_buried_temp_data_ordered_noah.csv", "r") mean_KL_temp_ordered_data = mean_KL_temp_ordered_file.readlines() mean_KL_temp_ordered_file.close() ordered_header = mean_KL_temp_ordered_data.pop(0) mean_entropy_temp_file = open("graph_mean_entropy_buried_temp_data_noah.csv", "r") mean_entropy_temp_data = mean_entropy_temp_file.readlines() mean_entropy_temp_file.close() header = mean_entropy_temp_data.pop(0) all_temp_data = [] all_temp_mean_KL_data_array = [] for line in mean_KL_temp_data: data = re.split("\t", line) data.pop(0) data_array = af.make_array(data) all_temp_data.append(data_array) mean_KL_temp_values_array = af.make_array(data) all_temp_mean_KL_data_array = array(all_temp_data) all_temp_ordered_data = [] all_temp_ordered_mean_KL_data_array = [] for line in mean_KL_temp_ordered_data: data = re.split("\t", line) data.pop(0) data_array = af.make_array(data) all_temp_ordered_data.append(data_array) mean_KL_ordered_temp_values_array = af.make_array(data) all_temp_ordered_mean_KL_data_array = array(all_temp_ordered_data) all_temp_data = []
modified_method_array = array(modified_methods) protein_file = open("graph_mean_data_natural.csv", "r") natural_protein_data = protein_file.readlines() protein_file.close() header = natural_protein_data.pop(0) for line in natural_protein_data: data = re.split("\t", line) natural_data.append(data) for data in natural_data: pdb_names.append(data[0]) natural_cor_entropy_RSA_values.append(data[4]) natural_cor_entropy_RSA_values_array = af.make_array(natural_cor_entropy_RSA_values) protein_file_name = "graph_mean_data_rosetta.csv" [designed_mean_RSA_values_rosetta, designed_mean_entropy_values_rosetta, designed_cor_entropy_RSA_values_rosetta, designed_mean_KL_values_rosetta, designed_cor_entropy_iwcn_values_rosetta] = af.get_mean_designed_data(protein_file_name) designed_cor_entropy_RSA_values_array_rosetta = array(designed_cor_entropy_RSA_values_rosetta) protein_file_name = "graph_mean_data_evolved.csv" [designed_mean_RSA_values_evolved, designed_mean_entropy_values_evolved, designed_cor_entropy_RSA_values_evolved, designed_mean_KL_values_evolved, designed_cor_entropy_iwcn_values_evolved] = af.get_mean_designed_data(protein_file_name) designed_cor_entropy_RSA_values_array_evolved = array(designed_cor_entropy_RSA_values_evolved) all_method_cor_entropy_RSA_values.append(designed_cor_entropy_RSA_values_rosetta) all_method_cor_entropy_RSA_values.append(designed_cor_entropy_RSA_values_evolved) all_method_cor_entropy_RSA_values.append(natural_cor_entropy_RSA_values)
natural_proteins = file #Open the files with results designed_proteins_rosetta = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str( "rosetta") + ".dat" designed_proteins_evolved = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str( "evolved") + ".dat" split_natural_1 = "align_natural_sample1_data_array_" + pdb_id + "_" + chain_id + ".dat" split_natural_2 = "align_natural_sample2_data_array_" + pdb_id + "_" + chain_id + ".dat" #Calculates all of the data for comparison (ex. entropy) natural_distribution = analysis_functions.get_AA_distribution_KL( natural_proteins) natural_entropy = analysis_functions.get_native_entropy( natural_proteins) natural_entropy_array = analysis_functions.make_array( natural_entropy) natural_RSA = analysis_functions.get_RSA_Values(natural_proteins) natural_RSA_array = analysis_functions.make_array(natural_RSA) natural_mean_RSA_values.append(mean(natural_RSA_array)) natural_mean_entropy_values.append(mean(natural_entropy_array)) #Calculates cn & wcn # cn13_data = analysis_functions.get_cn13_values(pdb_id, chain_id) # iCN13 = cn13_data[0] # iCN13_array = analysis_functions.make_array(cn13_data) # mean_iCN13_values.append(mean(iCN13_array)) iwcn_data = calc_wcn.get_iwcn_values(pdb_id, chain_id) iWCN_array = analysis_functions.make_array(iwcn_data) mean_iWCN_values.append(mean(iWCN_array))
def get_RSA_frequencies(natural_proteins, lower_RSA_boundary, upper_RSA_boundary): natural_distribution = af.get_AA_distribution(natural_proteins) #natural_distribution = get_AA_distribution_mod(natural_proteins) #natural_dis_array = array(natural_distribution) #m,n = natural_dis_array.shape #print "num_residues, length of alignment: " + str(n),m #print natural_distribution natural_RSA = af.get_RSA_Values(natural_proteins) natural_RSA_array = af.make_array(natural_RSA) seq_length = len(natural_RSA) frequency_data = [] bin_1 = [] bin_2 = [] bin_3 = [] bin_4 = [] bin_5 = [] bin_6 = [] bin_7 = [] bin_8 = [] bin_9 = [] bin_10 = [] bin_11 = [] bin_12 = [] bin_13 = [] bin_14 = [] bin_15 = [] bin_16 = [] bin_17 = [] bin_18 = [] bin_19 = [] bin_20 = [] i = 0 count = 0 for site in natural_distribution: if (lower_RSA_boundary<=natural_RSA_array[i] and natural_RSA_array[i]<= upper_RSA_boundary): #print natural_RSA_array[i] #print site[0:4] bin_1.append(site[0]) bin_2.append(site[1]) bin_3.append(site[2]) bin_4.append(site[3]) bin_5.append(site[4]) bin_6.append(site[5]) bin_7.append(site[6]) bin_8.append(site[7]) bin_9.append(site[8]) bin_10.append(site[9]) bin_11.append(site[10]) bin_12.append(site[11]) bin_13.append(site[12]) bin_14.append(site[13]) bin_15.append(site[14]) bin_16.append(site[15]) bin_17.append(site[16]) bin_18.append(site[17]) bin_19.append(site[18]) bin_20.append(site[19]) i = i + 1 count = count + 1 else: i = i + 1 if count == 0: #Need to find a way to exclude the point frequency_data = [-1] # [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] #return frequency_data else: frequencies = [np.mean(bin_1)/np.mean(bin_1), np.mean(bin_2)/np.mean(bin_1), np.mean(bin_3)/np.mean(bin_1), np.mean(bin_4)/np.mean(bin_1), np.mean(bin_5)/np.mean(bin_1), np.mean(bin_6)/np.mean(bin_1), np.mean(bin_7)/np.mean(bin_1), np.mean(bin_8)/np.mean(bin_1), np.mean(bin_9)/np.mean(bin_1), np.mean(bin_10)/np.mean(bin_1), np.mean(bin_11)/np.mean(bin_1), np.mean(bin_12)/np.mean(bin_1), np.mean(bin_13)/np.mean(bin_1), np.mean(bin_14)/np.mean(bin_1), np.mean(bin_15)/np.mean(bin_1), np.mean(bin_16)/np.mean(bin_1), np.mean(bin_17)/np.mean(bin_1), np.mean(bin_18)/np.mean(bin_1), np.mean(bin_19)/np.mean(bin_1), np.mean(bin_20)/np.mean(bin_1)] for element in frequencies: if element == 0.0: frequency_data.append(0.0) else: frequency_data.append(np.log(element)) #print np.log(element) #if (mean(bin_1)) == 0.0: # print "MEAN OF BIN 1 is ZERO!!!!" #print frequency_data #frequency_data = [mean(bin_1), mean(bin_2), mean(bin_3), mean(bin_4), mean(bin_5)] #print "Number of residues in bin: " + str(count) return frequency_data
protein_file.close() header = natural_protein_data.pop(0) for line in natural_protein_data: data = re.split("\t", line) natural_data.append(data) for data in natural_data: pdb_names.append(data[0]) chain_names.append(data[1]) natural_mean_RSA_values.append(data[2]) natural_mean_entropy_values.append(data[3]) natural_cor_entropy_RSA_values.append(data[4]) natural_mean_split_KL_values.append(data[5]) natural_mean_RSA_values_array = analysis_functions.make_array(natural_mean_RSA_values) natural_mean_entropy_values_array = analysis_functions.make_array(natural_mean_entropy_values) natural_cor_entropy_RSA_values_array = analysis_functions.make_array(natural_cor_entropy_RSA_values) natural_mean_split_KL_values_array = analysis_functions.make_array(natural_mean_split_KL_values) protein_file_name = "graph_mean_data_0.0_noah.csv" [designed_mean_RSA_values_00, designed_mean_entropy_values_00, designed_cor_entropy_RSA_values_00, designed_mean_KL_values_00] = analysis_functions.get_mean_designed_data(protein_file_name) designed_mean_RSA_values_array_00 = array(designed_mean_RSA_values_00) designed_mean_entropy_values_array_00 = array(designed_mean_entropy_values_00) designed_cor_entropy_RSA_values_array_00 = array(designed_cor_entropy_RSA_values_00) designed_mean_KL_values_array_00 = array(designed_mean_KL_values_00) protein_file_name = "graph_mean_data_0.3_noah.csv" [designed_mean_RSA_values_03, designed_mean_entropy_values_03, designed_cor_entropy_RSA_values_03, designed_mean_KL_values_03] = analysis_functions.get_mean_designed_data(protein_file_name)
mean_KL_temp_ordered_file = open("graph_mean_KL_buried_temp_data_ordered.csv", "r") mean_KL_temp_ordered_data = mean_KL_temp_ordered_file.readlines() mean_KL_temp_ordered_file.close() ordered_header = mean_KL_temp_ordered_data.pop(0) mean_entropy_temp_file = open("graph_mean_entropy_buried_temp_data.csv", "r") mean_entropy_temp_data = mean_entropy_temp_file.readlines() mean_entropy_temp_file.close() header = mean_entropy_temp_data.pop(0) all_temp_data = [] all_temp_mean_KL_data_array = [] for line in mean_KL_temp_data: data = re.split("\t", line) data.pop(0) data_array = analysis_functions.make_array(data) all_temp_data.append(data_array) mean_KL_temp_values_array = analysis_functions.make_array(data) all_temp_mean_KL_data_array = array(all_temp_data) all_temp_ordered_data = [] all_temp_ordered_mean_KL_data_array = [] for line in mean_KL_temp_ordered_data: data = re.split("\t", line) data.pop(0) data_array = analysis_functions.make_array(data) all_temp_ordered_data.append(data_array) mean_KL_ordered_temp_values_array = analysis_functions.make_array(data) all_temp_ordered_mean_KL_data_array = array(all_temp_ordered_data) all_temp_data = []
natural_proteins = file #Open the files with results designed_proteins_00 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.0) + ".dat" designed_proteins_01 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.1) + ".dat" designed_proteins_03 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.3) + ".dat" designed_proteins_06 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.6) + ".dat" designed_proteins_09 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.9) + ".dat" designed_proteins_12 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(1.2) + ".dat" designed_proteins_003 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.03) + ".dat" split_natural_1 = "align_natural_sample1_data_array_" + pdb_id + "_" + chain_id + ".dat" split_natural_2 = "align_natural_sample2_data_array_" + pdb_id + "_" + chain_id + ".dat" #Calculates all of the data for comparison (ex. entropy) natural_distribution = analysis_functions.get_AA_distribution(natural_proteins) natural_entropy = analysis_functions.get_native_entropy(natural_proteins) natural_entropy_array = analysis_functions.make_array(natural_entropy) natural_RSA = analysis_functions.get_RSA_Values(natural_proteins) natural_RSA_array = analysis_functions.make_array(natural_RSA) natural_mean_RSA_values.append(mean(natural_RSA_array)) natural_mean_entropy_values.append(mean(natural_entropy_array)) designed_distribution_00 = analysis_functions.get_AA_distribution(designed_proteins_00) designed_entropy_00 = analysis_functions.get_native_entropy(designed_proteins_00) designed_entropy_array_00 = analysis_functions.make_array(designed_entropy_00) designed_RSA_00 = analysis_functions.get_RSA_Values(designed_proteins_00) designed_RSA_array_00 = analysis_functions.make_array(designed_RSA_00) designed_mean_RSA_values_00.append(mean(designed_RSA_array_00)) designed_mean_entropy_values_00.append(mean(designed_entropy_array_00))
protein_file = open("graph_mean_data_natural.csv", "r") natural_protein_data = protein_file.readlines() protein_file.close() #print natural_protein_data header = natural_protein_data.pop(0) for line in natural_protein_data: data = re.split("\t", line) natural_data.append(data) for data in natural_data: pdb_names.append(data[0]) chain_names.append(data[1]) natural_mean_entropy_values.append(data[3]) #natural_mean_RSA_values_array = analysis_functions.make_array(natural_mean_RSA_values) natural_mean_entropy_values_array = analysis_functions.make_array(natural_mean_entropy_values) #natural_cor_entropy_RSA_values_array = analysis_functions.make_array(natural_cor_entropy_RSA_values) #natural_mean_split_KL_values_array = analysis_functions.make_array(natural_mean_split_KL_values) protein_file_name = "graph_mean_data_0.0.csv" [designed_mean_RSA_values_00, designed_mean_entropy_values_00, designed_cor_entropy_RSA_values_00, designed_mean_KL_values_00] = analysis_functions.get_mean_designed_data(protein_file_name) #designed_mean_RSA_values_array_00 = array(designed_mean_RSA_values_00) designed_mean_entropy_values_array_00 = array(designed_mean_entropy_values_00) #designed_cor_entropy_RSA_values_array_00 = array(designed_cor_entropy_RSA_values_00) #designed_mean_KL_values_array_00 = array(designed_mean_KL_values_00) protein_file_name = "graph_mean_data_0.03.csv" [designed_mean_RSA_values_003, designed_mean_entropy_values_003, designed_cor_entropy_RSA_values_003, designed_mean_KL_values_003] = analysis_functions.get_mean_designed_data(protein_file_name) #print natural_mean_entropy_values #designed_mean_RSA_values_array_003 = array(designed_mean_RSA_values_003)