I am looking for a method in R to check a list of accession numbers against annotation databases for 19 species. In theory the code below should extract the ENTREZID, SYMBOL, GENENAME and match the mapped results with the results file via the ACCNUM
mapped <- foreach(i = dbMap$dbName) %do% select(i, as.character(ResultsFile$ACCNUM), c("ENTREZID","SYMBOL","GENENAME"), "ACCNUM")
However select is throwing the error:
Error in select(i, as.character(ResultsFile$ACCNUM), c("ENTREZID", "SYMBOL", : task 1 failed - "unable to find an inherited method for function ‘select’ for signature ‘"factor"’
This is because i is a factor with 19 levels (one for each database). How could I coerce this to work and produce the desired results?
Thanks for your time and help,