class 9

# source('http://bioconductor.org/biocLite.R') biocLite('biomaRt')

library("biomaRt")
listMarts()
##                                  biomart
## 1                                ensembl
## 2                                    snp
## 3                    functional_genomics
## 4                                   vega
## 5                          fungi_mart_21
## 6                    fungi_variations_21
## 7                        metazoa_mart_21
## 8                  metazoa_variations_21
## 9                         plants_mart_21
## 10                  plants_variations_21
## 11                      protists_mart_21
## 12                protists_variations_21
## 13                                   msd
## 14                                  htgt
## 15                              REACTOME
## 16                                 WS220
## 17                               biomart
## 18                                 pride
## 19                      prod-intermart_1
## 20                               unimart
## 21                             biomartDB
## 22                              biblioDB
## 23                    Eurexpress Biomart
## 24                        phytozome_mart
## 25                          HapMap_rel27
## 26                            CosmicMart
## 27                          cildb_all_v2
## 28                          cildb_inp_v2
## 29                           experiments
## 30                          combinations
## 31                           oncomodules
## 32                         gmap_japonica
## 33                europhenomeannotations
## 34                                  ikmc
## 35                 EMAGE gene expression
## 36                 EMAP anatomy ontology
## 37               EMAGE browse repository
## 38                            GermOnline
## 39   Sigenae_Oligo_Annotation_Ensembl_61
## 40 Sigenae Oligo Annotation (Ensembl 59)
## 41 Sigenae Oligo Annotation (Ensembl 56)
## 42                          K562_Gm12878
## 43                             Hsmm_Hmec
## 44                            Pancreas63
## 45                       Public_OBIOMART
## 46                          Public_VITIS
## 47                      Public_VITIS_12x
## 48                            Prod_WHEAT
## 49                        Public_TAIRV10
## 50                          Public_MAIZE
## 51                           Prod_POPLAR
## 52                        Prod_POPLAR_V2
## 53                     Prod_BOTRYTISEDIT
## 54                                 Prod_
## 55                       Prod_SCLEROEDIT
## 56                    Prod_LMACULANSEDIT
## 57                            vb_mart_22
## 58                        vb_snp_mart_22
## 59                            expression
## 60                    ENSEMBL_MART_PLANT
## 61                ENSEMBL_MART_PLANT_SNP
##                                                                                                              version
## 1                                                                                       ENSEMBL GENES 75 (SANGER UK)
## 2                                                                                   ENSEMBL VARIATION 75 (SANGER UK)
## 3                                                                                  ENSEMBL REGULATION 75 (SANGER UK)
## 4                                                                                               VEGA 53  (SANGER UK)
## 5                                                                                          ENSEMBL FUNGI 21 (EBI UK)
## 6                                                                                ENSEMBL FUNGI VARIATION 21 (EBI UK)
## 7                                                                                        ENSEMBL METAZOA 21 (EBI UK)
## 8                                                                              ENSEMBL METAZOA VARIATION 21 (EBI UK)
## 9                                                                                         ENSEMBL PLANTS 21 (EBI UK)
## 10                                                                              ENSEMBL PLANTS VARIATION 21 (EBI UK)
## 11                                                                                      ENSEMBL PROTISTS 21 (EBI UK)
## 12                                                                            ENSEMBL PROTISTS VARIATION 21 (EBI UK)
## 13                                                                                                      MSD (EBI UK)
## 14                                                                           WTSI MOUSE GENETICS PROJECT (SANGER UK)
## 15                                                                                                REACTOME (CSHL US)
## 16                                                                                            WORMBASE 220 (CSHL US)
## 17                                                                                       MGI (JACKSON LABORATORY US)
## 18                                                                                                    PRIDE (EBI UK)
## 19                                                                                                 INTERPRO (EBI UK)
## 20                                                                                                  UNIPROT (EBI UK)
## 21                                                                                   PARAMECIUM GENOME (CNRS FRANCE)
## 22                                                                             PARAMECIUM BIBLIOGRAPHY (CNRS FRANCE)
## 23                                                                                     EUREXPRESS (MRC EDINBURGH UK)
## 24                                                                                            PHYTOZOME (JGI/CIG US)
## 25                                                                                               HAPMAP 27 (NCBI US)
## 26                                                                                                COSMIC (SANGER UK)
## 27                                                              CILDB INPARANOID AND FILTERED BEST HIT (CNRS FRANCE)
## 28                                                                                    CILDB INPARANOID (CNRS FRANCE)
## 29                                                                                               INTOGEN EXPERIMENTS
## 30                                                                                              INTOGEN COMBINATIONS
## 31                                                                                               INTOGEN ONCOMODULES
## 32                                                                        RICE-MAP JAPONICA (PEKING UNIVESITY CHINA)
## 33                                                                                                       EUROPHENOME
## 34                                                                                    IKMC GENES AND PRODUCTS (IKMC)
## 35                                                                                             EMAGE GENE EXPRESSION
## 36                                                                                             EMAP ANATOMY ONTOLOGY
## 37                                                                                           EMAGE BROWSE REPOSITORY
## 38                                                                                                        GERMONLINE
## 39                                                                             SIGENAE OLIGO ANNOTATION (ENSEMBL 61)
## 40                                                                             SIGENAE OLIGO ANNOTATION (ENSEMBL 59)
## 41                                                                             SIGENAE OLIGO ANNOTATION (ENSEMBL 56)
## 42            Predictive models of gene regulation from processed high-throughput epigenomics data: K562 vs. Gm12878
## 43               Predictive models of gene regulation from processed high-throughput epigenomics data: Hsmm vs. Hmec
## 44                                                        PANCREATIC EXPRESSION DATABASE (BARTS CANCER INSTITUTE UK)
## 45 Genetic maps (markers, Qtls), Polymorphisms (snps, genes), Genetic and Phenotype resources with Genes annotations
## 46                                          Grapevine 8x, stuctural annotation with Genetic maps (genetic markers..)
## 47                          Grapevine 12x, stuctural and functional annotation with Genetic maps (genetic markers..)
## 48                        Wheat, stuctural annotation with Genetic maps (genetic markers..) and Polymorphisms (snps)
## 49                                                         Arabidopsis Thaliana TAIRV10, genes functional annotation
## 50                                                                       Zea mays ZmB73, genes functional annotation
## 51                                                                  Populus trichocarpa, genes functional annotation
## 52                                                             Populus trichocarpa, genes functional annotation V2.0
## 53                                                                 Botrytis cinerea T4, genes functional annotation 
## 54                                                              Botrytis cinerea B0510, genes functional annotation 
## 55                                                            Sclerotinia sclerotiorum, genes functional annotation 
## 56                                                               Leptosphaeria maculans, genes functional annotation
## 57                                                                                                  VectorBase Genes
## 58                                                                                              VectorBase Variation
## 59                                                                                             VectorBase Expression
## 60                                                                        GRAMENE 40 ENSEMBL GENES (CSHL/CORNELL US)
## 61                                                                            GRAMENE 40 VARIATION (CSHL/CORNELL US)
ensembl = useMart("ensembl")
listDatasets(ensembl)
##                           dataset
## 1          oanatinus_gene_ensembl
## 2         cporcellus_gene_ensembl
## 3         gaculeatus_gene_ensembl
## 4          lafricana_gene_ensembl
## 5  itridecemlineatus_gene_ensembl
## 6         choffmanni_gene_ensembl
## 7          csavignyi_gene_ensembl
## 8             fcatus_gene_ensembl
## 9        rnorvegicus_gene_ensembl
## 10         psinensis_gene_ensembl
## 11          cjacchus_gene_ensembl
## 12        ttruncatus_gene_ensembl
## 13       scerevisiae_gene_ensembl
## 14          celegans_gene_ensembl
## 15        oniloticus_gene_ensembl
## 16         trubripes_gene_ensembl
## 17        amexicanus_gene_ensembl
## 18          pmarinus_gene_ensembl
## 19        eeuropaeus_gene_ensembl
## 20       falbicollis_gene_ensembl
## 21      ptroglodytes_gene_ensembl
## 22         etelfairi_gene_ensembl
## 23     cintestinalis_gene_ensembl
## 24       nleucogenys_gene_ensembl
## 25           sscrofa_gene_ensembl
## 26        ocuniculus_gene_ensembl
## 27     dnovemcinctus_gene_ensembl
## 28         pcapensis_gene_ensembl
## 29          tguttata_gene_ensembl
## 30        mlucifugus_gene_ensembl
## 31          hsapiens_gene_ensembl
## 32             mfuro_gene_ensembl
## 33        tbelangeri_gene_ensembl
## 34           ggallus_gene_ensembl
## 35       xtropicalis_gene_ensembl
## 36         ecaballus_gene_ensembl
## 37           pabelii_gene_ensembl
## 38        xmaculatus_gene_ensembl
## 39            drerio_gene_ensembl
## 40        lchalumnae_gene_ensembl
## 41     tnigroviridis_gene_ensembl
## 42      amelanoleuca_gene_ensembl
## 43          mmulatta_gene_ensembl
## 44         pvampyrus_gene_ensembl
## 45        mdomestica_gene_ensembl
## 46     acarolinensis_gene_ensembl
## 47            vpacos_gene_ensembl
## 48         tsyrichta_gene_ensembl
## 49        ogarnettii_gene_ensembl
## 50     dmelanogaster_gene_ensembl
## 51          mmurinus_gene_ensembl
## 52         loculatus_gene_ensembl
## 53          olatipes_gene_ensembl
## 54          ggorilla_gene_ensembl
## 55         oprinceps_gene_ensembl
## 56            dordii_gene_ensembl
## 57            oaries_gene_ensembl
## 58         mmusculus_gene_ensembl
## 59        mgallopavo_gene_ensembl
## 60           gmorhua_gene_ensembl
## 61    aplatyrhynchos_gene_ensembl
## 62          saraneus_gene_ensembl
## 63         sharrisii_gene_ensembl
## 64          meugenii_gene_ensembl
## 65           btaurus_gene_ensembl
## 66       cfamiliaris_gene_ensembl
##                                    description         version
## 1       Ornithorhynchus anatinus genes (OANA5)           OANA5
## 2              Cavia porcellus genes (cavPor3)         cavPor3
## 3       Gasterosteus aculeatus genes (BROADS1)         BROADS1
## 4           Loxodonta africana genes (loxAfr3)         loxAfr3
## 5   Ictidomys tridecemlineatus genes (spetri2)         spetri2
## 6          Choloepus hoffmanni genes (choHof1)         choHof1
## 7               Ciona savignyi genes (CSAV2.0)         CSAV2.0
## 8          Felis catus genes (Felis_catus_6.2) Felis_catus_6.2
## 9           Rattus norvegicus genes (Rnor_5.0)        Rnor_5.0
## 10      Pelodiscus sinensis genes (PelSin_1.0)      PelSin_1.0
## 11   Callithrix jacchus genes (C_jacchus3.2.1)  C_jacchus3.2.1
## 12          Tursiops truncatus genes (turTru1)         turTru1
## 13    Saccharomyces cerevisiae genes (R64-1-1)         R64-1-1
## 14     Caenorhabditis elegans genes (WBcel235)        WBcel235
## 15     Oreochromis niloticus genes (Orenil1.0)       Orenil1.0
## 16           Takifugu rubripes genes (FUGU4.0)         FUGU4.0
## 17        Astyanax mexicanus genes (AstMex102)       AstMex102
## 18     Petromyzon marinus genes (Pmarinus_7.0)    Pmarinus_7.0
## 19         Erinaceus europaeus genes (eriEur1)         eriEur1
## 20      Ficedula albicollis genes (FicAlb_1.4)      FicAlb_1.4
## 21          Pan troglodytes genes (CHIMP2.1.4)      CHIMP2.1.4
## 22            Echinops telfairi genes (TENREC)          TENREC
## 23               Ciona intestinalis genes (KH)              KH
## 24         Nomascus leucogenys genes (Nleu1.0)         Nleu1.0
## 25              Sus scrofa genes (Sscrofa10.2)     Sscrofa10.2
## 26     Oryctolagus cuniculus genes (OryCun2.0)       OryCun2.0
## 27      Dasypus novemcinctus genes (Dasnov3.0)       Dasnov3.0
## 28           Procavia capensis genes (proCap1)         proCap1
## 29     Taeniopygia guttata genes (taeGut3.2.4)     taeGut3.2.4
## 30            Myotis lucifugus genes (myoLuc2)         myoLuc2
## 31             Homo sapiens genes (GRCh37.p13)      GRCh37.p13
## 32  Mustela putorius furo genes (MusPutFur1.0)    MusPutFur1.0
## 33            Tupaia belangeri genes (tupBel1)         tupBel1
## 34               Gallus gallus genes (Galgal4)         Galgal4
## 35           Xenopus tropicalis genes (JGI4.2)          JGI4.2
## 36              Equus caballus genes (EquCab2)         EquCab2
## 37                  Pongo abelii genes (PPYG2)           PPYG2
## 38   Xiphophorus maculatus genes (Xipmac4.4.2)     Xipmac4.4.2
## 39                     Danio rerio genes (Zv9)             Zv9
## 40         Latimeria chalumnae genes (LatCha1)         LatCha1
## 41 Tetraodon nigroviridis genes (TETRAODON8.0)    TETRAODON8.0
## 42      Ailuropoda melanoleuca genes (ailMel1)         ailMel1
## 43               Macaca mulatta genes (MMUL_1)          MMUL_1
## 44           Pteropus vampyrus genes (pteVam1)         pteVam1
## 45       Monodelphis domestica genes (monDom5)         monDom5
## 46       Anolis carolinensis genes (AnoCar2.0)       AnoCar2.0
## 47               Vicugna pacos genes (vicPac1)         vicPac1
## 48            Tarsius syrichta genes (tarSyr1)         tarSyr1
## 49          Otolemur garnettii genes (OtoGar3)         OtoGar3
## 50       Drosophila melanogaster genes (BDGP5)           BDGP5
## 51          Microcebus murinus genes (micMur1)         micMur1
## 52        Lepisosteus oculatus genes (LepOcu1)         LepOcu1
## 53                Oryzias latipes genes (HdrR)            HdrR
## 54           Gorilla gorilla genes (gorGor3.1)       gorGor3.1
## 55         Ochotona princeps genes (OchPri2.0)       OchPri2.0
## 56             Dipodomys ordii genes (dipOrd1)         dipOrd1
## 57                 Ovis aries genes (Oar_v3.1)        Oar_v3.1
## 58              Mus musculus genes (GRCm38.p2)       GRCm38.p2
## 59            Meleagris gallopavo genes (UMD2)            UMD2
## 60                Gadus morhua genes (gadMor1)         gadMor1
## 61     Anas platyrhynchos genes (BGI_duck_1.0)    BGI_duck_1.0
## 62               Sorex araneus genes (sorAra1)         sorAra1
## 63       Sarcophilus harrisii genes (DEVIL7.0)        DEVIL7.0
## 64           Macropus eugenii genes (Meug_1.0)        Meug_1.0
## 65                   Bos taurus genes (UMD3.1)          UMD3.1
## 66          Canis familiaris genes (CanFam3.1)       CanFam3.1
ensembl = useDataset("hsapiens_gene_ensembl", mart = ensembl)
filters = listFilters(ensembl)
attributes = listAttributes(ensembl)

