File parsing and writing code for Ensembl