Collective motion of run-and-tumble repulsive and attractive particles in one-dimensional systems.