Thanks for this. However, how can we use --ref-allele command?
plink2 --pfile myfile --ref-allele ? Just this way?
Thanks.
Hello,
When we convert plink 1.9 file formats to plink 2, how in .pvar file recognises which allele is alternative and which is the reference. Because, in .bim file we do not have columns for alternative and reference alleles, separately. It has only two columns for allele 1 and allele 2. Please help me to understand this.
Thanks a lot.
Your suspicion is correct: plink2 doesn’t know which alleles are actually REF. plink 1.x usually sets the last .bim column (allele 2) to the major allele, and that corresponds to REF more often than not, so that’s the guess that plink2 makes. But these REF alleles are explicitly marked as “provisional”.
You need to use a command like —ref-allele or —ref-from-fa to set them properly.
Thanks for this. However, how can we use --ref-allele command?
plink2 --pfile myfile --ref-allele ? Just this way?
Thanks.
Please read the documentation at https://www.cog-genomics.org/plink/2.0/data#ref_allele .
Thanks. Also, can we keep .pvar file without these two columns? (alternative and reference allele columns)
No, those are among the five required columns (the others are CHROM/POS/ID).
Can we keep them as a dot. ex: We have these two columns but value is a " . "
They can’t both be “.”. Again, if you know what the two alleles are but you don’t know which is REF and which is ALT, plink2 can mark them as “provisional”, to be disambiguated later (this happens automatically when converting plink 1 binary to plink 2 binary). If you entirely erase the allele codes, the associated genotype data can no longer be interpreted.
Log in to answer this question.