Hi,
I am trying to annotate a list of differentially expressed genes output by DESeq2, with ensembl IDs, gene symbols and gene descriptions. I originally aligned and mapped the reads using a .gtf annotation file from NCBI, so the DESeq2 gene list appears to have a list of Entrez gene ID and locus tags as identifiers.
I constructed the biomaRt query below and whilst it runs without error, it returns no hits. This is despite the few genes I have checked on NCBI also having an equivalent ensembl ID.
I have tried reading through the "Accessing Ensembl annotation with biomaRt" file for information but couldn't find the answer I was looking for.
Does anyone have any advice as to how to get my query to work?
Thanks,
Alan
ensembl_nilo <- useMart("ensembl", dataset = "oniloticus_gene_ensembl")
a <- read.delim("Kidney-Allgenes-DESeq2_ID.txt", head=TRUE)
head(a)
# gene
# 1 KEH09_p01
# 2 KEH09_p02
# 3 KEH09_p03
# 4 KEH09_p04
# 5 KEH09_p05
# 6 KEH09_p06
b <- getBM(attributes = c("ensembl_gene_id", "entrezgene_id", "entrezgene_accession"),
filters = "entrezgene_id",
values = a$gene,
mart = ensembl_nilo)
b
# [1] ensembl_gene_id entrezgene_id entrezgene_accession
# <0 rows> (or 0-length row.names)
Cannot help as we do not see the content of
a
but if you just pull a full lookup table with:...then you can inspect it and do merge/left_joins as you like.
Sorry, added an excerpt from my gene name list dataframe.
I think your suggestion will work great but it would be nice to know why my above R code was not working.
Thanks!
Worked it out.
I needed to use "entrezgene_accession" as the filter instead of "entrezgene_id".