problem of getting count matrix in featurecounts of Rsubread package
2
0
Entering edit mode
mmurshed • 0
@mmurshed-15066
Last seen 6.8 years ago

i just created 16 BAM file by using Rsubread packege. When i run the featurecounts then I only get the total counts for each of the BAM file but not getting the count matrix. 
when i use fc$counts it shows 
DAB1.BAM DAB2.BAM ......... DAB16.BAM

15969703  1760659  ...............1505869

 

but i am not getting any count matrix for each gene. 

can anyone help me with this.
Thanks,
Monzur Murshed

rnaseq rsubread featurecounts • 1.8k views
ADD COMMENT
0
Entering edit mode

You need to show the code you used.

ADD REPLY
0
Entering edit mode

i am using this codes:
 library(Rsubread)
> a<-list.files(pattern="*.BAM")
> a
 [1] "DAB1.BAM"  "DAB10.BAM" "DAB11.BAM" "DAB12.BAM" "DAB13.BAM" "DAB14.BAM"
 [7] "DAB15.BAM" "DAB16.BAM" "DAB2.BAM"  "DAB3.BAM"  "DAB4.BAM"  "DAB5.BAM"
[13] "DAB6.BAM"  "DAB7.BAM"  "DAB8.BAM"  "DAB9.BAM"

fc<-featureCounts(a,annot.ext="C_albicans_subset.gff",isGTFAnnotationFile=TRUE,GTF.featureType="exon",GTF.attrType="gene_id")

when i run this code it shows some warning 
 

Warning: failed to find the gene identifier attribute in the 9th column of the provided GTF file.
The specified gene identifier attribute is 'gene_id'
The attributes included in your GTF annotation are 'ID=C1_00010W_A-T-E1;Parent=C1_00010W_A-T'

||    Features : 13831                                                        ||
||    Meta-features : 1                                                       ||
||    Chromosomes/contigs : 17

when i use this command i get only this out put not any count matrix

> fc$counts
     DAB1.BAM DAB10.BAM DAB11.BAM DAB12.BAM DAB13.BAM DAB14.BAM DAB15.BAM
<NA> 15969707  16514867  16255504  15581557  15506982  16257617  16074052
     DAB16.BAM DAB2.BAM DAB3.BAM DAB4.BAM DAB5.BAM DAB6.BAM DAB7.BAM DAB8.BAM
<NA>  15867891 16261658 12829747 16252618 15411383 14922696 15855204 16096131
     DAB9.BAM
<NA> 18413643
>

 

ADD REPLY
1
Entering edit mode
@gordon-smyth
Last seen 4 hours ago
WEHI, Melbourne, Australia

Well, the warning message tells you what the problem is. Your GTF file doesn't contain gene identifiers, so featureCounts has been forced to treat everything as belonging to the same gene. Hence the output has only one row of counts.

So it would seem that you need to fix your GTF file.

ADD COMMENT
0
Entering edit mode
Wei Shi ★ 3.6k
@wei-shi-2183
Last seen 1 day ago
Australia/Melbourne

As Gordon pointed out, your GTF file does not contain gene identifier attribute gene_id. The gene identifier attributes provided in your GTF file include ID and Parent. I think you should set GTF.attrType="ID" to get gene-wise counts.

ADD COMMENT

Login before adding your answer.

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