Browse Source

added beginning of program, md.pdb as toy example and README

Nicolas Zimmermann 4 years ago
parent
commit
88d52b8e8f
4 changed files with 1069180 additions and 30 deletions
  1. 22 0
      README
  2. 0 30
      data/barstar_md_traj.PB.fasta
  3. 1069134 0
      data/md.pdb
  4. 24 0
      src/projet8.py

+ 22 - 0
README View File

@@ -0,0 +1,22 @@
1
+Make sure your current directory is projet_court_nz
2
+
3
+Environment
4
+
5
+1 - Recreate the conda environment with the config_projet.yml file avaible in the src repository 
6
+	$ conda env create -f src/config_projet.yml
7
+2 - Activate the generated environment
8
+	$ conda activate projet-court
9
+
10
+toy-example:
11
+md.pdb contains structural information of 501 conformations of the calf-1 domain
12
+
13
+3 - try the program on md.pdb
14
+	$ python3 src/projet8 data/md.pdb 
15
+
16
+This will generate a md.csv file in the results folder, representing a dataframe of the conformations, each row being a conformation and each column a PB position
17
+
18
+Informations:
19
+
20
+The pdb was obtained from .trr and .gro files available online (http://www.dsimb.inserm.fr/~tmp/DM_Calf-1_WT_production_long1.tar.gz)
21
+pbd was generated using gromacs :
22
+	$ trjconv -f md.trr -s md -o md.pdb

+ 0 - 30
data/barstar_md_traj.PB.fasta View File

@@ -1,30 +0,0 @@
1
->test_data/barstar_md_traj.xtc | frame 0
2
-ZZdddfklpmbfklmmmmmmmmnopafklgoiaklmmmmmmmmpacddddddehklmmmm
3
-moghilmmmmmmmmmmmmnopacddddZZ
4
->test_data/barstar_md_traj.xtc | frame 1
5
-ZZdddfklpcbfklmmmmmmmmnopafkbghiaklmmmmmmmmpccddddddehklmmmm
6
-moghklmmmmmmmmmmmmnopacddddZZ
7
->test_data/barstar_md_traj.xtc | frame 2
8
-ZZdddfklpcbfklmmmmmmmmnopafkbgoiaklmmmmmnopaacddddddehklmmmm
9
-mpghklmmmmmmmmmmmmnopacddddZZ
10
->test_data/barstar_md_traj.xtc | frame 3
11
-ZZdddfklpcbfklmmmmmmmmnopafkbgoiaklmmmmmmmmpccddddddehklmmmm
12
-mbghilmmmmmmmmmmmmnopacddddZZ
13
->test_data/barstar_md_traj.xtc | frame 4
14
-ZZdddfklpcbfklmmmmmmmmnopafkbghiaklmmmmmmmmpccddddddehklmmmm
15
-mcehilmmmmmmmmmmmmnopacddddZZ
16
->test_data/barstar_md_traj.xtc | frame 5
17
-ZZdddfklgcbfklmmmmmmmmnopafkbgoiaklmmmmmmmmpccddddddehklmmmm
18
-mbghklmmmmmmmmmmmmnopacddddZZ
19
->test_data/barstar_md_traj.xtc | frame 6
20
-ZZdddfklpcbfklmmmmmmmmnopafkbghiaklmmmmmmmmpccddddddehklmmmm
21
-mbghklmmmmmmmmmmmmnopacddddZZ
22
->test_data/barstar_md_traj.xtc | frame 7
23
-ZZdddfklpgbfklmmmmmmmmnopafklgoiaklmmmmmmmmpccddddddehkllmmm
24
-mbghklmmmmmmmmmmmmnopacddddZZ
25
->test_data/barstar_md_traj.xtc | frame 8
26
-ZZdddfklpcbfklmmmmmmmmnopafklgoiaklmmmmmmmmpccddddddehklmmmm
27
-npghklmmmmmmmmmmmmnopacddddZZ
28
->test_data/barstar_md_traj.xtc | frame 9
29
-ZZdddfklpcbfklmmmmmmmmnopafkbgoiaklmmmmmmmmmccddddddehkllmmm
30
-mbghklmmmmmmmmmmmmnopacddddZZ

File diff suppressed because it is too large
+ 1069134 - 0
data/md.pdb


+ 24 - 0
src/projet8.py View File

@@ -0,0 +1,24 @@
1
+#!/bin/python3
2
+
3
+import pandas as pd
4
+import pbxplore as pbx
5
+import sys
6
+
7
+if __name__ == "__main__":
8
+    if len(sys.argv) != 2:
9
+        print("Error : usage $ python3 projet8 md.pdb")
10
+        exit()
11
+    
12
+    conformations = [] # list to store PB format chains
13
+
14
+    for chain_name, chain in pbx.chains_from_files([sys.argv[1]]): 
15
+        dihedrals = chain.get_phi_psi_angles() 
16
+        pb_seq = pbx.assign(dihedrals) 
17
+        conformations.append(pb_seq) 
18
+    
19
+    df = pd.DataFrame() # pandas dataframe to store conformations
20
+
21
+    for conf in conformations: 
22
+        df = df.append(pd.Series(list(conf)), ignore_index=True)
23
+
24
+    df.to_csv("results/md.csv", index=False)