Thanks. It is likely the source of the problem. I tried the following but without success:
bcftools view -v -c -g[hom|het|miss] output.bcf > output.vcf
bcftools call -v -c -g[hom|het|miss] output.bcf > output.vcf
Any thoughts?
Hi all,
Fairly new to the use of bcftools, I am trying to create a vcf file by typing the following:
bcftools view -v -c -g output.bcf > output.vcf
However, I receive the following error message: the argument to -g not recognised. Expected one of hom/het/miss/^hom/^het/^miss, got "output.bcf".
I confirm that I am in the right directory and even tried to give the full directory but without success. Unfortunately, I cannot find details online on how to solve this issue.
Any help would be much appreciated.
Antoine
Thanks. It is likely the source of the problem. I tried the following but without success:
bcftools view -v -c -g[hom|het|miss] output.bcf > output.vcf
bcftools call -v -c -g[hom|het|miss] output.bcf > output.vcf
Any thoughts?
Have you tried removing the brackets (e.g. bcftools view -vcg hom|het|miss)?
Yes I did. Still no luck. Btw, I am not sure that the latest version of bcftools actually uses call in place of view. The man page says that call is the former "view". So I guess view is the option I am actually aiming for.
Thanks for sharing your thoughts.
Try supplying just hom to the -g - if it works, there might be a problem with the syntax of the compound option.Also, try giving a white space between the -g and the hom|het - that might be a possible source of error as well.
And welcome to the trial and error world of tools :)
Thanks Ram. I tried that but it did not work. I am thinking it could be related to the version of bcftools where the syntax has to be applied differently than in previous versions.
-g is to filter genotypes and is not a toggle - it needs an value passed to the argument. Are you looking to drop genotype information? That's the -G option.
Thanks for your quick answer Ram. My understanding was that -g was a filtering options allowing to "include only sites with one or more homozygous (hom), heterozygous (het) or missing (miss) genotypes". At this point, I am not trying to drop genotype information but to do what the -g seems to offer. There might still be something I am missing here.
Log in to answer this question.