Coded allele for plink --r command
1
0
Entering edit mode
2.4 years ago

When calculating pairwise LD matrix with the following command in plink 1.9;

plink --bfile {bfile.set} --r square ...

It is said in the plink documentation that:

By default, --r calculates and reports raw inter-variant allele count correlations, ...

Which allele in the corresponding .bim file is being counted to calculate r (i.e. which is the coded allele)?

plink • 943 views
ADD COMMENT
1
Entering edit mode
2.4 years ago

It doesn't actually matter, as long as you stick to one .bim column. The results are identical if you always use A1 allele counts, vs. if you always use A2 allele counts.

The one thing to watch out for here is if the A2 allele isn't always major in the input dataset; in this case, plink defaults to swapping A2 to major before executing --r; see the discussion at https://www.cog-genomics.org/plink/1.9/data#ax_allele . This probably won't come up, but if it does, adding --keep-allele-order prevents the swap. (Alternatively, running plink 1.9 --make-bed without --keep-allele-order will automatically swap all A2 alleles to major.)

ADD COMMENT
0
Entering edit mode

Thanks for the quick response. I am trying to use it for a downstream analysis which requires pairwise LD correlation matrix between variants extracted from GWAS summary statistics, and the counted allele must match the effect allele in the GWAS.

To achieve this, I'm currently running it in combination with --a2-allele option, as in:

plink --bfile {bfile_set}  --r square  --a2-allele  {GWAS_file} {var_id.col_number} {effect_allele.col_number} {skip_row}

Will that work?

ADD REPLY
1
Entering edit mode

--a2-allele works, yes.

ADD REPLY

Login before adding your answer.

Traffic: 2291 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6