DReichLab / DReichLab/AdmixTools

Potentially a serious issue with Eigenstrat to Plink conversions

Open
#76 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
235
Forks
76
PR merge metrics
No merged PRs in 30d

Description

This issue affects conversions from Eigenstrat to Plink using convertf and par.PED.PACKEDPED. As you're aware Eigenstrat .snp follows VCF format with regards to listing the REF allele (col 5) in the column prior to the ALT allele (col 6).

However, Plink .bim does the opposite where ALT is listed in col 5 and REF in col 6.

It seems that convertf is not aware of this Plink .bim format because after I convert files from Eigenstrat .geno to Plink .bed using par.PED.PACKEDPED, ALT is still listed in col 6 and REF in col 5 of the .bim file that was just obtained from .snp.

So now when this is merged with other Plink files you have a totally mixed up final merged Plink file with REF being in col 5 for some positions and col 6 for other positions. This may not cause issues in Plink for minor allele frequency calculations but once converted back to Eigenstrat .geno may cause flawed downstream analysis.

My question is would this cause any issues with Admixtools code if REF is col 5 for some positions and col 6 for other positions and alternatively ALT in col 6 for some and col5 for other positions ?

I'm quite certain this has gone unnoticed by most researchers converting files back and forth.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the convertf path for par.PED.PACKEDPED and compare the Eigenstrat .snp and Plink .bim allele-column conventions described here. Check how the resulting .bim is handled when files are merged and converted back to Eigenstrat .geno; done requires a confirmed answer about downstream Admixtools effects and a reproducible correction or documented non-issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
bioinformatics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.