And should I do this on the BIM file, or the BED file?
I had my whole genome sequenced. In plink, I put the VCF file through and it produced 3 files: plink.bed, plink.bim, and plink.fam. As recommended by Sam in another comment, I made a backup of plink.bim and ran this Linux command on the backup: "sed 's/^chrM\s/25\t/g; s/^chrX\s/23\t/g; s/^chrY\s/24\t/g; s/^chr//g' plink-backup.bim > plink.bim" With this the changes are reflected in the file plink.bim. I then run admixture "./admixture -j2 plink.bed 4" and I got this error:
**
Error: detected that all genotypes are missing for a SNP locus.
Please apply quality-control filters to remove such loci.
**
I have no idea what to do at this point.
1 answer
So it sounds like one of your SNPs has all alleles missing, which is likely to happen if you've got only one genome there (yours).
You can remove SNPs that have missing alleles using plink
plink --geno 0.1 --file your_file --recode --out your_filtered_file
geno 0.1 means 'remove variants with missing call rates exceeding the provided value (default 0.1)', 0.1 (10%) should be more than enough for your case since your missing rate is 1.0 (100%)
This should print how many SNPs have been filtered out.
Ah sorry, you have bed/bim/fam -
so run it like this:
plink --geno 0.1 --bfile plink --recode --out your_filtered_file
The --bfile flag will assume that you have files starting with 'plink' and ending in '.bed', 'bim', 'fam'
Thank you much! It's running now with no errors.
Log in to answer this question.