ACRMGroup / bioplib

The bioplib library
http://www.bioinf.org.uk/software/bioplib/
Other
12 stars 8 forks source link

Update blDoWritePDBAsPDBML() #13

Open CraigPorter opened 8 years ago

CraigPorter commented 8 years ago

The blDoWritePDBAsPDBML() function outputs a WHOLEPDB structure in pdbml format. As the number of record types included in the output has grown so has the size of the function. Currently, the function has ~930 lines.

Issue 1: Refactoring code.

The function should be refactored into a series of subroutines called by blDoWritePDBAsPDBML() with each subroutine adding a record type (eg CONECT records) to the document.

At this point, all unit tests in the src/TEST directory should pass. (The code has changed but the output hasn't.)

Issue 2: Ordering record types.

The order of the records output by blDoWritePDBAsPDBML() should match the order of the records in pdbml-format files from the Protein Database.

The correct order of records is: ATOM, date, COMPND, SOURCE, pdb id, SEQRES, MODRES, TITLE and CONECT.

When the order of the records is changed, some unit tests in the src/TEST directory will fail and the example pdbml-format output files will have to be edited.