Convert ensembl IDs from dataframe to entrez IDs vector
0
0
Entering edit mode
2.2 years ago
alyyha • 0

I want to convert ensembl IDs in to entrez IDs to perform Ontology Analysis. I need to create a vector of ensembl IDs and it does not work.

library(ChIPpeakAnno) #to use the function convert2EntrezID

library(BSgenome.Athaliana.TAIR.TAIR9) #to get the entrez IDs

#I have a dataframe df of 2 columns: GENE_ID (ensembl IDs) and LFCs.

genes<-df$GENE_ID #to get a vector of gene ids
orgAnn<-BSgenome.Athaliana.TAIR.TAIR9

convert2EntrezID(genes, orgAnn, ID_type="ensembl_gene_id")

Error in as.character.default(x) : 
  no method for coercing this S4 class to a vector
entrez-ID Gene-Ontology Athaliana ChIPpeakAnno • 1.1k views
ADD COMMENT
0
Entering edit mode

gene_ID should be genes in your function.

ADD REPLY
0
Entering edit mode

Yes sorry I wrote wrongly here

ADD REPLY
0
Entering edit mode

are you sure that BSgenome.Athaliana.TAIR.TAIR9 is compatible for use as the orgAnn for convert2EntrezID?

ADD REPLY
0
Entering edit mode

Good point. I wanted to use a standard annotation dataset from Bioconductor, just to see if this converting function was working or not. Where would you recommend to download this annotation dataset?

ADD REPLY
0
Entering edit mode

You probably want to use the A. thaliana bioconductor organism database. BSgenome objects are usually just the genome assembly, whereas organism databases have collections of useful things like various gene name formats and ontologies.

http://bioconductor.org/packages/release/data/annotation/html/org.At.tair.db.html

ADD REPLY
0
Entering edit mode

Upsi. Thank you, I will try that

ADD REPLY

Login before adding your answer.

Traffic: 1102 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6