Added support to produce wig files and fetch the reference of a region