fixed write functions to include genes and variants