Selective inference and learning mixed graphical models