Probably a silly oversight on my part, but I'm trying to filter all the vcfs in a directory with bcftools using a simple loop. My basic command is working fine:
bcftools filter -i 'QUAL > 1000' -o filter/file1out.vcf file1in.vcf
but when I try to loop it, it echoes through each filename, but generates no output files or error messages.
for f in *.vcf; do echo "filtering $f"; bcftools filter -i 'QUAL > 1000' -o filter/$f_out.vcf $f; done
Am I not handling the output direction properly? Any help much appreciated!