Search
Question: problem of getting count matrix in featurecounts of Rsubread package
0
gravatar for mmurshed
4 months ago by
mmurshed0
mmurshed0 wrote:

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

ADD COMMENTlink modified 3 months ago by Wei Shi2.8k • written 4 months ago by mmurshed0

You need to show the code you used.

ADD REPLYlink written 4 months ago by James W. MacDonald46k

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 REPLYlink modified 4 months ago by Gordon Smyth33k • written 4 months ago by mmurshed0
1
gravatar for Gordon Smyth
4 months ago by
Gordon Smyth33k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth33k wrote:

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 COMMENTlink written 4 months ago by Gordon Smyth33k
0
gravatar for Wei Shi
3 months ago by
Wei Shi2.8k
Australia
Wei Shi2.8k wrote:

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 COMMENTlink modified 3 months ago by Gordon Smyth33k • written 3 months ago by Wei Shi2.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 119 users visited in the last hour