Entering edit mode
5.7 years ago
maximilian.mayerhofer
▴
30
I want to filter my bcf files for various criteria. If I use it on one single file, it works, but as soon as I for-loop it, it breaks with unknown command.
for n in /Volumes/Temp/PBI_CNV/results/*.bcf; do
bcftools filter -i 'MAPQ>40' $n > ${n%*.bcf}_mapq.vcf
done
for m in /Volumes/Temp/PBI_CNV/results/*_mapq.vcf; do
grep -vwE '(LowQual|##contig)' $m > ${m%*.vcf}_qual.vcf
done
Results me in:
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
[main] Unrecognized command.
As well as empty _mapq.vcf and _qual.vcf files. No additional error, so the loop seems to be working. Is this a bug?
Jep, was a version issue.