Question: HTseq Pysam error
0
gravatar for Ambika
21 months ago by
Ambika30
United States/Auburn/Auburn University
Ambika30 wrote:

Hi everyone I am getting pysam error while running the htseq script even if I installed it. I am using both htseq and pysam in anaconda version.

**Requirement already satisfied: htseq in /mnt/homeapps/apps/dmc/apps/anaconda_2-4.2.0_cent/lib/python2.7/site-packages
Requirement already satisfied: pysam in /mnt/homeapps/apps/dmc/apps/anaconda_2-4.2.0_cent/lib/python2.7/site-packages
Requirement already satisfied: numpy in /mnt/homeapps/apps/dmc/apps/anaconda_2-4.2.0_cent/lib/python2.7/site-packages (from htseq)
52139 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.
  libbz2.so.1.0: cannot open shared object file: No such file or directory
  [Exception type: ImportError, raised in __init__.py:5]**

Please Help, Thank you,

Ambika

rna-seq • 1.3k views
ADD COMMENTlink modified 21 months ago by Devon Ryan91k • written 21 months ago by Ambika30

Are you using the latest versions? How did you install htseq-count?

ADD REPLYlink written 21 months ago by WouterDeCoster40k

simply conda install htseq.

ADD REPLYlink written 21 months ago by Ambika30

How did you execute htseq-counts? Please be as informative as possible. Which versions are you using?

ADD REPLYlink written 21 months ago by WouterDeCoster40k

The error is about "libbz2.so.1.0: cannot open shared object file". Are you sure that is not present on your system? What kind of OS is your server running/is it is a cluster?

ADD REPLYlink written 21 months ago by genomax69k

I'm not sure what the primary error is:

Please Install PySam to use the BAM_Reader Class

smells like outdated pysam to me.

Please post the output of:

python -c "import pysam ; print(pysam.__version__)"
ADD REPLYlink written 21 months ago by WouterDeCoster40k

WouterDeCoster and Genomax

My htseq version is 0.9.1. pysam version is 0.11.2.2 my script for htseq is : htseq-count -m union -f bam -r name -t CDS accepted_hits_sorted_1.bam my.gtf > counts.file

the output of python -c "import pysam ; print(pysam.__version__)" is an error:

_File "<string>", line 1, in <module> File "/opt/asn/apps/anaconda_2-4.2.0_cent/lib/python2.7/site-packages/pysam/__init__.py", line 5, in <module> from pysam.libchtslib import * ImportError: libbz2.so.1.0: cannot open shared object file: No such file or directory_

I have no idea if that "libbz2.so.1.0" is in my system but I am getting that error and I am using a cluster OS.

sorry, I could not reply fast because of new user limit error.

ADD REPLYlink modified 21 months ago • written 21 months ago by Ambika30

Genomax,

When I did locate libbz2 it gave me following path

/usr/lib/libbz2.so.1

/usr/lib/libbz2.so.1.0.6

/usr/lib64/libbz2.so

/usr/lib64/libbz2.so.1

/usr/lib64/libbz2.so.1.0.6

ADD REPLYlink written 21 months ago by Ambika30
0
gravatar for Devon Ryan
21 months ago by
Devon Ryan91k
Freiburg, Germany
Devon Ryan91k wrote:

You presumably don't have your channel orders set correctly. Ensure that the order is:

  • bioconda
  • conda-forge
  • r (this isn't needed in this case)
  • defaults

The default channel must be the last one or you'll see this behavior. The default channel has a LOT of subpar recipes, which can be avoided with conda-forge. See also this github issue, which is identical.

As an aside, you'll want to use featureCounts from subRead instead, it's much faster.

ADD COMMENTlink written 21 months ago by Devon Ryan91k

Devon Ryan,

I dont know if I did it in a proper way but what I did was:

**module load anaconda

conda install --override-channels -c conda-forge bzip2

conda create --clone biopython --name biopython

conda install htseq

conda install pysam

htseq-count -m union -f bam -r name -t CDS accepted_hits_sorted_1.bam my.gtf > counts.file**

I am not getting this. I would like to go the easy way but the problem is I am working on a cluster system and I don't see that program in there.

ADD REPLYlink modified 21 months ago • written 21 months ago by Ambika30
1

You don't need your cluster admin to install things for your, particularly when you're already using conda (hint: conda install subread).

ADD REPLYlink written 21 months ago by Devon Ryan91k

Devon Ryan,

Even if I don't do conda install packages I am getting the same error. Is there anything else that I can do?

ADD REPLYlink written 21 months ago by Ambika30

If you get that error regardless then it's likely that you're still using conda, even if you don't mean to.

ADD REPLYlink written 21 months ago by Devon Ryan91k

Are your sys admins not responsive to requests for installation of new software via modules?

Partly using modules and partly locally installed software (in your own area) may lead to strange interactions/failures, especially if your home directory is not accessible on cluster nodes where the jobs run.

ADD REPLYlink written 21 months ago by genomax69k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 932 users visited in the last hour