How to do it...

Getting gene ontology information can be done using the following steps:

  1. Make connections to the Ensembl BioMart and find the appropriate attributes and filters:
library(biomaRt)

ensembl_connection <- useMart(biomart = "ENSEMBL_MART_ENSEMBL")
listDatasets(ensembl_connection)

data_set_connection <- useMart("hsapiens_gene_ensembl", biomart = "ENSEMBL_MART_ENSEMBL")

att <- listAttributes(data_set_connection)
fil <- listFilters(data_set_connection)

  1. Get a list of genes and, using their IDs, get their GO annotations:
genes <- getBM(attributes = c("ensembl_gene_id"), filters = c("chromosomal_region"), value = c("1:200:2000000:1"), mart = data_set_connection)

go_ids <- getBM(attributes = c("go_id", "goslim_goa_description"), filters = c("ensembl_gene_id"), values = genes$ensembl_gene_id, mart = data_set_connection )

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.144.170