bcftools command not found
0
0
Entering edit mode
@fa745d19
Last seen 3.5 years ago
United Kingdom

I've read quite a few posts about this, and tried what they suggest, but still encounter this problem.

I want to variant call using bcftools, so I installed it according to these instructions: https://samtools.github.io/bcftools/howtos/install.html it now sits here: /Users/michaelflower/bin/bcftools

I've made the bam file ch2ot_pairaln.sorted.bam with bwa, and I've got a reference file chr2.fa. I've put both these files in a folder within bcftools here: /Users/michaelflower/bin/bcftools/tempbcftools

I then try and variant call using the advice here: https://samtools.github.io/bcftools/howtos/variant-calling.html

bcftools mpileup -f tempbcftools/chr2.fa tempbcftools/ch2ot_pairaln.sorted.bam | bcftools call -mv -Ob -o tempbcftools/chr2ot_calls.bcf

But I get this error:

-bash: bcftools: command not found

I've read that others have had the same problem, and that it's due to a PATH problem: https://www.biostars.org/p/417504/ http://seqanswers.com/forums/showthread.php?t=31212

So I read about PATH here (https://astrobiomike.github.io/unix/modifying_your_path) and added bcftools to it:

export PATH="$PATH:/usr/bin/bcftools

Now my path looks like this:

$ echo $PATH | tr ":" "\n"
/Users/michaelflower/bin
/Users/michaelflower/bin
/Users/michaelflower/opt/anaconda3/bin
/Users/michaelflower/opt/anaconda3/condabin
/Users/michaelflower/bin
/Users/michaelflower/bin
/Library/Frameworks/Python.framework/Versions/3.7/bin
/Library/Frameworks/Python.framework/Versions/2.7/bin
/Library/Frameworks/Python.framework/Versions/3.5/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/opt/X11/bin
/usr/bin/bcftools
/usr/bin/samtools
/usr/bin/htslib

But still I get the same error when I try and run bcftools:

-bash: bcftools: command not found

What am I doing wrong?? I'm still suspicious it has something to do with the way I've set up the PATH, as the response to the 'which' command is different for samtools (which works) and bcftools (which doesn't):

$ which samtools
/usr/local/bin/samtools

$ which bcftools
samtools bcftools • 2.3k views
ADD COMMENT
0
Entering edit mode

This is not a Bioconductor package and we are already discussing it over at biostars.org

ADD REPLY
0
Entering edit mode
ADD REPLY

Login before adding your answer.

Traffic: 544 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6