error while using featureCounts
1
0
Entering edit mode
7.9 years ago
komal.yasmin ▴ 10

I am using featureCounts for analysis of my RNA-seq data. I have used gtf file from ensemble for this.I keep on getting the following error report from featurecounts: Failed to open the annotation file Drosophila_melanogaster.gtf or its format is incorrect, or it contains no 'exon' features.

although I do see the feature when I read the file in text editor. I am using the following command:

./featureCounts -p -t exon -g gene_id -a Drosophila_melanogaster.chr.gtf -o counts.txt S2I2-n_sorted.bam what can I do to get feature count data? kindly help

RNA-Seq • 8.1k views
ADD COMMENT
1
Entering edit mode

Are you sure your genome and gtf file are the same version?

The error gives three options, and since you have exons in the file there are two options left. Or your file cannot be opened (did you check chmod?), or the format is not correct.

ADD REPLY
0
Entering edit mode

Did you get your genome and the GTF from two different sources( e.g. UCSC, Ensembl). If so, you almost certainly have chromosome names that do not match between the genome and the GTF. This has been noted by @b.nota here and by @Devon in the other thread.

You could edit the chromosome names in your GTF to match the ones in your BAM or obtain a corresponding GTF file from the source where you got your reference genome from. That should fix this problem with htseq-count and featureCounts.

ADD REPLY
0
Entering edit mode

Yes, I was using gtf files from different sources, however now that i am using the same source (ucsc genome browser), feature counts is still not working. It still gives the same error Failed to open the annotation file ucsc.gtf, or its format is incorrect, or it contains no 'exon' features.

ADD REPLY
0
Entering edit mode

Yeah, but your bam files also need to have the same format.

There is a difference in how they name chromosomes.

ADD REPLY
0
Entering edit mode

the bam files and the gtf file are from the same source (UCSC),but feature counts still gives me the same error . ht-seq is working fine with these files but its giving low read counts and that's why I want to get count data from featurecounts as well

ADD REPLY
0
Entering edit mode

How many reads did the original sample file have? What do the stats on the alignment (BAM) look like? It is possible that you have low alignment % to begin with which may be reflected in the low counts.

ADD REPLY
0
Entering edit mode
7.9 years ago
komal.yasmin ▴ 10

Thank you for your replies,

I got this output from samtools flagstat: 16617586 + 0 in total (QC-passed reads + QC-failed reads) 0 + 0 duplicates 16617586 + 0 mapped (100.00%:-nan%)

16617586 + 0 paired in sequencing

9157658 + 0 read1

7459928 + 0 read2

13174074 + 0 properly paired (79.28%:-nan%)

14241966 + 0 with itself and mate mapped

2375620 + 0 singletons (14.30%:-nan%)

582846 + 0 with mate mapped to a different chr

1126 + 0 with mate mapped to a different chr (mapQ>=5)

does this look like an ok alignment?

ADD COMMENT

Login before adding your answer.

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