I first use the featureCounts in-build annotation (Explainnation of featureCounts in-built annotation?) and get the result.
There are 20454 genes in the results list:
a <- read.table(results_txt, head=TRUE) dim(a)  20454 18
snapshot of the results
Since in the featureCounts in-built annotation results, there are serveral values in "Chr", "Start","End","Strand" annotation for each gene (Explainnation of featureCounts in-built annotation?), what I want to get is the position of each gene. Then I use BioMart to get the annotation. The result is that there are only 17659 corresponding genes. It is not what I exprected. What I exprected was they match each other exactly.
b <- getBM(attributes=c("entrezgene","ensembl_gene_id","external_gene_name","chromosome_name","strand", "start_position","end_position"), filters=c('entrezgene'), values=a$ENTREZID, mart=ensembl) > dim(b)  17659 7
snapshot of the result
Can anyone help me explain the difference?