Aglaé TABOT

Merge branch 'stage_aglae' of ssh://forge.ibisc.univ-evry.fr:6622/lbecquey/RNANet into stage_aglae


Former-commit-id: beff1fea
...@@ -1927,8 +1927,8 @@ def measure_hrna_basepairs_chain(chain, df, thr_idx): ...@@ -1927,8 +1927,8 @@ def measure_hrna_basepairs_chain(chain, df, thr_idx):
1927 1927
1928 resnum=int(resnum) 1928 resnum=int(resnum)
1929 try : 1929 try :
1930 - d=basepair_apex_distance(chain[(' ',resseq, icode_res)], chain[(' ', resnum, icode_pair)]) #calculation of the distance between the tips of the paired nucleotides 1930 + d = basepair_apex_distance(chain[(' ',resseq, icode_res)], chain[(' ', resnum, icode_pair)]) # calculation of the distance between the tips of the paired nucleotides
1931 - angle=basepair_flat_angle(chain[(' ', resseq, icode_res)], chain[(' ', resnum, icode_pair)]) 1931 + angle = basepair_flat_angle(chain[(' ', resseq, icode_res)], chain[(' ', resnum, icode_pair)])
1932 if d != 0.0: 1932 if d != 0.0:
1933 liste_dist.append([chain, type_LW, resseq, resnum, d, angle[0], angle[1], angle[2], angle[3]]) 1933 liste_dist.append([chain, type_LW, resseq, resnum, d, angle[0], angle[1], angle[2], angle[3]])
1934 except : 1934 except :
...@@ -1952,8 +1952,8 @@ def measure_hrna_basepairs_chain(chain, df, thr_idx): ...@@ -1952,8 +1952,8 @@ def measure_hrna_basepairs_chain(chain, df, thr_idx):
1952 resnum=resnum[:l-1] 1952 resnum=resnum[:l-1]
1953 resnum=int(resnum) 1953 resnum=int(resnum)
1954 try : 1954 try :
1955 - d=basepair_apex_distance(chain[(' ', resseq, icode_res)], chain[(' ', resnum, icode_pair)]) 1955 + d = basepair_apex_distance(chain[(' ', resseq, icode_res)], chain[(' ', resnum, icode_pair)])
1956 - angle=basepair_flat_angle(chain[(' ', resseq, icode_res)], chain[(' ', resnum, icode_pair)]) 1956 + angle = basepair_flat_angle(chain[(' ', resseq, icode_res)], chain[(' ', resnum, icode_pair)])
1957 if d != 0.0: 1957 if d != 0.0:
1958 liste_dist.append([chain, type_LW[j], resseq, resnum, d, angle[0], angle[1], angle[2], angle[3]]) 1958 liste_dist.append([chain, type_LW[j], resseq, resnum, d, angle[0], angle[1], angle[2], angle[3]])
1959 except: 1959 except:
...@@ -2043,7 +2043,7 @@ def GMM_histo(data_ori, name_data, toric=False, hist=True, couleur=None, save=Tr ...@@ -2043,7 +2043,7 @@ def GMM_histo(data_ori, name_data, toric=False, hist=True, couleur=None, save=Tr
2043 else: 2043 else:
2044 D = obs.ravel() 2044 D = obs.ravel()
2045 xmin = D.min() 2045 xmin = D.min()
2046 - xmax = D.max() 2046 + xmax = min(10.0, D.max())
2047 x = np.linspace(xmin,xmax,1000) 2047 x = np.linspace(xmin,xmax,1000)
2048 colors=['red', 'blue', 'gold', 'cyan', 'magenta', 'white', 'black', 'green'] 2048 colors=['red', 'blue', 'gold', 'cyan', 'magenta', 'white', 'black', 'green']
2049 2049
...@@ -2366,8 +2366,8 @@ def gmm_wadley(): ...@@ -2366,8 +2366,8 @@ def gmm_wadley():
2366 p_c4p = list(df["C4'-P"][~ np.isnan(df["C4'-P"])]) 2366 p_c4p = list(df["C4'-P"][~ np.isnan(df["C4'-P"])])
2367 c4p_p = list(df["P-C4'"][~ np.isnan(df["P-C4'"])]) 2367 c4p_p = list(df["P-C4'"][~ np.isnan(df["P-C4'"])])
2368 2368
2369 - os.makedirs(runDir + "/results/figures/Pyle/distances/", exist_ok=True) 2369 + os.makedirs(runDir + "/results/figures/GMM/Pyle/distances/", exist_ok=True)
2370 - os.chdir(runDir + "/results/figures/Pyle/distances/") 2370 + os.chdir(runDir + "/results/figures/GMM/Pyle/distances/")
2371 2371
2372 GMM_histo(p_c1p, "P-C1'") 2372 GMM_histo(p_c1p, "P-C1'")
2373 GMM_histo(c1p_p, "C1'-P") 2373 GMM_histo(c1p_p, "C1'-P")
...@@ -2390,8 +2390,8 @@ def gmm_wadley(): ...@@ -2390,8 +2390,8 @@ def gmm_wadley():
2390 c1p_psuiv_c1psuiv = list(df["C1'-P°-C1'°"][~ np.isnan(df["C1'-P°-C1'°"])]) 2390 c1p_psuiv_c1psuiv = list(df["C1'-P°-C1'°"][~ np.isnan(df["C1'-P°-C1'°"])])
2391 2391
2392 2392
2393 - os.makedirs(runDir + "/results/figures/Pyle/angles/", exist_ok=True) 2393 + os.makedirs(runDir + "/results/figures/GMM/Pyle/angles/", exist_ok=True)
2394 - os.chdir(runDir + "/results/figures/Pyle/angles/") 2394 + os.chdir(runDir + "/results/figures/GMM/Pyle/angles/")
2395 2395
2396 GMM_histo(p_c1p_psuiv, "P-C1'-P°", toric=True) 2396 GMM_histo(p_c1p_psuiv, "P-C1'-P°", toric=True)
2397 GMM_histo(c1p_psuiv_c1psuiv, "C1'-P°-C1'°", toric=True) 2397 GMM_histo(c1p_psuiv_c1psuiv, "C1'-P°-C1'°", toric=True)
...@@ -2427,8 +2427,8 @@ def gmm_wadley(): ...@@ -2427,8 +2427,8 @@ def gmm_wadley():
2427 theta_base=[i for i in theta_base if i != None] 2427 theta_base=[i for i in theta_base if i != None]
2428 2428
2429 2429
2430 - os.makedirs(runDir + "/results/figures/Pyle/pseudotorsions/", exist_ok=True) 2430 + os.makedirs(runDir + "/results/figures/GMM/Pyle/pseudotorsions/", exist_ok=True)
2431 - os.chdir(runDir + "/results/figures/Pyle/pseudotorsions/") 2431 + os.chdir(runDir + "/results/figures/GMM/Pyle/pseudotorsions/")
2432 2432
2433 GMM_histo(eta, "Eta", toric=True) 2433 GMM_histo(eta, "Eta", toric=True)
2434 GMM_histo(theta, "Theta", toric=True) 2434 GMM_histo(theta, "Theta", toric=True)
...@@ -2507,8 +2507,8 @@ def gmm_hrna(): ...@@ -2507,8 +2507,8 @@ def gmm_hrna():
2507 c4p_c1p_b1 = list(df["C4'-C1'-B1"][~ np.isnan(df["C4'-C1'-B1"])]) 2507 c4p_c1p_b1 = list(df["C4'-C1'-B1"][~ np.isnan(df["C4'-C1'-B1"])])
2508 c1p_b1_b2 = list(df["C1'-B1-B2"][~ np.isnan(df["C1'-B1-B2"])]) 2508 c1p_b1_b2 = list(df["C1'-B1-B2"][~ np.isnan(df["C1'-B1-B2"])])
2509 2509
2510 - os.makedirs(runDir + "/results/figures/GMM/HiRE-RNA/distances/", exist_ok=True) 2510 + os.makedirs(runDir + "/results/figures/GMM/HiRE-RNA/angles/", exist_ok=True)
2511 - os.chdir(runDir + "/results/figures/GMM/HiRE-RNA/distances/") 2511 + os.chdir(runDir + "/results/figures/GMM/HiRE-RNA/angles/")
2512 2512
2513 GMM_histo(lastc4p_p_o5p, "C4'-P-O5'", toric=True) 2513 GMM_histo(lastc4p_p_o5p, "C4'-P-O5'", toric=True)
2514 GMM_histo(lastc1p_lastc4p_p, "C1'-C4'-P", toric=True) 2514 GMM_histo(lastc1p_lastc4p_p, "C1'-C4'-P", toric=True)
...@@ -2908,12 +2908,20 @@ if __name__ == "__main__": ...@@ -2908,12 +2908,20 @@ if __name__ == "__main__":
2908 DO_WADLEY_ANALYSIS = True 2908 DO_WADLEY_ANALYSIS = True
2909 os.makedirs(runDir+"/results/geometry/Pyle/distances/", exist_ok=True) 2909 os.makedirs(runDir+"/results/geometry/Pyle/distances/", exist_ok=True)
2910 os.makedirs(runDir+"/results/geometry/Pyle/angles/", exist_ok=True) 2910 os.makedirs(runDir+"/results/geometry/Pyle/angles/", exist_ok=True)
2911 + os.makedirs(runDir+"/results/geometry/Pyle/pseudotorsions/", exist_ok=True)
2912 + os.makedirs(runDir+"/results/figures/GMM/Pyle/distances/", exist_ok=True)
2913 + os.makedirs(runDir+"/results/figures/GMM/Pyle/angles/", exist_ok=True)
2914 + os.makedirs(runDir+"/results/figures/GMM/Pyle/pseudotorsions/", exist_ok=True)
2911 elif opt=='--hire-rna': 2915 elif opt=='--hire-rna':
2912 DO_HIRE_RNA_MEASURES = True 2916 DO_HIRE_RNA_MEASURES = True
2913 os.makedirs(runDir + "/results/geometry/HiRE-RNA/distances/", exist_ok=True) 2917 os.makedirs(runDir + "/results/geometry/HiRE-RNA/distances/", exist_ok=True)
2914 os.makedirs(runDir + "/results/geometry/HiRE-RNA/angles/", exist_ok=True) 2918 os.makedirs(runDir + "/results/geometry/HiRE-RNA/angles/", exist_ok=True)
2915 os.makedirs(runDir + "/results/geometry/HiRE-RNA/torsions/", exist_ok=True) 2919 os.makedirs(runDir + "/results/geometry/HiRE-RNA/torsions/", exist_ok=True)
2916 os.makedirs(runDir + "/results/geometry/HiRE-RNA/basepairs/", exist_ok=True) 2920 os.makedirs(runDir + "/results/geometry/HiRE-RNA/basepairs/", exist_ok=True)
2921 + os.makedirs(runDir + "/results/figures/GMM/HiRE-RNA/distances/", exist_ok=True)
2922 + os.makedirs(runDir + "/results/figures/GMM/HiRE-RNA/angles/", exist_ok=True)
2923 + os.makedirs(runDir + "/results/figures/GMM/HiRE-RNA/torsions/", exist_ok=True)
2924 + os.makedirs(runDir + "/results/figures/GMM/HiRE-RNA/basepairs/", exist_ok=True)
2917 2925
2918 2926
2919 # Load mappings. famlist will contain only families with structures at this resolution threshold. 2927 # Load mappings. famlist will contain only families with structures at this resolution threshold.
......