File format conversion

40 views
Skip to first unread message

Yang Li

unread,
Nov 6, 2025, 3:48:23 PMNov 6
to plink2-users
Hi Plink team,

Thanks for developing such a great tool! I'm working on some imputation dataset that might be generated by IMPUTE on hg19 reference. The data is not very well documented and have genotypes spliced into chunks by regions. For each region, it contains the following files:
1. .gz file: a table with "SNP, A1, A2, Sample1 dosage ([0.2,0.8])...Sample2 dosage ()" information.
2. .fam file: .fam file in plink format
3. .ngt file: snp information like "22 rs145711952 0 16199921 0"
4. .info file: table with columns "CHR SNP POS genotyped info freq a1 a2 pass" The "pass" column containing filtering information. 
5. .map file: similar to .ngt file but with less column "22 rs145711952 0 16199921"

Do you by chance know how to convert those files to .pgen format? Also do you by chance know does plink able to liftover to hg38 then harmonize the alleles to make it consistent with hg38?

Thanks,
Yang

Chris Chang

unread,
Nov 10, 2025, 1:15:08 PMNov 10
to Yang Li, plink2-users
- It sounds like you can use plink2's --import-dosage command to convert the .gz file to .pgen format.
- plink2 does not currently have a full-service liftover command starting from e.g. a .chain file, but it does have the main components one would need to support a liftover script (--update-chr, --update-map, --update-alleles, if you're using the current development build --flip is also available).

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/plink2-users/3cc743d3-6d2b-4251-ad2f-2e6ddd885b5fn%40googlegroups.com.

Chris Chang

unread,
Nov 15, 2025, 2:19:11 PMNov 15
to Yang Li, plink2-users
Forgot to mention, the BCFtools/liftover plugin (https://github.com/freeseek/score?tab=readme-ov-file#liftover-vcfs ) is the best full-service liftover tool I am aware of; you can export to VCF/BCF, use it, then re-import.
Reply all
Reply to author
Forward
0 new messages