Hi,
I am new in Python and I have a list of PDB files in a text file appearing like this:
3O8BA 2WHXA 3Q3YA 1D4M1 4F49A 1JQ6A 2FYQA 3W95A 2FMBA 2BBVA 4M0WA 1AT3A 2CXVA 2WV4A 4EKFA 2SNWA 4GUAA 1JEW2 3MMGA 4IZKA
I would like to create a new file with the PDB files ordered by PDBID, something like this 1AT3A 1D4M1 1JEW2 1JQ6A...
I had started reading the text in the file and using the split function in order to create a temporary list of PDBs to be ordered..but then I got stuck on that and I do not how to order them and proceed.
Any suggestion would be really appreciated.
Thank you in advance,
Silvia
You mean you need to sort a row or a column?
Yes in row. I mean that I want to re-write the file with the PDBID ordered one after the other, sorted by crescent order of the first number of the PDBID and by alphabet order of the letter following the number in case the number is the same ..I mean that I want something like this:1AT3A 1D4M1 2BBVA 2CXVA.
I hope that this is clearer
Silvia