I am trying to annotate the results output file from Desq2 so it contains gene names and symbols. The RNA-seq count file I have used comes from Dexseq and contains ensembl transcript ID:
I have tried various methods to annotate the results.
1. downloaded annotation from Biomart.
counts = read.delim("3mTA2.txt", header=T, row.names=1)
sample <- read.delim("~/sample.txt")
count.data.set <- DESeqDataSetFromMatrix(countData=counts, colData=sample,design= ~ genotype)
res <- results(dds)
annotation <- read.delim("mouse.annt.txt") # load annotation file from Biomart
res$EnsemblID <- row.names(res)
res <- merge(res, annotation, by = 'EnsemblID', all.x = TRUE)
It adds column to the output file but values are blank.
2. Also used AnnotationDbi
res$symbol <- mapIds(org.Mmu.eg.db,
Error in .testForValidKeys(x, keys, keytype) :
None of the keys entered are valid keys for 'ENSEMBL'. Please use the keys method to see a listing of valid arguments.