Beam transfer function and stability diagram in the Large Hadron Collider