Hey guys,
So I have a file contains PDB ID and SEG signal regions. which looks like this:
1JCE 339 340 341 342 343 344
1RQE 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539
1VRA 7 8 9 10 11 12 186 187 188 189 190 191 192 193 194 195 196 197 198 199
2H17 3 4 5 6 7 8 9 10 11 12
2WBY 2 3 4 5 6 7 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
So I would like to know how to sort the file so that PDBID appears in order. in this case they are in order. So I would like the order to be like first compare the first charter of the PDBID and then second and then third and then forth and form an order
How to I do that with python? I've tried to use sorted. But I'm still quit confused.
Thank you so much! Since I'm using mac and sort in terminal really helped!