Merged patch from Stephen Clayton <sc13@sanger.ac.uk>

Source: https://github.com/wtsi-hgi/DNG_dev/pull/1.patch