This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Recode to VCF with -a2-allele flag in PLINK

Hi there,

I generated a VCF using plink from .ped and .map files from a genotyping experiment as so:

plink --file test --recode vcf --out testVCF

As is well documented, this assigned the REF alleles in the output VCF to be the major allele observed in the data.

I am trying to recode to make the VCF assign the correct REF allele as so:

plink --vcf testVCF --a2-allele reference_alleles.txt --recode vcf --out testVCF_corrected

I am met with the error:

--a2-allele: 0 assignments made.

I have tried formatting the reference_alleles.txt as:

A)

exm77264    G
exm77266    C
exm77274    T

and

B)

G   exm77264
C   exm77266
T   exm77274

As well as specifiying:

--a2-allele reference_alleles.txt  1 2

or

--a2-allele reference_alleles.txt  1 2

Any advice would be greatly appreciated, thanks!

plink recode vcf

Hmm, the only way you should get "0 assignments made" is if the variant IDs in reference_alleles.txt don't match those in test.map. What do the first lines of test.map look like? Can you post the full .log file from a failing --a2-allele run?

yes, but since the vcf option is being used then the variant IDs should be assigned in the VCF file itself.

0 answers

No answers yet.

Log in to answer this question.