This is a test version of Biostars. For the public version, visit https://www.biostars.org.
plink2 reorder alleles by fasta reference

Hello,

I have a plink 2.0 file ("Ref" is always the major allele) and want to reorder its ref and alt alleles by a fasta reference. For this I use the --ref-from-fa command. However, the following error occurs:

Error: --ref-from-fa wants to change reference allele assignment at X:2700157,but it's marked `as 'known'. Add the 'force' modifier to force this change`

What does marked as "known" mean? How should I go on?

Best,

Andreas

plink2

1 answer

plink 2.0 marks a reference allele as "provisional" instead of "known" when it comes from a plink 1 .bed file, or a VCF directly generated by plink from such a .bed file. Some of these reference alleles are expected to be wrong.

However, when a reference allele comes from a regular VCF file, it's expected to be correct; that's why an additional --ref-from-fa modifier is required to change it.

Hmmm. My data does not come from a "regular vcf" file, but from a standard GWAS-microarray workflow with PLINK. How would you proceed? --> "Force" it?

Yes, if you know the supposed REF alleles are really just major alleles, that's what "force" is for.

Perhaps your original dataset had "backwards" alleles (with REF usually A1 instead of A2) for some reason, while still being correctly encoded. You can sanity-check this by running --freq on your updated dataset: if the alternate allele frequencies are usually low, you're probably fine.

Log in to answer this question.