source("http://bioconductor.org/biocLite.R") biocLite("biomaRt") biocLite("GenomeGraphs") library("annotate") library("hgu95av2.db") library("GO.db") vignette(package="annotate") vignette(topic="GOusage", package="annotate") library(help="hgu95av2.db") # what's in there? get("F5",hgu95av2ALIAS2PROBE) get("AGT", hgu95av2ALIAS2PROBE) get("35245_at",hgu95av2GO) get("GO:0007155",hgu95av2GO2PROBE) get("TP53", revmap(hgu95av2SYMBOL)) #reversing a map get("1939_at", hgu95av2GO) get("1939_at", hgu95av2MAP) get("17p13.1", revmap(hgu95av2MAP)) library("biomaRt") human = useMart("ensembl", dataset = "hsapiens_gene_ensembl") mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl") listAttributes(human)[,"name"] # a lot to read through hh <- listAttributes(human)[,"name"] hh[grep("id", hh)] # grep() does regular expression matching getBM(attributes=c("ensembl_gene_id", "fugu_homolog_ensembl_peptide"), filters="hgnc_symbol",values="F5",mart=human) listFilters(human) getBM(attributes="hgnc_symbol", filters="go",values="GO:0007155", mart=human) getBM(attributes=c("chromosome_name","start_position","end_position"), filters="mgi_symbol",values="Cxcl5",mart=mouse) listAttributes(mouse) # Q3 getLDS(attributesL=c("affy_mg_u74a"), martL=mouse, mart=human, filters="hgnc_symbol", values="F5", attributes="hgnc_symbol")