refactor genomix gage feature code

refactor gage code, remove obscure array, and add hashmap for calculating Nx value and count And refactor the test case @jakebiesinger @JavierJia @anbangx