You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Tripos MOL2 format is a common format for working with small molecules. In this tutorial, we will go over some examples that illustrate how we can use Biopandas' MOL2 DataFrames to analyze molecules conveniently.
@@ -569,7 +597,7 @@ A list of all the allowed atom types that can be found in Tripos MOL2 files is p
<biopandas.pdb.pandas_pdb.PandasPdb at 0x106795898>
76
+
<biopandas.pdb.pandas_pdb.PandasPdb at 0x10462bf28>
49
77
50
78
51
79
@@ -207,7 +235,7 @@ ppdb.df.keys()
207
235
208
236
209
237
210
-
dict_keys(['HETATM', 'ANISOU', 'ATOM', 'OTHERS'])
238
+
dict_keys(['ATOM', 'HETATM', 'ANISOU', 'OTHERS'])
211
239
212
240
213
241
@@ -1142,81 +1170,100 @@ Residues in the `residue_name` field can be converted into 1-letter amino acid c
1142
1170
1143
1171
```python
1144
1172
from biopandas.pdb import PandasPdb
1145
-
ppdb = PandasPdb().read_pdb('./data/3eiy.pdb.gz')
1146
-
ppdb.amino3to1()
1147
-
# By default, `amino3to1` returns a pandas Series object,
1148
-
# and to convert it into a Python list, you can wrap it in list
1149
-
# constructor, e.g.,
1150
-
# `list(ppdb.amino3to1())`
1173
+
ppdb = PandasPdb().fetch_pdb('5mtn')
1174
+
sequence = ppdb.amino3to1()
1175
+
sequence.tail()
1151
1176
```
1152
1177
1153
1178
1154
1179
1155
1180
1156
-
0 S
1157
-
6 F
1158
-
17 S
1159
-
23 N
1160
-
31 V
1161
-
38 P
1162
-
45 A
1163
-
50 G
1164
-
54 K
1165
-
63 D
1166
-
71 L
1167
-
79 P
1168
-
86 Q
1169
-
95 D
1170
-
103 F
1171
-
114 N
1172
-
122 V
1173
-
129 I
1174
-
137 I
1175
-
145 E
1176
-
154 I
1177
-
162 P
1178
-
169 A
1179
-
174 Q
1180
-
183 S
1181
-
189 E
1182
-
198 P
1183
-
205 V
1184
-
212 K
1185
-
221 Y
1186
-
..
1187
-
1100 E
1188
-
1109 K
1189
-
1114 G
1190
-
1118 K
1191
-
1127 W
1192
-
1141 V
1193
-
1148 K
1194
-
1153 V
1195
-
1160 E
1196
-
1169 G
1197
-
1173 W
1198
-
1187 D
1199
-
1195 G
1200
-
1199 I
1201
-
1207 D
1202
-
1215 A
1203
-
1220 A
1204
-
1225 H
1205
-
1235 K
1206
-
1244 E
1207
-
1253 I
1208
-
1261 T
1209
-
1268 D
1210
-
1276 G
1211
-
1280 V
1212
-
1287 A
1213
-
1292 N
1214
-
1300 F
1215
-
1311 K
1216
-
1320 K
1217
-
Name: residue_name, dtype: object
1181
+
<div>
1182
+
<tableborder="1"class="dataframe">
1183
+
<thead>
1184
+
<tr style="text-align: right;">
1185
+
<th></th>
1186
+
<th>chain_id</th>
1187
+
<th>residue_name</th>
1188
+
</tr>
1189
+
</thead>
1190
+
<tbody>
1191
+
<tr>
1192
+
<th>1378</th>
1193
+
<td>B</td>
1194
+
<td>I</td>
1195
+
</tr>
1196
+
<tr>
1197
+
<th>1386</th>
1198
+
<td>B</td>
1199
+
<td>N</td>
1200
+
</tr>
1201
+
<tr>
1202
+
<th>1394</th>
1203
+
<td>B</td>
1204
+
<td>Y</td>
1205
+
</tr>
1206
+
<tr>
1207
+
<th>1406</th>
1208
+
<td>B</td>
1209
+
<td>R</td>
1210
+
</tr>
1211
+
<tr>
1212
+
<th>1417</th>
1213
+
<td>B</td>
1214
+
<td>T</td>
1215
+
</tr>
1216
+
</tbody>
1217
+
</table>
1218
+
</div>
1219
+
1220
+
1221
+
1222
+
As shown above, the `amino3to1` method returns a `DataFrame` containing the `chain_id` and `residue_name` of the translated 1-letter amino acids. If you like to work with the sequence as a Python list of string characters, you could do the following:
0 commit comments