I am trying to use the R package SNPRelate to calculate pairwise relatedness between 8 males and 8 females. I have a VCF file with ~13,000 SNPs. I am able to use SNPRelate to convert the VCF file to a GDS file with
snpgdsVCF2GDS(). However, when I try to use the functions that act on the GDS file, such as snpgdsLDpruning() or snpgdsIBDMLE(), I get an error: "There is no SNP!" because all ~13,000 SNPs were removed as non-autosomal. However, almost all my SNPs are autosomal. So I'm wondering if my VCF was improperly formatted or missing information and how I might add it back in. Suggestions? Thx.
parents.vcf <- "~/Data/parents.vcf"
#convert vcf to gds
parents.gds <- snpgdsOpen("parents.gds")
>Identity-By-Descent analysis (MLE) on SNP genotypes:
Removing 13354 SNP(s) on non-autosomes
Error in .InitFile2(cmd = "Identity-By-Descent analysis (MLE) on SNP genotypes:", :
There is no SNP!