Question: HTseq does not generate any counts file
0
gravatar for archisman
5 months ago by
archisman0
archisman0 wrote:

Here is my code for generating counts from the BAM file.

bsub -J "htseq-count" htseq-count \
-e /scratch/workspace/rnaseq/counts/err.txt \
-o /scratch/workspace/rnaseq/counts/log.out \
-f bam \
-r name \
-s no \
-a 10 \
-t exon \
-i gene_id \
-m intersection-nonempty \
/scratch/workspace/rnaseq/bam/Aligned.sortedByCoord.out.bam \
/scratch/workspace/rnaseq/refs/gencode.v22.annotation.gtf > /scratch/workspace/rnaseq/counts/SRR3088529_counts.txt

But it only generates a txt file which have only one line of information telling the job number and time that I had submitted. Here is the error file.

Traceback (most recent call last):
  File "/scratch/shilpeelab/.local/bin/htseq-count", line 4, in <module>
    __import__('pkg_resources').run_script('HTSeq==0.11.1', 'htseq-count')
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pysam>=0.9.0

Based on this can you please help me as I am a newbie in this and could not figure out the problem. Thank you.

rna-seq htseq-count • 173 views
ADD COMMENTlink modified 5 months ago by Ido Tamir5.1k • written 5 months ago by archisman0

You need pysam version 0.9.0 or higher as indicated in the error message. Install it. Instead of show htseq-count you can also use featureCounts which comes as a precompiled binary and is notably faster.

ADD REPLYlink written 5 months ago by ATpoint36k
0
gravatar for Ido Tamir
5 months ago by
Ido Tamir5.1k
Austria
Ido Tamir5.1k wrote:

You also need pysam on the PYTHONPATH. Normally it should have been installed together with HTSeq-count automatically. Maybe more stuff is broken ... If you work on your own computer you could do this with e.g. pip install pysam https://pypi.org/project/pysam/ . You could also start working with conda https://docs.conda.io/en/latest/ . If its on a shared computing thing you have to ask your adminstrator to fix this for you or you do it with e.g. conda

ADD COMMENTlink modified 5 months ago • written 5 months ago by Ido Tamir5.1k

Thanks for the reply. I just install pysam today. But it still does not work. I think I have to as my administrator to find the development library for the python.

ADD REPLYlink written 5 months ago by archisman0

I guess you use a different python than HTseq count. Best and easiest is you switch to conda and create your own environment independent of the administrators.

ADD REPLYlink written 5 months ago by Ido Tamir5.1k

Can you please guide me through how to do that?

ADD REPLYlink written 5 months ago by archisman0
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: 1635 users visited in the last hour