Systems biological assessment of immunity to infection and vaccination