Search
Question: DEXSeq - dexseq_count.py issue
0
gravatar for marija.durdevic
3 months ago by
marija.durdevic0 wrote:

Hi all,

I wanted to use dexseq_count for quantification, but I got strange error:

Fatal error: Exit code 1 ()
Traceback (most recent call last):
  File "dexseq_count.py", line 102, in 
    features[f.iv] += f
  File "python3/src/HTSeq/_HTSeq.pyx", line 451, in HTSeq._HTSeq.ChromVector.__iadd__
  File "python3/src/HTSeq/_HTSeq.pyx", line 466, in HTSeq._HTSeq.ChromVector.apply
  File "python3/src/HTSeq/_HTSeq.pyx", line 449, in HTSeq._HTSeq.ChromVector.__iadd__.addval
TypeError: unhashable type: 'GenomicFeature'

The gtf file is prepared with dexseq. Any idea what colud be wrong?

Thanks in advance,

Marija

ADD COMMENTlink modified 8 weeks ago by hazards0 • written 3 months ago by marija.durdevic0
1

Hi Marija. One quick question, are you using python 3.4 or above?

ADD REPLYlink written 3 months ago by Alejandro Reyes1.5k

Hi Alejandro,

It's Python 3.6.4. I installed DEXSeq over conda. Could that be the problem?

Thanks,

Marija

 

ADD REPLYlink written 3 months ago by marija.durdevic0

I am not sure yet. Sorry for the multiple questions, but would you mind posting the first 100 lines of your gtf file? 

ADD REPLYlink written 3 months ago by Alejandro Reyes1.5k

Sure & thanks for your help :)

Seqname Source Feature Start End Score Strand Frame Attributes
AERX01071043.1 dexseq_prepare_annotation.py aggregate_gene 8384 9414 . - . gene_id "MSTRG.1"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 8384 9414 . - . gene_id "MSTRG.1"; transcripts "MSTRG.1.1"; exonic_part_number "001"
AERX01071043.1 dexseq_prepare_annotation.py aggregate_gene 9773 14866 . - . gene_id "MSTRG.13"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 9773 10155 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "001"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 10310 10354 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "002"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 10568 10678 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "003"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 10767 10918 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "004"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 11019 11303 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "005"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 11386 11655 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "006"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 11770 11902 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "007"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 12041 12189 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "008"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 14552 14594 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "009"
AERX01071043.1 dexseq_prepare_annotation.py exonic_part 14844 14866 . - . gene_id "MSTRG.13"; transcripts "MSTRG.13.1"; exonic_part_number "010"
AERX01071043.1 dexseq_prepare_annotation.py aggregate_gene 16324 18991 . + . gene_id "MSTRG.5"
ADD REPLYlink modified 3 months ago • written 3 months ago by marija.durdevic0

I'm still not sure what is going on. Would you mind giving me access to the original gtf file to check what is going on?

ADD REPLYlink written 3 months ago by Alejandro Reyes1.5k

Sure! That's my original gtf file and this is file after DEXSeq prepare.

 

Thanks,

Marija

ADD REPLYlink written 3 months ago by marija.durdevic0

Sorry, I still can't reproduce the error message. How are you invoking the dexseq_count.py script?

ADD REPLYlink written 3 months ago by Alejandro Reyes1.5k
Yes, I am using dexseq_count.py:
dexseq_count.py -f bam -p yes -s reverse -a 10 -r pos my_gtf_file.gtf data.bam output
Thanks for your help. Best, Marija
ADD REPLYlink written 12 weeks ago by marija.durdevic0

Not sure if still relevant. I had the same error when running in Python3.6 environment but was okay when using Python2.7 environment. Muxin

ADD REPLYlink written 7 days ago by sfd77270
0
gravatar for a.brooks
9 weeks ago by
a.brooks0
a.brooks0 wrote:

Hi

Did you fix this problem?
I have exactly the same error, but only when I run the script through Galaxy. Running through command line seems to work.

Thanks

Tony

ADD COMMENTlink written 9 weeks ago by a.brooks0

I have been unable to solve this issue because I can't reproduce the error. But this might be a good start! Are you running the same versions of python and HTSeq through the command line and through Galaxy?

ADD REPLYlink written 9 weeks ago by Alejandro Reyes1.5k

Hi Tony,

Since you can run it through command line (but not in Galaxy), it would help now to know your environment (python version, htseq version, pysam version, at least).

Thanks

Christophe

ADD REPLYlink written 20 days ago by drosofff0
0
gravatar for hazards
8 weeks ago by
hazards0
hazards0 wrote:

I believe I have the same issue.

I see no one has posted any solutions. Any one had a similar issue?

I am attempting to run a DEXseq python script  to count  reads from a STAR alignment to the human genome. I am trying to a “docker” procedure to setup the environment and execute the program.

 

docker pull quay.io/biocontainers/bioconductor-dexseq:1.24.0--py36r3.4.1_1

 

 

Here is the docker result:

 

docker run -it -v ~/Meissner-Tsao-April2018:/data musc/dexseq dexseq_count.py data/Homo_sapiens.GRCh38.92_DEXSeq.gff data/STAR_aligned_5021_S20_L005Aligned.sortedByCoord.out.bam data/STAR_aligned_5021_S20_L005_STAR_dexseq_count_fpsr.txt -f bam -p yes -s no -r pos

Traceback (most recent call last):

  File "/usr/local/bin/dexseq_count.py", line 98, in <module>

    features[f.iv] += f

  File "python3/src/HTSeq/_HTSeq.pyx", line 451, in HTSeq._HTSeq.ChromVector.__iadd__

  File "python3/src/HTSeq/_HTSeq.pyx", line 466, in HTSeq._HTSeq.ChromVector.apply

  File "python3/src/HTSeq/_HTSeq.pyx", line 449, in HTSeq._HTSeq.ChromVector.__iadd__.addval

TypeError: unhashable type: 'GenomicFeature'

The GFF was prepared ash show here

docker run -it -v ~/Meissner-Tsao-April2018:/data musc/dexseq dexseq_prepare_annotation.pydata/Homo_sapiens.GRCh38.92.gtf data/Homo_sapiens.GRCh38.92_DEXSeq.gff

The python version in the docker is

docker run -it -v ~/Meissner-Tsao-April2018:/data musc/dexseq python -V

Python 3.6.4

ADD COMMENTlink written 8 weeks ago by hazards0

I am working with hazards who posted above, and wanted to provide some details.

We have tested with two of the quay dexseq images.

1.24.0--py36r3.4.1_1

1.24.0--py27r3.4.1_1

Both seemed to work with the annotation script.

3.6 failed on the count script. 2.7 count appears to be working with the output from 3.6 annotation.

 

I created a dockerfile which inherited from each of them with  the folloiwng lines.


from quay.io/biocontainers/bioconductor-dexseq:VERSION

RUN PATH=/usr/local/lib/R/library/DEXSeq/python_scripts:$PATH

RUN pip install HTSeq\

     numpy \

     pysam

both seem to have the same pip packeges installed...


certifi==2017.11.5

HTSeq==0.9.1

numpy==1.14.2

pysam==0.14.1

 

 

ADD REPLYlink modified 8 weeks ago • written 8 weeks ago by glen0
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.2.0
Traffic: 188 users visited in the last hour