affyids = c("202763_at", "209310_s_at", "207500_at")

entrezID <- getBM(attributes = c("affy_hg_u133_plus_2", "entrezgene"), filters = "affy_hg_u133_plus_2", 
    values = affyids, mart = ensembl)

Bei which immer zuerst wo man sucht

which(attributes$name %in% c("affy_hg_u133_plus_2", "entrezgene"))
## [1] 50 94

Annotate a set of Affymetrix identifiers with HUGO symbol and chromosomal locations of correspond- ing genes


getBM(attributes = c("hgnc_id", "chromosome_name"), filters = "affy_hg_u133_plus_2", 
    values = affyids, mart = ensembl)
##   hgnc_id chromosome_name
## 1    1505              11
## 2    1506              11
## 3    1504               4

Annotate a set of EntrezGene identifiers with GO annotation

entrzSearch <- entrezID$entrezgene
at <- listAttributes(ensembl)

at[grep("^go", at$name), ]
##                      name             description
## 28                  go_id       GO Term Accession
## 31        go_linkage_type   GO Term Evidence Code
## 33   goslim_goa_accession GOSlim GOA Accession(s)
## 34 goslim_goa_description  GOSlim GOA Description
result <- getBM(attributes = c("go_id"), filters = "entrezgene", values = entrzSearch, 
    mart = ensembl)

