Function returns an ndarray of ratios calculated by dividing the summed neighborhood variances by the global variance
    :param traj_exp: ndarray representing gene expression
    :param adj_mat: ndarray representing the calculated adjacency matrix
    :return val: ndarray representing the ratio of summed neighborhood variances by the global variance

def selection_val(traj_exp,adj_mat):
    '''
    Function returns an ndarray of ratios calculated by dividing the summed neighborhood variances by the global variance
    :param traj_exp: ndarray representing gene expression
    :param adj_mat: ndarray representing the calculated adjacency matrix
    :return val: ndarray representing the ratio of summed neighborhood variances by the global variance 
    '''
    r = traj_exp.shape[0] #keep track of the rows
    c = traj_exp.shape[1] #keep track of the columns
    k = np.sum(adj_mat[0]>0,dtype=float) #k calculation based off of adjacency matrix
    dev=np.zeros_like(traj_exp,dtype=float) #initialize matrix to store dev_ij values
    val=np.zeros(traj_exp.shape[1],dtype=float) #initialize val matrix to store variance values
    print ("Start global variance calculation")
    ivar=np.var(traj_exp,axis=0,ddof=1) #calculate variance in traj_exp, this is the global variance matrix
    print ("Finished global variance calculation")
    print ("Start neighborhood variance calculation") 
    print ("Completion:")
    for i in range(0,r): #start of dev_ij calculation loop
        print (((i/r)*100),end='\r') #progress meter
        for j in range(0,c):
            dev[i,j] = dev_ij(i,j,traj_exp,adj_mat) #this is the part that takes the longest
    print ("Finished neighborhood variance calculation")
    rowsumdev=np.sum(dev,axis=0) #axis-wise sum of deviations calculated between i and j
    print ("Start global to neighborhood variance ratio calculation")
    for i in range(0,c): #set values to variance/deviation calculation in loop
        if rowsumdev[i]!=0: #pretty much just throw out anything that has devsum=0, when considering deviation sums of 0, we could get a divide by zero error
            val[i] = ((ivar[i])/(rowsumdev[i]/(r*k-1))) #variance calculation done here and written into val matrix
    print ("Finished global to neighborhood variance ratio calculation")
    return val