This study used high-throughput T-cell receptor sequencing to analyze samples from 640 subjects, 287 with cytomegalovirus (CMV) infection and 353 without. They identified 142 TCRs significantly associated with CMV infection. A classifier trained on these TCRs predicted CMV status with a diagnostic odds ratio of 66. Additionally, 57 of the CMV-associated TCRs were also associated with specific HLA alleles. Cross-validation showed high accuracy for predicting HLA-A alleles based on their associated TCRs. This demonstrates immunosequencing can detect pathogen-specific T-cell responses and HLA associations for diagnostic applications.