Downgrading pysam helped me as well. Thanks!
• 1 views
•
link
Hi,
I use htseq-count to quantify a RNA-Seq bam file, using Terminal on a Mac BookPro. However, it cannot find the pysam, even I have already installed and upgraded the pysam (the detail below). Could you help me? Thanks a lot.
Best,
Gary
gary > pwd
/Users/gary/Downloads/htseq
gary > ll
total 9379312
-rw-r-----@ 1 gary staff 4.3G Dec 14 13:38 T7_Early_R.bam
-rw-r--r-- 1 gary staff 161M Dec 15 13:07 hg19refGene.gtf
gary > htseq-count -f bam -s no -t exon -i gene_id -m union T7_Early_R.bam hg19refGene.gtf > T7_Early_R.txt
100000 GFF lines processed.
200000 GFF lines processed.
300000 GFF lines processed.
400000 GFF lines processed.
500000 GFF lines processed.
600000 GFF lines processed.
700000 GFF lines processed.
800000 GFF lines processed.
900000 GFF lines processed.
1000000 GFF lines processed.
1015586 GFF lines processed.
Please Install PySam to use the BAM_Reader Class (http://code.google.com/p/pysam/)Error occured when reading beginning of SAM/BAM file.
No module named pysam
[Exception type: ImportError, raised in __init__.py:937]
gary > pip install pysam
Requirement already satisfied (use --upgrade to upgrade): pysam in /Users/gary/anaconda/lib/python2.7/site-packages
gary > pip install pysam --upgrade
Requirement already up-to-date: pysam in /Users/gary/anaconda/lib/python2.7/site-packages
I had a similar problem using the latest version of pysam and HTSeq. I had to go back a version, and use https://pypi.python.org/pypi/pysam/0.8.3 to get it to work again.
I had the same problem but for me the following worked:
sudo pip install pysam
Thanks a lot. However, it doesn't work on my MacBook Pro as the below.
gary > pwd
/Users/gary
gary > sudo pip install pysam
The directory '/Users/gary/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/gary/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: pysam in ./anaconda/lib/python2.7/site-packages
conda install pysam worked for me.
Log in to answer this question.
What does
which htseq-countreport? My guess is that htseq-count isn't using anaconda's python. Anyway, you might just try setting the$PYTHON_PATH.Thanks a lot. My htseq-count on /usr/local/bin/htseq-count. Could you teach me how to set the $PYTHON_PATH? Thanks again.
Hi,
After google, I try to set the
$PYTHON_PATH, but it doesn’t work below. Could you teach me how to set$PYTHON_PATHcorrectly? Many thanks.is your htseq upgraded? I have usually found using this command helps more: