Htseq throws error, No module named pysam,
1
2
Entering edit mode
8.1 years ago
a.james ▴ 240

Hello All,

I have ben trying to run Htseq-count for quite a while now. Its containing throwing error as follows, Please Install PySam to use the BAM_Reader Class (http://code.google.com/p/pysam/) Error occurred when reading the beginning of SAM/BAM file. No module named pysam

And so as it is mentioned I have installed pysam and when I run Htseq-count it still complains as No module named pysam I have installed pysam using pip install command line and as well as downloading the file. When I insatll pysam using pip its show as it is there Requirement already satisfied (use --upgrade to upgrade): pysam in /home/user/Tools/anaconda3/lib/python3.4/site-packages/pysam-0.9.0-py3.4-linux-x86_64.egg

However, I think the htseq-count doesn't consider anaconda version of pysam. And so as I think its not taking into account the downloaded and installed pysam package also.

Any suggestions would be great on this issue

RNA-Seq ChIP-Seq next-gen sequencing • 5.7k views
ADD COMMENT
0
Entering edit mode

Try @Devon's suggestion from this thread: htseq-count cannot find pysam

ADD REPLY
0
Entering edit mode

what is the output of following command ?

python -c 'import pysam'
ADD REPLY
0
Entering edit mode

Actually it doesn't give me anything as output

ADD REPLY
0
Entering edit mode

That's a good thing.

ADD REPLY
2
Entering edit mode
8.1 years ago

htseq-count will be using your default python installation and therefore not find the pysam module in your anaconda installation. He have had the same issue.

Two options:

-Install pysam for your default python installation

-change the python interpreter in the htseq-count script. Find the script using 'which htseq-count', edit the interpreter at the top of the script to the path to your anaconda python.

ADD COMMENT
0
Entering edit mode

Hello, Thanks for your suggestions..my default python is anaconda python. which python /home/username/Tools/anaconda3/bin/python and I think Htseq-count doesn't consider it.

ADD REPLY
1
Entering edit mode

Did you try this: C: htseq-count cannot find pysam Set $PYTHON_PATH

ADD REPLY

Login before adding your answer.

Traffic: 3170 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