6.8 years ago by
You didn't mention what organism(s) you are interested in, and the annotation state of a genome can be heavily organism dependent, however, if you want to stick with R and the gene ontology you could use the annotation packages from bioconductor to map between gene ids and GO terms. This assumes they have one for your organism. They have names like org.[species abbreviation].eg.db; for instance fly would be: org.Dm.eg.db. They are basically data structures with all kinds of ID and chromosomal location mappings. With the GO ids in hand you could then use the GO.db package to specifically map to "Transcription Factor".
Another way to map between your genes and GO ids, and various other kinds of annotation in R would be to use the biomaRt library (assumes there's a BioMart, such as ensembl, etc., for your organism).