Stochastic transitions and jamming in granular pipe flow