Man who allegedly threatened deputy in custody