This is a test version of Biostars. For the public version, visit https://www.biostars.org.
problem with installing and running bcftools

I tried to follow the instructions here: https://samtools.github.io/bcftools/ being in the following path - /Users/my_username - i followed the commands and indeed now i have the bcftools folder.

Then, I want to filter my VCF file, so I did the following: (based on the instructions here: https://samtools.github.io/bcftools/howtos/variant-calling.html)

cd bcftools

bcftools filter -i'%contig==1' path_to_my_file/my_file.VCF | bcftools stats | grep TSTV

but i get the following error:
-bash: bcftools: command not found

what am I doing wrong?...

Thanks !!!

bcftools vcf

I still get multiple errors =/

$ ./bcftools filter -i 'CHROM==1' /path/file.vcf | bcftools stats | grep TSTV

-bash: bcftools: command not found
[W::vcf_parse] Contig '1' is not defined in the header. (Quick workaround: index the file with tabix.)
Error: cannot use arithmetic operators to compare strings and numbers

I don't think you read the link above about what is a PATH.

$ ./bcftools filter -i 'CHROM==1' /path/file.vcf | ./bcftools stats | grep TSTV

1 answer

Alternatively, you could use Bioconda and install it in your os path.

Log in to answer this question.