DEXSeq - dexseq_count.py issue
2
0
Entering edit mode
@marijadurdevic-15182
Last seen 6.8 years ago

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

dexseq dexseq_count genomicfeatures • 3.7k views
ADD COMMENT
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Hi Alejandro,

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

Thanks,

Marija

 

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

 

Thanks,

Marija

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
a.brooks • 0
@abrooks-15596
Last seen 6.7 years ago

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
hazards • 0
@hazards-11550
Last seen 6.7 years ago

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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

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