I'm attempting to use htseq-count to get read counts for some *Plasmodium *RNA-seq data. The command line looks as follows:
htseq-count --format=bam --order=pos 3D7_1-1.bam PlasmoDB-28_Pfalciparum3D7.gff
However, when I run the command I get the following error:
Error occured when processing GFF file (line 40 of file PlasmoDB-28_Pfalciparum3D7.gff):
Feature exon_PF3D7_0100100-1 does not contain a 'gene_id' attribute
[Exception type: ValueError, raised in count.py:53]
Is there a way to tell htseq-count to ignore any features that don't have a 'gene_id' attribute or a way to convert the gff I have to a gtf? Any ideas/help much appreciated.
Thanks,
1 answer
Both the GTF and the GFF require "gene_id". You could use a different attribute with --idattr parameter:
GFF attribute to be used as feature ID. Several GFF lines with the same feature ID will be considered as parts of the same feature. The feature ID is used to identity the counts in the output table. The default, suitable for RNA-Seq analysis using an Ensembl GTF file, is gene_id.
First, you need to scan your GFF and see if there is one that makes sense. It's also possible that you will have to modify the file (if different entries have different attributes, for example).
Log in to answer this question.
I have similar issues and have tried the various guides provided.
My GFF file
I tried
it returned
However when I run
it returns
Any possible solution to this? Thanks
So I cant see you gff, but have you tried using Parent instead of gene ID for the -i parameter?