Question: lgen to ped using plink
gravatar for tarek.mohamed
3.5 years ago by
tarek.mohamed270 wrote:

Hi All,

How can I create a lgen file which has only one individual genotyped for 300,000 SNPs. I mean in the context of sample ids, what shall I use? I created the lgen, fam files below. Then I used plink 1.9 to generate ped file (log file shown belos). The problem is that genotypes in ped file mismatch genotype in lgen file.


200638550003_R01C01 200638550003_R01C01 rs1000002 A G
200638550003_R01C01 200638550003_R01C01 rs1000003 A G
200638550003_R01C01 200638550003_R01C01 rs10000030 A G
200638550003_R01C01 200638550003_R01C01 rs10000037 G G


200638550003_R01C01 200638550003_R01C01 0 0 0 0


3 rs1000002 0 183635768
3 rs1000003 0 98342907
4 rs10000030 0 103374154
4 rs10000037 0 38924330


200638550003_R01C01 200638550003_R01C01 0 0 0 -9 A A G A G A G A G G G A G A A A A A G G


PLINK v1.90b4.6 64-bit (15 Aug 2017) Options in effect: --lfile test_1 --no-fid --no-parents --no-pheno --no-sex --out test_1_1.9 --recode
Hostname: quser11 Working directory: /projects/b1042/BurridgeLab Start time: Wed Sep 13 15:23:58 2017
Random number seed: 1505334238
128715 MB RAM detected; reserving 64357 MB for main workspace.
Processing .lgen file... done.
--lfile: test_1_1.9-temporary.bed + test_1_1.9-temporary.bim +
test_1_1.9-temporary.fam written.
10 variants loaded from .bim file.
1 person (0 males, 0 females, 1 ambiguous) loaded from .fam.
Ambiguous sex ID written to test_1_1.9.nosex .
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 1 founder and 0 nonfounders present.
Calculating allele frequencies... done.
10 variants and 1 person pass filters and QC.
Note: No phenotypes present.
--recode ped to test_1_1.9.ped + ... done.

Thanks Tarek

mismatch plink lgen • 1.8k views
ADD COMMENTlink modified 2.0 years ago by zx87549.9k • written 3.5 years ago by tarek.mohamed270
gravatar for chrchang523
3.5 years ago by
United States
chrchang5237.7k wrote:

Wrote a response earlier, but it seems to have disappeared.

The main issue is that your .map file is unsorted; plink will sort it by position before generating the new .ped + .map fileset, and I'm guessing that's why there appears to be a discrepancy.

Also, it doesn't look like you posted the entire .lgen or .map input files, since they have only 4 variants but the .log file states that 10 were loaded.

ADD COMMENTlink written 3.5 years ago by chrchang5237.7k

Hi Chang, Thanks again for the reply. You are right, this discrepancy is due to the unsorted map file. After comparing ped file with a sorted map file, everything seems to be fine now.


ADD REPLYlink written 3.5 years ago by tarek.mohamed270
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1953 users visited in the last hour