New computational methods for automated cross-peak assignment of solution- and solid-state NMR spectra of proteins