simon-anders / htseq

HTSeq is a Python library to facilitate processing and analysis of data from high-throughput sequencing (HTS) experiments.
https://htseq.readthedocs.io/en/release_0.11.1/
GNU General Public License v3.0
122 stars 77 forks source link

AttributeError, raised in _HTSeq.pyx:1358 #57

Closed sentausa closed 6 years ago

sentausa commented 6 years ago

Hi simon-anders,

I'm using htseq-count 0.9.1 on conda and I got this error when I tried to use it on a sorted, indexed bam file (using bowtie2 2.3.0 with --sensitive-local --trim5 10 followed by samtools 1.7 view -1 -bS and samtools sort, then samtools index):

$htseq-count -f bam -r pos -t gene -i ID -s no sample.sort.bam genome.gff 5337 GFF lines processed. 100000 SAM alignment record pairs processed. 200000 SAM alignment record pairs processed. Error occured when processing SAM input (record #416636 in file sample.sort.bam): 'NoneType' object has no attribute 'encode' [Exception type: AttributeError, raised in _HTSeq.pyx:1358]

It is similar to this unanswered question on Biostars.

I will appreciate any help on this.

Thanks.

iosonofabio commented 6 years ago

Hi,

First thing please update htseq, thanks Fabio

On June 25, 2018 3:36:44 AM PDT, sentausa notifications@github.com wrote:

Hi simon-anders,

I'm using htseq-count 0.9.1 on conda and I got this error when I tried to use it on a sorted, indexed bam file (using bowtie2 2.3.0 with --sensitive-local --trim5 10 followed by samtools 1.7 view -1 -bS and samtools sort, then samtools index):

$htseq-count -f bam -r pos -t gene -i ID -s no sample.sort.bam genome.gff 5337 GFF lines processed. 100000 SAM alignment record pairs processed. 200000 SAM alignment record pairs processed. Error occured when processing SAM input (record #416636 in file sample.sort.bam): 'NoneType' object has no attribute 'encode' [Exception type: AttributeError, raised in _HTSeq.pyx:1358]

It is similar to this unanswered question on Biostars.

I will appreciate any help on this.

Thanks.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/simon-anders/htseq/issues/57

sentausa commented 6 years ago

Hi Fabio, Thanks for answering. Unfortunately, I couldn't find htseq higher than 0.9.1 on conda. No hope?

Anyway, your latest release is 0.9.1, right?

Thanks again

iosonofabio commented 6 years ago

Hi,

Use pip Fabio

On June 26, 2018 1:56:59 AM PDT, sentausa notifications@github.com wrote:

Hi Fabio, Thanks for answering. Unfortunately, I couldn't find htseq higher than 0.9.1 on conda. No hope?

Thanks again

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/simon-anders/htseq/issues/57#issuecomment-400233866

sentausa commented 6 years ago

Hi again,

This is what showed up when I typed pip install HTSeq:

Requirement already satisfied: HTSeq in /Share/conda_envs/tsu/lib/python3.6/site-packages Requirement already satisfied: numpy in /Share/conda_envs/tsu/lib/python3.6/site-packages (from HTSeq) Requirement already satisfied: pysam>=0.9.0 in /Share/conda_envs/tsu/lib/python3.6/site-packages (from HTSeq)

Thanks again.

iosonofabio commented 6 years ago

Please learn your pip:

pip install HTSeq==0.10.0

On June 27, 2018 12:19:26 AM PDT, sentausa notifications@github.com wrote:

Hi again,

This is what showed up when I typed pip install HTSeq:

Requirement already satisfied: HTSeq in /Share/conda_envs/tsu/lib/python3.6/site-packages Requirement already satisfied: numpy in /Share/conda_envs/tsu/lib/python3.6/site-packages (from HTSeq) Requirement already satisfied: pysam>=0.9.0 in /Share/conda_envs/tsu/lib/python3.6/site-packages (from HTSeq)

Thanks again.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/simon-anders/htseq/issues/57#issuecomment-400568754

iosonofabio commented 6 years ago

No answer for a month, I assume this was an issue of using an obsolete version of htseq. Feel free to reopen if still relevant.