Question: Explainnation of featureCounts in-built annotation?
gravatar for Claire
27 days ago by
Claire0 wrote:

Hi all,

I use featurecounts first to get the summary of the counts and the annotation, below are the codes:

test<-featureCounts(files="test.bam", annot.inbuilt="mm10", annot.ext=NULL, isGTFAnnotationFile=FALSE, GTF.featureType="exon", GTF.attrType="gene_id", chrAliases=NULL, useMetaFeatures=TRUE,  strandSpecific=1, isPairedEnd=TRUE, requireBothEndsMapped=FALSE, checkFragLength=FALSE, minFragLength=0,maxFragLength=600, countChimericFragments=TRUE, autosort=TRUE,verbose=FALSE)
write.table(x=data.frame(test$annotation[,c("GeneID","Chr","Start","End","Strand","Length")],test$counts,stringsAsFactors=FALSE),file="/home/test-counts.txt", quote=FALSE, sep="\t", row.names = FALSE)


The results are like this:


For the "Chr", "Start","End","Strand" annotation there are serveral values for each gene. Are they the location of  different exons of the same gene?

How can I get the location of the gene(for each geneid there is only one value in the "Chr", "Start","End","Strand") not the exons?

Thank you for your help!




ADD COMMENTlink modified 25 days ago by Wei Shi2.7k • written 27 days ago by Claire0
gravatar for Wei Shi
25 days ago by
Wei Shi2.7k
Wei Shi2.7k wrote:

Yes the annotations are for each exon, not for genes. You can work out the transcriptional start and end positions of genes by using the coordinates of exons belonging to the same gene and the strand information.

An easier way might be to use the getInBuiltAnnotation function in Rsubread. This function returns a data frame in which each row is an exon and columns are annotation data.

ADD COMMENTlink written 25 days ago by Wei Shi2.7k
Please log in to add an answer.


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