Entering edit mode
7.9 years ago
AB
▴
360
Hi everyone,
I am trying to get the genes corresponding to GO id from a data table in R shiny. So everytime a row is selected, the program should return a list of genes for that GO id. I wrote the following code.
s <- input$table4_rows_selected #select row
d <- datasetInput8() #get data table
goid <- d[s, , drop = FALSE]
goid <- as.character(goid$GO_id)
ensembl = useMart("ensembl",dataset="mmusculus_gene_ensembl")
gene.data = getBM(attributes=c('ensembl_gene_id', 'go_id', 'entrezgene'),filters = 'go_id', values =goid, mart = ensembl)
It works if I directly give the ID to values argument but the above code doesn't seem to be working. I get this error
Warning: Error in getBM: Values argument contains no data.
What am i doing wrong here ? Any help is appreciated.
Thanks