AI analysis of how bacteria attack could help predict infection outcomes