Task 3: Retrieve all HUGO gene symbols of genes that are located on chromosomes 1,2 or Y ,and are associated with one the following GO terms: ”GO:0051330”,”GO:0000080”,”GO:0000114”,”GO:0000082” (here we’ll use more than one filter)


goSearch <- c("GO:0051330", "GO:0000080", "GO:0000114", "GO:0000082")
chrom <- c(1, 2, "Y")
result3 <- getBM(attributes = "hgnc_symbol", filters = c("go_id", "chromosome_name"), 
    values = list(goSearch, chrom), mart = ensembl)

Task 4: Annotate set of idenfiers with INTERPRO pro- tein domain identifiers



refseqids = c("NM_005359", "NM_000546")

result4 <- getBM(attributes = c("refseq_mrna", "interpro", "interpro_description"), 
    filters = c("refseq_mrna"), values = list(refseqids), mart = ensembl)
print(result4)
##   refseq_mrna  interpro                       interpro_description
## 1   NM_000546 IPR002117               p53 tumour suppressor family
## 2   NM_000546 IPR011615                    p53, DNA-binding domain
## 3   NM_000546 IPR010991                p53, tetramerisation domain
## 4   NM_000546 IPR013872                 p53 transactivation domain
## 5   NM_000546 IPR008967 p53-like transcription factor, DNA-binding
## 6   NM_005359 IPR001132                  SMAD domain, Dwarfin-type
## 7   NM_005359 IPR003619               MAD homology 1, Dwarfin-type
## 8   NM_005359 IPR013019                          MAD homology, MH1
## 9   NM_005359 IPR008984                            SMAD/FHA domain

