1. Introduction
2. Basic information
3. Download and general notes
4. Command reference table
5. Basic usage/data formats
6. Data management
7. Summary stats
8. Inclusion thresholds
9. Population stratification
10. IBS/IBD estimation
11. Association
12. Family-based association
13. Permutation procedures
14. LD calculations
15. Multimarker tests
16. Conditional haplotype tests
17. Proxy association
18. Imputation (beta)
19. Dosage data
20. Meta-analysis
21. Annotation
22. LD-based results clumping
23. Gene-based report
24. Epistasis
25. Rare CNVs
26. Common CNPs
27. R-plugins
28. Annotation web-lookup
29. Simulation tools
30. Profile scoring
31. ID helper
32. Resources
33. Flow-chart
34. Miscellaneous
35. FAQ & Hints
36. gPLINK
|
|
Conditional haplotype-based association testing
This page describes PLINK functions that are aimed at dissecting
a haplotypic association. These functions largely include and extend the functionality
offered in the older WHAP software package, which is no longer
supported.
For reference, the main ways of specifying conditional haplotype tests, that modify
the behaviour of main --chap command, are given here; they are also described in more
detail below. Each row here is mutually exclusive, e.g. you would not want to, or be able to,
specify --control and --alt-snp at the same time:
- Test whether SNPs have independent haplotyic effects (--independent-effect SNP{,SNP,SNP})
- Test whether a set of SNPs explain an omnibus association (--control SNP{,SNP,...})
- Test whether a specific set of haplotypes explain an omnibus association (--control HAPLOTYPE{,HAPLOTYPE,...})
- Test specific haplotypes for association (--specific-haplotype HAPLOTYPE)
- Specify alternative and null haplotypic models in terms of sets of SNPs (--alt-snp SNP{,SNP-SNP,...}
and/or --null-snp SNP{,SNP-SNP,...})
- Specify alternative and null haplotypic models in terms of sets of haplotypes (--alt-group HAPLOTYPE{,HAPLOTYPE,...}
and/or --null-group HAPLOTYPE{,HAPLOTYPE,...} )
- Test a one or more simple SNP effects, potentially controlling for
haplotype effects (--test-snp SNP{,SNP-SNP,...})
It is also possible to include one or more continuous or binary
covariates, which can include other SNPs outside of the phased region.
This page contains the following sections:
The value of using --chap over --hap-assoc is that
covariates can be included, and more complex conditional tests can be
specified. The value of using --hap-assoc
(described here) over --chap
is that it is designed to iterate over very many SNPs in a single go,
whereas the --chap test is more designed to focus on one
specific set of SNPs. The --hap-logistic
and --hap-linear commands,
described here, are also designed for
large numbers of tests; they do allow for covariates and permutation,
but not the conditional tests described below.
Basic usage for conditional haplotype-based testing
The --chap command is used in conjunction with
the --hap-snps command to specify a set of SNPs to phase,
form haplotypes and test for association (in samples of unreated
individuals only):
plink --bfile mydata --hap-snps rs1001-rs1005 --chap
which generates a file
plink.chap
The --hap-snps command can take a comma-delimited list of SNPs, including ranges,
e.g. if the MAP file specifies the following SNPs and physical positions:
1 rs1001 0 101200
1 rs1002 0 102030
1 rs1003 0 107394
1 rs1004 0 107499
1 rs1005 0 113990
then the command
--hap-snps rs1001-rs1003,rs1005
includes all SNPs except rs1004, for example. The hyphen/minus symbol specifies all
SNPs within a range (based on sorted physical position).
NOTE No spaces are allowed in this kind of
comma-delimited list. Also, note that currently this will not work if
SNP names have hypen characters in them. In this case, to use a
different delimter for any ranges specified on the command line, add
the "--d" flag (which can be any non-whitespace character except a
comma (although be cautious if using characters with special meanings
on command lines)
--d + --hap-snps SNP-A10001+SNP-A10020
to obtain a range between SNP-A10001 and SNP-A10020.
The default test is an omnibus haplotype test: that is, if there
are H haplotypes, then --chap performs an H-1
df test comparing the alternate (each haplotype having a unqiue effect)
versus the null (no haplotypes having any different effect). In each case,
one haplotype is arbitrarily chosen to be the reference haplotype. The
coefficients must be interpreted with respect to that haplotype, but otherwise
the coding makes no difference.
For binary disease traits, the test is based on a likelihood ratio test.
For continuous traits, the test is based on an F-test comparing the
alternate and null models. For continuous traits, the --chap
command also displays the proportion of variance in the outcome explained
by the regression model (R-squared) as well as an adjusted R-squared (that
takes model complexity into account).
For example, here is a plink.chap output file representing a basic
omnibus test:
+++ PLINK conditional haplotype test results +++
5 SNPs, and 6 common haplotypes ( MHF >= 0.01 ) from 32 possible
CHR BP SNP A1 A2 F
1 101200 rs1001 C A 0.45
1 102030 rs1002 A C 0.2362
1 107394 rs1003 A C 0.4325
1 107499 rs1004 T G 0.2362
1 113990 rs1005 A C 0.4487
Haplogrouping: each {set} allowed a unique effect
Alternate model
{ AAATA } { AACTA } { CCCGA } { ACAGC } { CCCGC } { ACCGC }
Null model
{ AAATA, AACTA, CCCGA, ACAGC, CCCGC, ACCGC }
HAPLO FREQ OR(A) OR(N)
------- ------ ------- -------
AAATA 0.169 (-ref-) (-ref-)
AACTA 0.0673 2.619 |
CCCGA 0.212 0.8942 |
ACAGC 0.264 0.6839 |
CCCGC 0.237 1.025 |
ACCGC 0.0502 1.038 |
------- ------ ------- -------
Model comparison test statistics:
Alternate Null
-2LL : 535.4 554.5
Likelihood ratio test: chi-square = 19.11
df = 5
p = 0.001836
There are several points to note:
- At the top of the output, PLINK lists the SNPs (SNP) involved in the
test, their chromosomal (CHR) and base-pair (BP) positions, their alleles
(A1 and A2) and the minor allele frequency (F).
- It is reported that there are 5 common haplotypes: this filter (default value of 0.01)
can be changed by adding, for example, the --mhf 0.05 command (minimum haplotype
frequency).
- The next section presents the haplogrouping under the null and alternate
models. If two haplotypes are in the same { set }, it means they are treated as
identical in terms of their effect on phenotype (i.e. a single regression coefficient is used
for that group). For the basic omnibus test the haplogrouping will always take this simple
form: under the alternate all haplotypes in their own set, whilst under the null all
haplotypes are in one set. This output is more useful in interpreting some of the other
conditional haplotype tests that are introduced below.
- The next section contains the estimated regression coefficients for each haplotype
under the alternate and null models, as well as the frequency (FREQ) of each
haplotype. For continuous traits, the coefficients are labelled BETA; for disease
traits they are labelled OR and are in fact transformed to be odds ratios, i.e.
exp(beta). The (-ref-) indicates which haplotype has been selected to be the
baseline, reference category. If a haplotype has instead a pipe (vertical bar) |
symbol, it implies that this haplotype is grouped with the one above it (and so it will not
have a regression coefficient of its own). In the case of this simple null model as shown
here, this implies that all haplotypes are equated with AAATA, the reference
haplotype (i.e. there is no effect of any haplotype).
- When the null model is not so straightforward (as in the examples below), the rows are
separated into the null-model haplogroups for clarity. In this case, certain sub-null
model comparisons are also presented, to the right of the table of coefficients: these are
shown and described below.
- The final section presents the overall model statistics: for a linear trait these are the
R-squared (sometimes called the coefficient of determination) and adjusted R-squared, as well
as the F-test. For disease traits, as in this case, only the sample log-likelihood under
each model (-2LL) and the likelihood ratio test are presented. In both cases, the degrees of
freedom is the number of parameters in the alternate model minus the number in the null
model.
The interpretation of this particular analysis would be that overall variation at this
locus appears to influence the trait, with p = 0.001836. Using the commands introduced
below, we can perform various conditional tests to explore this omnibus result.
HINT To obtain confidence intervals on the estimated odds ratios or
regression coefficients, add the flag
--ci 0.95
for example; the output will now be as follows:
HAPLO FREQ OR(A) OR(N)
------- ------ ----------------------- -----------------------
AAATA 0.169 (-ref-) (-ref-)
AACTA 0.0673 2.619 (1.24; 5.54 ) |
CCCGA 0.212 0.8942 (0.57; 1.4 ) |
ACAGC 0.264 0.6839 (0.438; 1.07 ) |
CCCGC 0.237 1.025 (0.657; 1.6 ) |
ACCGC 0.0502 1.038 (0.507; 2.12 ) |
------- ------ ----------------------- -----------------------
Specifying the type of test
If no other commands are given, the --chap test will perform an omnibus haplotypic
association test. Various other options can be used to refine the type of test. In this
section we introduce three commonly used tests; in the section below we introduce a more
general way in which any two (nested) models can be compared.
Testing a specific haplotype
It is possible to specify a particular haplotype to be tested against all others: for example,
CCCGA
./plink --file mydata --hap-snps rs10001-rs10005 --chap --specific-haplotype CCCGA
This creates the following two haplogroupings:
Alternate model
{ AAATA, AACTA, ACAGC, CCCGC, ACCGC } { CCCGA }
Null model
{ AAATA, AACTA, CCCGA, ACAGC, CCCGC, ACCGC }
which hopefully begins to indicate how these groupings should be interpreted in relation to
the tests they imply.
The main body of the output is:
HAPLO FREQ OR(A) OR(N)
------- ------ ------- -------
AAATA 0.169 (-ref-) (-ref-)
AACTA 0.06728 | |
ACAGC 0.2635 | |
CCCGC 0.2375 | |
ACCGC 0.05022 | |
CCCGA 0.2125 0.9153 |
------- ------ ------- -------
which shows that now under the alternate all haplotypes are grouped together except for
CCCGA; versus all other haplotypes, this has an estimated odds ratio of 0.9153.
NOTE Of course, the estimated odds ratio for CCCGA
was different in the first example given above (when it was 0.8942) because the
reference category was different (it was then only AAATA as opposed to
all other SNPs). In other words, remember that the odds ratios are only interpretable
in relation to some specific baseline, reference category.
Finally, we see the model compariston test is non-significant
Likelihood ratio test: chi-square = 0.2653
df = 1
p = 0.6065
The option --each-vs-others will add an extra column to the
output, if there is more than one haplotype-grouping under the alternate
model, which provides p-values for haplotype-specific tests of that
haplotye (or haplotype group) versus all others. For example,
./plink --file mydata --hap-snps rs10001-rs10005 --chap --each-vs-others
which produces output with the new SPEC(A) field
HAPLO FREQ OR(A) SPEC(A) OR(N)
------- ------ ------- --------- -------
AAATA 0.169 (-ref-) 0.537 (-ref-)
AACTA 0.06728 2.619 0.0001791 |
CCCGA 0.2125 0.8942 0.6065 |
ACAGC 0.2635 0.6839 0.003466 |
CCCGC 0.2375 1.025 0.5132 |
ACCGC 0.05022 1.038 0.787 |
------- ------ ------- ------- ---------
which contains p-values for all haplotype-specific tests (i.e. as above,
the haplotype CCCGA has the p-value of 0.6065 as above, i.e.
that haplotype versus all others). The benefit of the
--specific-haplotype command versus --each-vs-others is
that it also produces the odds ratio for that haplotype.
These haplotype specific tests are of course similar to the basic test given
by the --hap-assoc command, e.g.
./plink --file mydata --hap-snps rs10001-rs10005 --hap-assoc
which generates the output file
plink.assoc.hap
which contains the line
LOCUS HAPLOTYPE F_A F_U CHISQ DF P SNPS
WIN1 CCCGA 0.205 0.22 0.2689 1 0.6041 rs1001|rs1002|rs1003|rs1004|rs1005
This command frames the test in a slightly different way and presents different
statistics (i.e. it does not use logistic regression, case and control frequencies are presented
instead of odds ratios, etc) but the p-value is, as expected, very similar (p=0.6041
from --hap-assoc versus p=0.6065 from the --chap test). Note that they
are not expected to be numerically identical however.
Testing whether SNPs have independent effects
It is possible to ask whether one or more SNPs have an effect that is independent
of the other SNPs in the model, framing the question in terms of haplotypes. This conditional
test essentially stratifies by the haplotyic background: for the SNP(s) under scruntiny, we
only compare the alleles/haplotypes that have a similar haplotypic background.
Before proceeding to the conditional haplotype tests, let's first consider the simple,
single SNP effects for the example dataset:
./plink --file mydata --assoc
which generates the file plink.assoc which is as follows:
CHR SNP BP A1 F_A F_U A2 CHISQ P OR
1 rs1001 101200 C 0.4525 0.4475 A 0.0202 0.887 1.02
1 rs1002 102030 A 0.2775 0.195 C 7.544 0.00602 1.586
1 rs1003 107394 A 0.395 0.47 C 4.584 0.03228 0.7362
1 rs1004 107499 T 0.2775 0.195 G 7.544 0.00602 1.586
1 rs1005 113990 A 0.4825 0.415 C 3.644 0.05495 1.314
Here we see that SNPs rs1002 and rs1004 have the strongest associations, although
rs1003 and rs1005 show marginal trends.
Next, to obtain a quick view of the LD in this small region, we can generate the matrix of r-squared (LD)
values (i.e. note: this is using r-squared as a measure of LD, which is distinct from
the coefficient of determination which descibes the fitted regression models).
./plink --file mydata --r2 --ld-window-r2 0
This command, by default, only outputs values for SNPs that have an r-squared greater than 0.2, are
within 1 Mb and 10 SNPs of each other; these can be changed with the options --ld-window-r2,
ld-window-kb and --ld-window respectively; in this case, we requested all SNPs to be reported
with --ld-window-r2. The file
plink.ld
contains the fields
CHR_A SNP_A CHR_B SNP_B R2
1 rs1001 1 rs1002 0.260769
1 rs1001 1 rs1003 0.628703
1 rs1001 1 rs1004 0.260769
1 rs1001 1 rs1005 0.000357147
1 rs1002 1 rs1003 0.0964906
1 rs1002 1 rs1004 1
1 rs1002 1 rs1005 0.398912
1 rs1003 1 rs1004 0.0964906
1 rs1003 1 rs1005 0.00919232
1 rs1004 1 rs1005 0.398912
Here we see that rs1002 and rs1004 are in complete LD, but that there is
also moderate (r-squared above 0.2) LD between many other pairs of SNPs.
Moving then to the conditional tests: using the dataset above, to test for an independent effect
of rs1003, for example (independent of the haplotypic effects formed by the remaining SNPs),
one would issue the command:
./plink --file mydata --hap-snps rs1001-rs1005 --chap --independent-effect rs1003
The haplogroupings implied by this command are
Alternate model
{ AAATA } { AACTA } { CCCGA } { ACAGC } { CCCGC } { ACCGC }
Null model
{ AAATA, AACTA } { CCCGA } { ACAGC, ACCGC } { CCCGC }
The test SNP, rs1003, is the middle SNP in the 5-SNP haplotype (an A/C
SNP). In comparison to the alternate model, we now see that the null is formed by grouping
two pairs of haplotypes; each pair is identical except for rs1003: i.e.
{ AAATA, AACTA }
and
{ ACAGC, ACCGC }
In each case here, the comparison between alternate and null models is to
equate the effects of these haplotypes (i.e. implicitly providing a test for whether
rs1003 has any effect). A haplotype such as CCCGA is effectively left
out of the analysis: although it contains a C allele for rs1003, we
never see the corresponding CCAGA haplotype to perform a stratified analysis.
The main output for this test is shown below:
HAPLO FREQ OR(A) OR(N) SUBNULL P
------- ------ ------- ------- -----------
AAATA 0.169 (-ref-) (-ref-) 0.008016
AACTA 0.06728 2.619 |
CCCGA 0.2125 0.8942 0.6907 n/a
ACAGC 0.2635 0.6839 0.5628 0.2643
ACCGC 0.05022 1.038 |
CCCGC 0.2375 1.025 0.7897 n/a
------- ------ ------- ------- -----------
Model comparison test statistics:
Alternate Null
-2LL : 535.4 544.4
Likelihood ratio test: chi-square = 8.982
df = 2
p = 0.01121
There are two new features to note: first, the null model is no longer a simple
unitary group; the rows are separated out into the groups defined by the null model. That
is, null does not mean no effect of any haplotype; rather, it is
used in the statistical sense of the default, more simple model compared to
the alternate: the model which we want to try to nullify.
Under the null, haplotypes AAATA and AACTA have a single parameter (both are
the reference category); haplotypes ACAGC and ACCGC have an estimated odds
ratio of 0.5628 (versus the reference group).
The second new addition is of the sub-null test p-values in the right-most column.
These will only appear when the null model contains more than one group for which there was
more than one group in the alternate model (i.e. groups in which haplotype effects have been
equated within group). Whereas the likelihood ratio test at the bottom is a joint
2df test (for whether the two sets of haplotypes can be equated; equivalently, for whether
rs1003 has an independent effect), the sub-model p-values represent a test of just
that part of the model, i.e. a 1 df likelihood ratio test for whether AAATA and
AACTA do indeed have similar odds ratios has the p-value of 0.008016.
One way of interpreting these results would be that rs1003 has an effect on the
AA-TA haplotype background, but not the AC-GC background. However, drawing
such a conclusion in this simple manner is not advised -- p-values should not be interpreted
in this direct manner, and also the power of the test will vary by the frequency of the
haplotype background. ( A feature will be added that enables one to ask specifically whether or
not the effect of rs1003 varies between these two haplotype backgrounds: this
involves the specification of linear constraints between parameters.)
Note that it is not always possible to perform a test of independent effects: for example,
consider rs1002: given the set of common haplotypes under study, we see it is perfectly
correlated with rs1004 (i.e. we only ever see the AT and CG haplotypes
for these two SNPs. We therefore never see both alleles of rs1002 on the same haplotypic
background. As such, the null model is the same as the alternate: PLINK therefore reports
Likelihood ratio test: ( not a valid comparison: identical models, df = 0 )
It is also possible to see whether more than one SNP has an independent effect: this is
still a haplotypic test (of haplotypes formed by the two or more SNPs), but the
test is stratified by the haplotypic background formed by the remaining SNPs. For example:
./plink --file mydata --hap-snps rs1001-rs1005 --chap --independent-effect rs1003,rs1004
leads to the haplogrouping
Alternate model
{ AAATA } { AACTA } { CCCGA } { ACAGC } { CCCGC } { ACCGC }
Null model
{ AAATA, AACTA } { CCCGA } { ACAGC, ACCGC } { CCCGC }
and the main test statistics
HAPLO FREQ OR(A) OR(N) SUBNULL P
------- ------ ------- ------- -----------
AAATA 0.169 (-ref-) (-ref-) 0.008016
AACTA 0.06728 2.619 |
CCCGA 0.2125 0.8942 0.6907 n/a
ACAGC 0.2635 0.6839 0.5628 0.2643
ACCGC 0.05022 1.038 |
CCCGC 0.2375 1.025 0.7897 n/a
------- ------ ------- ------- -----------
Model comparison test statistics:
Alternate Null
-2LL : 535.4 544.4
Likelihood ratio test: chi-square = 8.982
df = 2
p = 0.01121
In this particular case, this test of independent effects of rs1003 and
rs1004 happens to give exactly the same results as the test of rs1003 by itself,
which will be made clear from examining the haplogroupings. Note that, in both cases, the
test is a two degree of freedom test.
Omnibus test controlling for X
To perform an omnibus test but controlling for a particular haplotype of set of haplotypes,
you can use the --control command. The haplotypes can either be directly specified,
or implied through the list of SNPs specified. This test is a complement to the
--independent-effect test.
Typically, one would use this test in the case of a significant omnibus assocation result.
For example, we could ask whether we still see the association even if we control for
haplotypes of SNPs rs1002 and rs1004 (the two most highly associated SNPs,
that are in complete LD with each other):
./plink --file mydata --hap-snps rs1001-rs1005 --chap --control rs1002,rs1004
which gives implied haplogroupings:
Alternate model
{ AAATA } { AACTA } { CCCGA } { ACAGC } { CCCGC } { ACCGC }
Null model
{ AAATA, AACTA } { CCCGA, ACAGC, CCCGC, ACCGC }
In this case, rather than make the null model a single set, the --control
command separates the haplotypes out into distinct groups based on the sub-haplotypes
at SNPs rs1002 and rs1004, i.e.
{ AAATA, AACTA } { CCCGA, ACAGC, CCCGC, ACCGC }
The regression coefficient table is:
HAPLO FREQ OR(A) OR(N) SUBNULL P
------- ------ ------- ------- -----------
AAATA 0.169 (-ref-) (-ref-) 0.008016
AACTA 0.06728 2.619 |
CCCGA 0.2125 0.8942 0.6603 0.2087
ACAGC 0.2635 0.6839 |
CCCGC 0.2375 1.025 |
ACCGC 0.05022 1.038 |
------- ------ ------- ------- -----------
and model comparison statistics are:
Alternate Null
-2LL : 535.4 547.7
Likelihood ratio test: chi-square = 12.32
df = 4
p = 0.01515
This is a 4 df test because 4 haplotypes are grouped with another
haplotype (i.e. the 4 | symbols in the output).
One would conclude from this analysis that there is still a significant
effect at this locus even controlling from the haplotypic effects of
rs1002 and rs1004. In otherwords, the command
--control rs1002,rs1004
is identical to
--indepedent-effect rs1001,rs1003,rs1005
in this instance. Unlike the --independent-effect, the
--control command does allow for hapltoype(s) to be specified,
instead of SNPs: for example, we might ask whether the omnibus test is
significant controlling for ACAGC:
./plink --file mydata --hap-snps rs1001-rs1005 --chap --control ACAGC
which gives the following haplogrouping
Alternate model
{ AAATA } { AACTA } { CCCGA } { ACAGC } { CCCGC } { ACCGC }
Null model
{ AAATA, AACTA, CCCGA, CCCGC, ACCGC } { ACAGC }
i.e., effectively leaving ACAGC out of the test,
and this table of coefficients
HAPLO FREQ OR(A) OR(N)
------- ------ ------- -------
AAATA 0.169 (-ref-) (-ref-)
AACTA 0.06728 2.619 |
CCCGA 0.2125 0.8942 |
CCCGC 0.2375 1.025 |
ACCGC 0.05022 1.038 |
ACAGC 0.2635 0.6839 0.624
------- ------ ------- -------
Model comparison test statistics:
Alternate Null
-2LL : 535.4 546
Likelihood ratio test: chi-square = 10.56
df = 4
p = 0.03194
In otherwords, there is still a marginal omnibus assocation (p=0.032)
after controlling for ACAGC. Repeating this test for each
haplotype:
HAPLOTYPE (--control) P-VALUE (omnibus association)
AAATA 0.0008895
AACTA 0.2803
CCCGA 0.0008441
CCCGC 0.0009084
ACCGC 0.0007738
ACAGC 0.03194
which would suggest that there is no significant signal after controlling
for AACTA, at the p=0.05 level at least. This is consistent
with the true model: these data are in fact simulated, and AACTA
was in fact the disease haplotype.
Finally, it is possible to specify multiple, comma-delimited haplotypes
for the --control command.
General specification of haplotype groupings
Rather than use any of the above convenience functions for
specifying tests, one can directly specify the haplogrouping, in one of
two ways: by manually specifying the haplotypes, or the SNPs, to include
under both alternate and null models.
Manually specifying haplotypes
With the --alt-group and --null-group commands, it
is possible to directly specify the haplogrouping. These commands take a
comma-delimited list of sets, where the equals symbol is used
to specify equality of haplotypes. For example, the command
--independent-effect rs1003
which gives rise to the following haplogroups
Alternate model
{ AAATA } { AACTA } { CCCGA } { ACAGC } { CCCGC } { ACCGC }
Null model
{ AAATA, AACTA } { CCCGA } { ACAGC, ACCGC } { CCCGC }
which could instead have been directly specified
--alt-group AAATA,AACTA,CCCGA,ACAGC,CCCGC,ACCGC
--null-group AAATA=AACTA,CCCGA,ACAGC=ACCGC,CCCGC
Note how the = symbol is used to define sets. When using these
commands, the default for the alternate is as specified above, so this
command could have been excluded. Also, it is not necessary to
specify all haplotypes: if a haplotype is not specified, it will revert to its
default grouping (i.e. depending on whether this is for the alternate or
null). In other words, the same effect could have been achieved just with
the single command
--null-group AAATA=AACTA,ACAGC=ACCGC
Finally, there are two wild-cards, one of which can be
used in these two commands:
* Group all haplotypes not otherwise explicitly mentioned
% Separate all haplotypes not otherwise explicitly mentioned
In other words, implicitly there is always a base-line of
--alt-group %
--null-group *
To just equate two haplotypes, for instance, but keeping everything else
the same, one might use
--null-group AAATA=AACTA,%
i.e. which means "under the null, allow each haplotype to have a unique
effect (%), with the exception of AACTA and
AACTA, which should be grouped with each other".
Manually specifying SNPs
With the --alt-snp and --null-snp commands, it is
possible to specify which SNPs should be used to form haplotypes. By
default, all SNPs are included in the alternate, no SNPs are included in
the null: this leads to the default haplogrouping of the omnibus test.
To illustrate this command, by reference to the
--independent-effect specification, for example: the command
--independent-effect rs1003
is equivalent to
--alt-snp rs1001-rs1005 --null-snp rs1003
Covariates and additional SNPs
Covariates can be included with the --covar option, the same as
for --linear and --logistic models. By default, all
covariates in that file with be used. Covariates always feature under
both the alternate and null models.
./plink --file mydata --hap-snps rs1001-rs1005 --chap --covar myfile.cov
which generates an additional set of entries in the plink.chap
output file, representing the coefficients (no other statistical tests
are performed for the covariates, i.e. no p-values, etc):
COVAR OR(A) OR(N)
----- ------- -------
COV1 0.7834 0.8499
In a similar manner, additional SNPs can be included, which can be
SNPs other than those included in the --hap-snps command.
These SNPs are not considered in any way during the phasing process: the
alleles are simply entered in an allelic dosage manner. The command
--condition and a list of SNPs, or --condition-list
followed by a filename with a list of SNP names, includes these.
./plink --file mydata --hap-snps rs1001-rs1005 --chap --condition rs1006
which adds the following lines in the output file
SNPS OR(A) OR(N)
----- ------- -------
rs1006 1.038 2.899
Unlike for standard covariates, it is also possible to request that a SNP
effect be dropped under the null model, which allows, for example, for a test of
a SNP controlling for a set of haplotypes at a different locus: here, one
would want to include all haplotype effects under the null, and use the
--test-snp command to drop one or more of the conditioning SNPs:
./plink --file mydata --hap-snps rs1001-rs1005 --chap --null-group % --condition
rs1006 --test-snp rs1006
which would instead show
SNPS OR(A) OR(N)
----- ------- -------
rs1006 1.038 (dropped)
and an extra degree of freedom would be added to the model comparison
test. As the --null-group % command was used to effectively
control for all haplotypic effects whilst testing this particular SNP,
rs1006, the test will be a 1 df test,
Likelihood ratio test: chi-square = 0.0007377
df = 1
p = 0.9783
It is also possible to specify more than one conditioning SNP (and to drop
none, some or all of these under the null): for example,
./plink --file mydata --hap-snps rs1001-rs1005 --chap --null-group % --condition
rs1006,rs1007 --test-snp rs1006
General setting of linear constraints
{ to be completed }
|
|