I have a case-control dataset and I want to perform logistic regression and conditional logistic regression based on HLA multi-allelic data, using r. I want to find the effect on specific alleles on a trait. How do I do this what is the format. Most examples are based on SNP biallelic data.
For instance at HLA-A I may have up to 30 unique alleles, at HLA-B it could be 50. Should I recode all the alleles and perform logistic regression on genotype pairs?
Find a way to produce a data frame containing the counts of each alleles that you see, and the case-controls status. E.g. (fake data)

 

    > df
    
     DX DRB1.0401 DRB1.0404 DRB1.0405 DRB1.0408
    1  0         0         0         1         1
    2  0         0         0         0         2
    3  0         0         0         0         2
    4  1         1         0         0         1
    5  1         1         0         0         1
    6  1         0         1         0         1


If you are interested on the effect of a specific allele, then you can do, e.g.

    summary(glm( DX ~ DRB1.0401 , family="binomial", data=df ) )

If you are interested in the effect of your HLA locus as a whole, then you can do, e.g. 


    full<- glm( DX ~ DRB1.0401 + DRB1.0404 + DRB1.0405 + DRB1.0408, 
       family="binomial", data=df ) 
    null<- glm( DX ~ 1 , family="binomial", data=df ) 
    
    anova( null, full , test="Chisq") 

adding covariates to the models if deemed necessary. 