Task 5: Select all Affymetrix identifiers on the hgu133plus2 chip and Ensembl gene identifiers for genes located on chromosome 16 between basepair 1100000 and 1250000


start <- 1100000
stop <- 1250000
chr <- 16

sort(filters$name)
##   [1] "affy_hc_g110"                             
##   [2] "affy_hg_focus"                            
##   [3] "affy_hg_u133_plus_2"                      
##   [4] "affy_hg_u133a"                            
##   [5] "affy_hg_u133a_2"                          
##   [6] "affy_hg_u133b"                            
##   [7] "affy_hg_u95a"                             
##   [8] "affy_hg_u95av2"                           
##   [9] "affy_hg_u95b"                             
##  [10] "affy_hg_u95c"                             
##  [11] "affy_hg_u95d"                             
##  [12] "affy_hg_u95e"                             
##  [13] "affy_huex_1_0_st_v2"                      
##  [14] "affy_hugene_1_0_st_v1"                    
##  [15] "affy_hugene_2_0_st_v1"                    
##  [16] "affy_hugenefl"                            
##  [17] "affy_primeview"                           
##  [18] "affy_u133_x3p"                            
##  [19] "agilent_cgh_44b"                          
##  [20] "anatomical_system_term"                   
##  [21] "arrayexpress"                             
##  [22] "atlas_celltype"                           
##  [23] "atlas_diseasestate"                       
##  [24] "atlas_organismpart"                       
##  [25] "band_end"                                 
##  [26] "band_start"                               
##  [27] "biotype"                                  
##  [28] "ccds"                                     
##  [29] "cell_type_term"                           
##  [30] "chembl"                                   
##  [31] "chromosomal_region"                       
##  [32] "chromosome_name"                          
##  [33] "clone_based_ensembl_gene_name"            
##  [34] "clone_based_ensembl_transcript_name"      
##  [35] "clone_based_vega_gene_name"               
##  [36] "clone_based_vega_transcript_name"         
##  [37] "codelink"                                 
##  [38] "dbass3_name"                              
##  [39] "development_stage_term"                   
##  [40] "efg_agilent_sureprint_g3_ge_8x60k"        
##  [41] "efg_agilent_sureprint_g3_ge_8x60k_v2"     
##  [42] "efg_agilent_wholegenome_4x44k_v1"         
##  [43] "efg_agilent_wholegenome_4x44k_v2"         
##  [44] "embl"                                     
##  [45] "encode_region"                            
##  [46] "end"                                      
##  [47] "ens_hs_gene"                              
##  [48] "ens_hs_transcript"                        
##  [49] "ens_hs_translation"                       
##  [50] "ens_lrg_gene"                             
##  [51] "ens_lrg_transcript"                       
##  [52] "ensembl_exon_id"                          
##  [53] "ensembl_gene_id"                          
##  [54] "ensembl_peptide_id"                       
##  [55] "ensembl_transcript_id"                    
##  [56] "entrezgene"                               
##  [57] "event_type"                               
##  [58] "family"                                   
##  [59] "germ_line_variation_source"               
##  [60] "go_evidence_code"                         
##  [61] "go_id"                                    
##  [62] "go_parent_name"                           
##  [63] "go_parent_term"                           
##  [64] "goslim_goa_accession"                     
##  [65] "hgnc_id"                                  
##  [66] "hgnc_symbol"                              
##  [67] "hgnc_transcript_name"                     
##  [68] "hpa"                                      
##  [69] "illumina_humanht_12_v3"                   
##  [70] "illumina_humanht_12_v4"                   
##  [71] "illumina_humanref_8_v3"                   
##  [72] "illumina_humanwg_6_v1"                    
##  [73] "illumina_humanwg_6_v2"                    
##  [74] "illumina_humanwg_6_v3"                    
##  [75] "interpro"                                 
##  [76] "marker_end"                               
##  [77] "marker_start"                             
##  [78] "merops"                                   
##  [79] "mim_gene_accession"                       
##  [80] "mim_morbid_accession"                     
##  [81] "mirbase_accession"                        
##  [82] "mirbase_id"                               
##  [83] "mirbase_transcript_name"                  
##  [84] "ottg"                                     
##  [85] "ottt"                                     
##  [86] "pathology_term"                           
##  [87] "pdb"                                      
##  [88] "pfam"                                     
##  [89] "phalanx_onearray"                         
##  [90] "phenotype_description"                    
##  [91] "pirsf"                                    
##  [92] "prints"                                   
##  [93] "profile"                                  
##  [94] "protein_id"                               
##  [95] "refseq_mrna"                              
##  [96] "refseq_mrna_predicted"                    
##  [97] "refseq_ncrna"                             
##  [98] "refseq_ncrna_predicted"                   
##  [99] "refseq_peptide"                           
## [100] "refseq_peptide_predicted"                 
## [101] "rfam"                                     
## [102] "rfam_transcript_name"                     
## [103] "shares_cds_and_utr_with_ottt"             
## [104] "shares_cds_with_ottt"                     
## [105] "smart"                                    
## [106] "so_parent_name"                           
## [107] "somatic_variation_source"                 
## [108] "source"                                   
## [109] "start"                                    
## [110] "status"                                   
## [111] "strand"                                   
## [112] "superfamily"                              
## [113] "tigrfam"                                  
## [114] "transcript_count"                         
## [115] "transcript_source"                        
## [116] "transcript_status"                        
## [117] "type"                                     
## [118] "ucsc"                                     
## [119] "unigene"                                  
## [120] "uniparc"                                  
## [121] "uniprot_genename"                         
## [122] "uniprot_genename_transcript_name"         
## [123] "uniprot_sptrembl"                         
## [124] "uniprot_swissprot"                        
## [125] "uniprot_swissprot_accession"              
## [126] "wikigene_id"                              
## [127] "wikigene_name"                            
## [128] "with_affy_hc_g110"                        
## [129] "with_affy_hg_focus"                       
## [130] "with_affy_hg_u133_plus_2"                 
## [131] "with_affy_hg_u133a"                       
## [132] "with_affy_hg_u133a_2"                     
## [133] "with_affy_hg_u133b"                       
## [134] "with_affy_hg_u95a"                        
## [135] "with_affy_hg_u95av2"                      
## [136] "with_affy_hg_u95b"                        
## [137] "with_affy_hg_u95c"                        
## [138] "with_affy_hg_u95d"                        
## [139] "with_affy_hg_u95e"                        
## [140] "with_affy_huex_1_0_st_v2"                 
## [141] "with_affy_hugene_1_0_st_v1"               
## [142] "with_affy_hugene_2_0_st_v1"               
## [143] "with_affy_hugenefl"                       
## [144] "with_affy_primeview"                      
## [145] "with_affy_u133_x3p"                       
## [146] "with_agilent_cgh_44b"                     
## [147] "with_ccds"                                
## [148] "with_chembl"                              
## [149] "with_codelink_codelink"                   
## [150] "with_coil"                                
## [151] "with_dbass3"                              
## [152] "with_efg_agilent_sureprint_g3_ge_8x60k"   
## [153] "with_efg_agilent_sureprint_g3_ge_8x60k_v2"
## [154] "with_efg_agilent_wholegenome_4x44k_v1"    
## [155] "with_efg_agilent_wholegenome_4x44k_v2"    
## [156] "with_embl"                                
## [157] "with_entrezgene"                          
## [158] "with_exp_atlas_celltype"                  
## [159] "with_exp_atlas_diseasestate"              
## [160] "with_exp_atlas_organismpart"              
## [161] "with_exp_est_anatomicalsystem"            
## [162] "with_exp_est_associatedwith"              
## [163] "with_exp_est_celltype"                    
## [164] "with_exp_est_developmentstage"            
## [165] "with_exp_est_experimentaltechnique"       
## [166] "with_exp_est_microarrayplatform"          
## [167] "with_exp_est_pathology"                   
## [168] "with_exp_est_pooling"                     
## [169] "with_exp_est_tissuepreparation"           
## [170] "with_exp_est_treatment"                   
## [171] "with_go_go"                               
## [172] "with_go_id"                               
## [173] "with_hgnc"                                
## [174] "with_homolog_acar"                        
## [175] "with_homolog_amel"                        
## [176] "with_homolog_amex"                        
## [177] "with_homolog_apla"                        
## [178] "with_homolog_btau"                        
## [179] "with_homolog_cele"                        
## [180] "with_homolog_cfam"                        
## [181] "with_homolog_chof"                        
## [182] "with_homolog_cint"                        
## [183] "with_homolog_cjac"                        
## [184] "with_homolog_cpor"                        
## [185] "with_homolog_csav"                        
## [186] "with_homolog_dmel"                        
## [187] "with_homolog_dnov"                        
## [188] "with_homolog_dord"                        
## [189] "with_homolog_drer"                        
## [190] "with_homolog_ecab"                        
## [191] "with_homolog_eeur"                        
## [192] "with_homolog_etel"                        
## [193] "with_homolog_falb"                        
## [194] "with_homolog_fcat"                        
## [195] "with_homolog_gacu"                        
## [196] "with_homolog_ggal"                        
## [197] "with_homolog_ggor"                        
## [198] "with_homolog_gmor"                        
## [199] "with_homolog_itri"                        
## [200] "with_homolog_lafr"                        
## [201] "with_homolog_lcha"                        
## [202] "with_homolog_locu"                        
## [203] "with_homolog_mdom"                        
## [204] "with_homolog_meug"                        
## [205] "with_homolog_mfur"                        
## [206] "with_homolog_mgal"                        
## [207] "with_homolog_mluc"                        
## [208] "with_homolog_mmul"                        
## [209] "with_homolog_mmur"                        
## [210] "with_homolog_mmus"                        
## [211] "with_homolog_nleu"                        
## [212] "with_homolog_oana"                        
## [213] "with_homolog_oari"                        
## [214] "with_homolog_ocun"                        
## [215] "with_homolog_ogar"                        
## [216] "with_homolog_olat"                        
## [217] "with_homolog_onil"                        
## [218] "with_homolog_opri"                        
## [219] "with_homolog_pabe"                        
## [220] "with_homolog_pcap"                        
## [221] "with_homolog_pmar"                        
## [222] "with_homolog_psin"                        
## [223] "with_homolog_ptro"                        
## [224] "with_homolog_pvam"                        
## [225] "with_homolog_rnor"                        
## [226] "with_homolog_sara"                        
## [227] "with_homolog_scer"                        
## [228] "with_homolog_shar"                        
## [229] "with_homolog_sscr"                        
## [230] "with_homolog_tbel"                        
## [231] "with_homolog_tgut"                        
## [232] "with_homolog_tnig"                        
## [233] "with_homolog_trub"                        
## [234] "with_homolog_tsyr"                        
## [235] "with_homolog_ttru"                        
## [236] "with_homolog_vpac"                        
## [237] "with_homolog_xmac"                        
## [238] "with_homolog_xtro"                        
## [239] "with_hpa"                                 
## [240] "with_illumina_humanht_12_v3"              
## [241] "with_illumina_humanht_12_v4"              
## [242] "with_illumina_humanref_8_v3"              
## [243] "with_illumina_humanwg_6_v1"               
## [244] "with_illumina_humanwg_6_v2"               
## [245] "with_illumina_humanwg_6_v3"               
## [246] "with_interpro"                            
## [247] "with_low_complexity"                      
## [248] "with_merops"                              
## [249] "with_mim_gene"                            
## [250] "with_mim_morbid"                          
## [251] "with_mirbase"                             
## [252] "with_ottg"                                
## [253] "with_ottt"                                
## [254] "with_ox_arrayexpress"                     
## [255] "with_ox_clone_based_ensembl_gene"         
## [256] "with_ox_clone_based_ensembl_transcript"   
## [257] "with_ox_clone_based_vega_gene"            
## [258] "with_ox_clone_based_vega_transcript"      
## [259] "with_ox_ens_hs_gene"                      
## [260] "with_ox_ens_hs_transcript"                
## [261] "with_ox_ens_hs_translation"               
## [262] "with_ox_ens_lrg_gene"                     
## [263] "with_ox_ens_lrg_transcript"               
## [264] "with_ox_goslim_goa"                       
## [265] "with_ox_hgnc_transcript_name"             
## [266] "with_ox_mirbase_transcript_name"          
## [267] "with_ox_refseq_mrna"                      
## [268] "with_ox_refseq_mrna_predicted"            
## [269] "with_ox_refseq_ncrna"                     
## [270] "with_ox_refseq_ncrna_predicted"           
## [271] "with_ox_rfam_transcript_name"             
## [272] "with_ox_uniparc"                          
## [273] "with_ox_uniprotsptrembl"                  
## [274] "with_ox_uniprotswissprot"                 
## [275] "with_paralog_hsap"                        
## [276] "with_pdb"                                 
## [277] "with_phalanx_onearray"                    
## [278] "with_pirsf"                               
## [279] "with_profile"                             
## [280] "with_protein_feature_pfam"                
## [281] "with_protein_feature_prints"              
## [282] "with_protein_id"                          
## [283] "with_refseq_peptide"                      
## [284] "with_refseq_peptide_predicted"            
## [285] "with_rfamR"                               
## [286] "with_shares_cds_and_utr_with_ottt"        
## [287] "with_shares_cds_with_ottt"                
## [288] "with_signal_domain"                       
## [289] "with_signalp"                             
## [290] "with_smart"                               
## [291] "with_superfamily"                         
## [292] "with_tigrfam"                             
## [293] "with_tmhmm"                               
## [294] "with_transmembrane_domain"                
## [295] "with_ucsc"                                
## [296] "with_unigene"                             
## [297] "with_uniprot_genename"                    
## [298] "with_uniprot_genename_transcript_name"    
## [299] "with_uniprotsptrembl"                     
## [300] "with_validated_snp"                       
## [301] "with_wikigene"
filters[grep("start", filters$name), ]
##           name     description
## 2        start Gene Start (bp)
## 4   band_start      Band Start
## 6 marker_start    Marker Start
result5 <- getBM(attributes = c("affy_hg_u133_plus_2", "ensembl_gene_id"), filters = c("chromosome_name", 
    "start", "end"), values = list(chr, start, stop), mart = ensembl)
