As the error suggests plink is treating
"_" in sample IDs as a delimiter, the solutions is provided at GitHub issue #21
plink --noweb --const-fid 0 --vcf myFile1.vcf --recode --out myPlinkFile
"--const-fid 0" is probably the simplest way; it causes all family IDs to be set to "0", and individual IDs to be set to the ID in the VCF file. (The default behavior is to treat '_' as a delimiter between the FID and IID; this obviously has a problem with multiple underscores.)
I will modify the error message to suggest --const-fid as a workaround.
-- Christopher Chang
Other relevant flags from the manual for vcf inputs:
VCF files just contain sample IDs, instead of the distinct family and within-family IDs tracked by PLINK. We offer three ways to convert these IDs:
--double-id causes both family and within-family IDs to be set to the sample ID.
--const-fid converts sample IDs to within-family IDs while setting all family IDs to a single value (default '0').
--id-delim causes sample IDs to be parsed as [FID][delimiter][IID]; the default delimiter is '_'. If any sample ID does not contain exactly one instance of the delimiter, an error is normally reported; however, if you have simultaneously specified --double-id or --const-fid, PLINK will fall back on that approach to handle zero-delimiter IDs.
If none of these three flags is present, the loader defaults to
modified 9 months ago
9 months ago by
zx8754 ♦ 8.4k