# Reliably create female and male individuals in a -ped file for plink

For a study I need some kind of "decoy" GWAS-data. For this I created a panel with some genes, the same ones as in the real data. From NCBI I fetch some of their SNPs and create my own artificial .ped and .map file. Furthermore I save for each snp if it lies on the X-Chromosome.

I then go on and randomly create female individuals by giving them heterozygous alleles on their X-Chromosome genes. Males only get homozygous ones.

But when I then run pLink with the --check-sex argument I get a sexcheck file where there's only zeroes in the SNPSEX column. So do you know how --check-sex works that I can then create decoy-individuals that reliably (as much as possible) get detected as a given gender?

• I was able to create a sample map/ped files that result in SNPSEX column being populated in plink 1.19 using 1000genomes Xchrom - found in their FAQ: internationalgenome.org/faq/where-are-snps-xymitochondrial-chr. The relevant conversion command ./plink --check-sex --vcf ../ALL.chrX.phase3_shapeit2_mvncall_integrated_v1b.20130502.genotypes.vcf --maf 0.05 --out ped_map_chrX/chrmX --recode . Even in this dataset, SNPSEX is 0 (ambiguous) in 400 (~16%) of cases. One could start pruning from here to arrive at a suitable minimal set of SNPs that are still recognised in plink. Feb 18 at 12:42
• Ok, thanks! I'll try that out. Feb 19 at 10:03