print(result5)
##    affy_hg_u133_plus_2 ensembl_gene_id
## 1                      ENSG00000162009
## 2            214555_at ENSG00000162009
## 3                      ENSG00000184471
## 4            205845_at ENSG00000196557
## 5                      ENSG00000196557
## 6         1557146_a_at ENSG00000261713
## 7                      ENSG00000261713
## 8                      ENSG00000261720
## 9                      ENSG00000181791
## 10                     ENSG00000260702
## 11           215502_at ENSG00000260532
## 12                     ENSG00000260403
## 13                     ENSG00000259910

Task 6: Retrieve all entrezgene identifiers and HUGO gene symbols of genes which have a ”MAP kinase activ- ity” GO term associated with it.


filters[grep("go", filters$name), ]
##                     name                                description
## 43            with_go_id                  with GO Term Accession(s)
## 88    with_ox_goslim_goa                         with GOSlim GOA(s)
## 100           with_go_go                              with GO ID(s)
## 128                go_id     GO Term Accession(s) [e.g. GO:0005515]
## 129 goslim_goa_accession GOSlim GOA Accessions(s) [e.g. GO:0005623]
## 199     go_evidence_code                           GO Evidence code
## 200       go_parent_term                      Parent term accession
## 201       go_parent_name                           Parent term name
## 235    with_homolog_ggor                  Orthologous Gorilla Genes

result6 <- getBM(attributes = c("entrezgene", "hgnc_symbol"), filters = c("go_id"), 
    values = list("GO:0004707"), mart = ensembl)
print(result6)
##    entrezgene hgnc_symbol
## 1       51701         NLK
## 2        5597       MAPK6
## 3        5596       MAPK4
## 4        5599       MAPK8
## 5        5595       MAPK3
## 6      225689      MAPK15
## 7        5598       MAPK7
## 8        1432      MAPK14
## 9        5603      MAPK13
## 10       5594       MAPK1
## 11       5602      MAPK10
## 12       6300      MAPK12
## 13       5600      MAPK11
## 14       5601       MAPK9