Spectral graph analysis of modularity and assortativity