Question: Explainnation of featureCounts in-built annotation?
gravatar for Jack
21 months ago by
Jack0 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 20 months ago by Wei Shi3.1k • written 21 months ago by Jack0
Answer: Explainnation of featureCounts in-built annotation?
gravatar for Wei Shi
20 months ago by
Wei Shi3.1k
Wei Shi3.1k 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 20 months ago by Wei Shi3.1k
Please log in to add an answer.


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