Spike sorting and functional connectivity analysis using self-organizing maps and granger causality