Thanks... I tried to change the name of the VCF file (to temp2) generated after keep option,,,,
But it does not create the temp2 file (while the recode.vcf file is generated properly after filtering for specific population)
here is the code again
#select specific population
if [ "$POP_FILE" != "" ]; then
vcftools --vcf temp.vcf --keep $POP_FILE --recode --out popfilter > temp2.vcf 2> /dev/null
else
cp -f temp.vcf temp2.vcf
fi