added do_analysis and do_plot_analysis and get_spp