Hi,

I am using methods of analysis where it is necessary that the LD and effect sizes are computed with respect to the same reference allele, while in my case they are not since I am using an available panel to compute LD with Plink and my own data to compute effect size. To align the two measurements, I would have to compare each allele with those of the reference and flip the effect sizes in cases where the alleles are flipped, but things get messy when including both SNPs and INDELs in the comparisons. To avoid this step, I was hoping it could be possible to specify a reference allele directly when computing LD in Plink like this:

    plink --bfile 1000Genomes --r2 --extract list.snps --reference-allele list.reference.allele

If this is not, are there any tools out there to easily compare alleles from two datasets and adjust the affect size of the study if the alleles are flipped compared to a reference file such as 1000 Genomes? I have previously used ['QCGWAS' - CRAN][1] which was really nice to do this, but the files I have now are all very large BED files that take too long to load into R, that is why if Plink could to this it would be much faster...

Many thanks for any suggestions and ideas!

Fra

 [1]: https://cran.r-project.org/web/packages/QCGWAS/QCGWAS.pdf
From Christopher Chang

> Yes, `--a2-allele` lets you choose the reference alleles for the current run.

Based on Christopher Chang's answer, to compute LD in Plink using a specific allele as a reference we can use:

    plink --bfile 1000Genomes --r2 --extract list.snps ---a2-allele list.reference.allele