A lattice computation of proton-decay amplitudes