I have tried this (and thought it worked), but looking more closely at my output file it doesn't retain SNPs specific to the population (it retains all SNPs for the population, regardless if they appear in others). The script I am using is:
bcftools view -x all_no_outgroups.recode.vcf.gz --samples-file cluster_1.txt > cluster_1_private.vcf
Am I doing something wrong in terms of my script here? As many of the SNPs retained in the cluster_1_private.vcf are also in the other populations.