Data reduction pipeline for e-MERLIN