Skip to content
Felix edited this page Jan 25, 2016 · 11 revisions

Zygosity Test

When an allele or residual was associated (p < 0.05) with the disease, three tests are performed here to identify whether a homozygote or heterozygote condition differentiates susceptibility to the disease.

case hom absent
control hom absent
case het absent
control het absent
case hom het
control hom het

1 Options

--file input0.txt      [Mandatory]
--zygosity              [Mandatory]
--test                  [Default]
--level                 [Default]
--out output.txt        [Default]
--print                 [Optimal]
--consensus             [Optimal, for residual level only]
--digit                 [Default, for allele level only]
--freq                  [Default, for allele level only]               

1.1 Level to test (--level)

Two levels --level residue and --level allele for amino acid and allele test, respectively. Default is --level residue.

1.2 Test to be used (--test)

Only --test fisher and --test chisq can be used here. Default is --test fisher.

1.3 Digits resolution (--digit)

Test of association using two digits, four digits or six digits. When two was used, alleles such as A*02:01 and A*02:06 will be combined as A*02. Default value is 4.

1.4 Minimal allele/allele group frequency (--freq)

A value between 0 and 1. Only alleles/allele groups have frequency higher than this threshold will be included in association analysis. Default value is 0.

1.5 Output file name (--out)

Default value is output.txt.

1.6 Print output to screen (--print)

Specify --print will print all results to screen (still write results to the output file).

1.7 Consensus sequence (--consensus)

When low resolution HLA typing was used in the input file, the program takes the consensus string of all possible high-resolution HLA typings, marking polymorphic amino acid positions as unknown.

2 Examples

2.1 Residue level

python PyHLA.py --file input0.txt --zygosity --consensus

By default, Fisher's exact test was used. Each ID contains three parts: gene, position and residue. Hom_P, Het_P and Zyg_P is the p-value for testing homozygosity association, herterozygosity association and zygosity association, respectively. Hom_OR, Het_OR and Zyg_OR is odds ratio for testing homozygosity association, herterozygosity association and zygosity association, respectively. OR is the odds ratio calculated with Haldane's correction of Woolf's method.

ID                         Hom_P       Het_P       Zyg_P  Hom_OR  Het_OR  Zyg_OR
A_57_P                    1.0000      1.0000      0.0131  1.3833  0.0909 15.2161
A_57_R                    1.0000      1.0000      0.0131  0.0909  1.3833  0.0657
B_45_T                    0.0428      0.1309      0.0078  1.9192  0.8610  2.2291
B_62_G                    0.4933      0.0598      0.3149  1.8058  0.7937  2.2750
B_65_R                    0.4933      0.0598      0.3149  1.8058  0.7937  2.2750
B_66_N                    0.4933      0.0598      0.3149  1.8058  0.7937  2.2750
B_67_M                    0.4933      0.0598      0.3149  1.8058  0.7937  2.2750
B_67_Y                    0.2916      0.0191      0.9075  1.3092  1.2547  1.0434
B_70_Q                    0.2916      0.0191      0.9075  1.3092  1.2547  1.0434
B_70_S                    0.4933      0.0598      0.3149  1.8058  0.7937  2.2750
B_74_D                    0.3947      0.0229      0.8511  1.1900  1.2407  0.9591
B_77_S                    0.1520      0.1292      0.0149  0.8678  1.2379  0.7011
B_80_I                    0.0889      0.0302      0.0356  2.2191  0.7994  2.7760
B_80_N                    0.4483      0.0712      0.0240  0.9223  1.2692  0.7267
B_82_R                    0.4483      0.0712      0.0240  0.9223  1.2692  0.7267
B_83_G                    0.4483      0.0712      0.0240  0.9223  1.2692  0.7267
B_152_V                   0.0156      0.0037      0.3312  1.2808  1.4701  0.8712
C_1_G                     1.0000      0.0464      1.0000  4.3333  5.9962  0.7227
C_165_E                   1.0000      0.0464      1.0000  4.3333  5.9962  0.7227
DQA1_25_Y                 0.6999      0.0247      0.0360  0.9623  0.6726  1.4308
DQB1_14_M                 0.1584      0.0020      0.0096  0.8634  0.4410  1.9576
DQB1_53_L                 0.4933      0.0354      0.1100  0.9339  0.7434  1.2563
DQB1_84_Q                 0.4933      0.0354      0.1100  0.9339  0.7434  1.2563
DQB1_85_L                 0.4933      0.0354      0.1100  0.9339  0.7434  1.2563
DQB1_86_E                 0.4933      0.0354      0.1100  0.9339  0.7434  1.2563
DQB1_87_L                 0.4933      0.0354      0.1100  0.9339  0.7434  1.2563
DQB1_89_T                 0.4933      0.0354      0.1100  0.9339  0.7434  1.2563
DQB1_90_T                 0.4933      0.0354      0.1100  0.9339  0.7434  1.2563
DQB1_116_I                1.0000      0.0117      1.0000  5.0000  6.9270  0.7218
DQB1_125_S                1.0000      0.0117      1.0000  5.0000  6.9270  0.7218
DQB1_126_H                1.0000      0.0117      1.0000  5.0000  6.9270  0.7218
DQB1_133_Q                1.0000      0.0117      1.0000  5.0000  6.9270  0.7218
DQB1_135_D                1.0000      0.0327      1.0000  2.0769  2.8857  0.7197
DRB1_11_A                 1.0000      0.0334      1.0000  0.3623  0.4906  0.7386
DRB1_13_C                 1.0000      0.0181      1.0000  0.2308  0.3136  0.7358
DRB1_73_A                 1.0000      0.0391      0.0421  0.9951  0.4925  2.0206

2.2 Allele level

python PyHLA.py --file input0.txt --zygosity --level allele --freq 0.05

By default, Fisher's exact test and 4 digit allele was used.

ID                         Hom_P       Het_P       Zyg_P  Hom_OR  Het_OR  Zyg_OR
B*58:01                   0.4925      0.0830      0.3151  1.8212  0.8034  2.2669
DQA1*02:01                0.1676      0.3188      0.0602  0.5688  1.1873  0.4791

Home Previous Next