This is a test version of Biostars. For the public version, visit https://www.biostars.org.
htseq-count returns : does not contain a 'gene' attribute

Dear BIOSTAR community,

I'm trying to make count matrix with htseq-count,

htseq-count -s yes -t gene -i gene 01.sorted.sam annotation_cattle.gff > 01.txt

even with --idattr=gene , it returns error:

Error processing GFF file (line 1864255 of file annotation_cattle.gff):
  Feature gene-D1Y31_gp1 does not contain a 'gene' attribute
  [Exception type: ValueError, raised in features.py:329]

The 1864255 line of my gff file is:

NC_039210.1 RefSeq  gene    1095    8093    .   +   .   ID=gene-D1Y31_gp1;Dbxref=GeneID:37627025;Name=D1Y31_gp1;gbkey=Gene;gene_biotype=protein_coding;locus_tag=D1Y31_gp1

Is there any solution that maybe I could solve it?

Best regards

htseq-count rna-seq

1 answer

It solved by -i ID, and also I'm thinking what would happen if I enter gene name by myself in that line?

Log in to answer this question.