Hello,
I'm trying to use KING for estimating kinship between individuals. I have a vcf file that resulted from a de novo assembly of ddrad seq data.
First, I tried to convert my vcf file to .bed file using Plink2.0, but it failed saying that human genome didn´t have that much chromosomes. I search a bit online and since my CHR column represents loci and not chromosomes I would have to include a letter on CHR ID. So I did add a "C" in the begging of every CHR ID and also used the flag -allow-extra-chr on plink.
I runned the following command:
./plink2 --vcf myfile.vcf --allow-extra-chr --make-bed --out one_snp
When I run KING:
./king -b one_snp.bed --related
I get the following error:
Read in PLINK bim file one_snp.bim... Genotype data consist of 0 autosome SNPs 12469 other SNPs are removed. PLINK maps loaded: 0 SNPs FATAL ERROR - No autosome SNPs are available. Please check your map file.
I think the problem may be with the .fam file, but I'm not sure how to correct it since I don't have information on pedigree data. Is it necessary to run KING? Does anyone have any idea what is the problem?
Thanks in advance
2 answers
I've also tried that once, but wasn't successful as well. I ended up using SNPRelate R package, it provides relatedness inference (snpgdsIBDKING) as well (with KING algorithm). Conversion from VCF to GDS is very easy (snpgdsVCF2GDS).
KING does not include SNPs on scaffolds in its analysis. You have to lie to it and provide a .bim file that appears to only have regular chromosomes.
However, plink2 --make-king-table (https://www.cog-genomics.org/plink/2.0/distance#make_king ) does not have that limitation.
Log in to answer this question.
I came here two years later. Did you find a solution? I have the same issue now with post impute dataset. Thanks