The Target Selection Pipeline for the Dark Energy Spectroscopic Instrument