<p>Maybe the contig names in your BAM files don't match those in the GFF file? Ensembl uses contig names like <code>1</code>, some other reference sources use <code>chr1</code>. </p>

<p>Generally, for ensembl GFF files, HTSeq's default value for idattr should be fine though.</p>

CC BY-SA 4.0
2020-03-06T10:11:13.900Z
2020-03-06T10:11:13.900Z
DavyCats
<p>(Ported from stack overflow)</p>

<p>I'm trying to summarize gene count using htseq-count; and it's returning 0 counts at every gene. I'm not sure what I'm doing wrong; I think it has to do with the gene flag I'm using. 
I've tried using the GTF for Arabidopsis TAIR 10: which I got from: <a href="ftp://ftp.ensemblgenomes.org/pub/release-46/plants/gtf/arabidopsis_thaliana/Arabidopsis_thaliana.TAIR10.46.gtf.gz" rel="nofollow noreferrer">ftp://ftp.ensemblgenomes.org/pub/release-46/plants/gtf/arabidopsis_thaliana/Arabidopsis_thaliana.TAIR10.46.gtf.gz</a> as well as the GFF file available on Araport.</p>

<p>I'm using various BAM files I know to have gene expression values.</p>

<p>I've tried both locally and on galaxy
The local commands I've tried so far are:</p>

<pre><code>python3 -m HTSeq.scripts.count --idattr=gene_id #bam #gtf &gt; summary.txt
python3 -m HTSeq.scripts.count -i gene_id #bam #gff &gt; summary.txt
python3 -m HTSeq.scripts.count -i locus_tag #bam #gff &gt; summary.txt
python3 -m HTSeq.scripts.count -i ID #bam #gff &gt; summary.txt
python3 -m HTSeq.scripts.count -i SeqID #bam #gff &gt; summary.txt
python3 -m HTSeq.scripts.count -i Parent #bam #gff &gt; summary.txt
</code></pre>

<p>I've done the same on galaxy; inputing the -i value in.</p>

<p>Any help as to where I'm going wrong would be great.</p>

<p>Thanks!</p>

CC BY-SA 4.0
2020-03-06T14:09:05.800Z
hey @sdshinghal, check a few things. 1. ensure bam file is ok (you can look at it), 2. like the answer below, check your gtf matches the reference genome
StupidWolf
<sam><gene><gene-expression><gff>
HTSeq-count is returning 0 for every gene, instead of expression value
# HTSeq-count is returning 0 for every gene, instead of expression value

(Asked by: username_0 on 2020-03-06)

(Ported from stack overflow)
I'm trying to summarize gene count using htseq-count; and it's returning 0 counts at every gene. I'm not sure what I'm doing wrong; I think it has to do with the gene flag I'm using. 
I've tried using the GTF for Arabidopsis TAIR 10: which I got from: ftp://ftp.ensemblgenomes.org/pub/release-46/plants/gtf/arabidopsis_thaliana/Arabidopsis_thaliana.TAIR10.46.gtf.gz as well as the GFF file available on Araport.
I'm using various BAM files I know to have gene expression values.
I've tried both locally and on galaxy
The local commands I've tried so far are:
python3 -m HTSeq.scripts.count --idattr=gene_id #bam #gtf > summary.txt
python3 -m HTSeq.scripts.count -i gene_id #bam #gff > summary.txt
python3 -m HTSeq.scripts.count -i locus_tag #bam #gff > summary.txt
python3 -m HTSeq.scripts.count -i ID #bam #gff > summary.txt
python3 -m HTSeq.scripts.count -i SeqID #bam #gff > summary.txt
python3 -m HTSeq.scripts.count -i Parent #bam #gff > summary.txt

I've done the same on galaxy; inputing the -i value in.
Any help as to where I'm going wrong would be great.
Thanks!

**Tags:** sam, gene, gene-expression, gff
> **Comments:**
> **username_1**: hey @sdshinghal, check a few things. 1. ensure bam file is ok (you can look at it), 2. like the answer below, check your gtf matches the reference genome  

---

## 1 answers

### Answer by username_2 on 2020-03-06. Score: 1

Maybe the contig names in your BAM files don't match those in the GFF file? Ensembl uses contig names like `1`, some other reference sources use `chr1`.

Generally, for ensembl GFF files, HTSeq's default value for idattr should be fine though.


---

