### Check Available BioMarts ### library(biomaRt) listMarts() ### Select the Ensembl BioMart ### ensembl = useMart("ensembl") datasets = listDatasets(ensembl) ensembl = useMart("ensembl",dataset="hsapiens_gene_ensembl") attributes=listAttributes(ensembl) filters=listFilters(ensembl) ### Task 1a ### affyids = c("211550_at","202431_s_at","206044_s_at") annotation = getBM(c("affy_hg_u133_plus_2","ensembl_gene_id","hgnc_symbol","chromosome_name","start_position","end_position","band","strand"), filters="affy_hg_u133_plus_2", values=affyids,mart = ensembl) print(annotation) ### Task 1b ### illuminaIDs = c("ILMN_1728071","ILMN_1662668") goAnnot = getBM(c("illumina_humanwg_6_v2", "go_biological_process_id","go_biological_process_linkage_type"), filters="illumina_humanwg_6_v2", values=illuminaIDs, mart = ensembl) print(goAnnot[1:5,]) ### Task 2 ### diab=getBM(c("ensembl_gene_id","hgnc_symbol"),filters=c("mim_morbid_accession","go"), values=list(c("125853","222100"),"GO:0003700"),mart=ensembl) print(diab) ### Task 3 ### miRNA = getBM(c("mirbase","ensembl_gene_id","start_position","chromosome_name"), filters=c("chromosome_name","with_mirbase"), values=list(13,TRUE), mart=ensembl) miRNA[1:5,] ### Task 4 ### filterOptions("snptype_filters",ensembl) entrez = getBM("entrezgene",filters=c("chromosome_name","snptype_filters"), values=list(22,"NON_SYNONYMOUS_CODING"),mart=ensembl) entrez[1:5,] ### Task 5 ### seq = getSequence(id="CDH1", type="hgnc_symbol",seqType="gene_exon", mart = ensembl) seq[1,] ### Task 6 ### promoter=getSequence(id=c("APC","CUL1"), type="hgnc_symbol",seqType="coding_gene_flank",upstream =2000, mart=ensembl) ### Task 7 ### human=useMart("ensembl", dataset="hsapiens_gene_ensembl") chicken=useMart("ensembl", dataset="ggallus_gene_ensembl") mapping = getLDS(attributes=c("affy_hg_u95av2","hgnc_symbol"), filters="affy_hg_u95av2", values=c("1888_s_at","1434_at"),mart=human,attributesL="affy_chicken", martL=chicken) ### Task 8 ### snp=useMart("snp", dataset="hsapiens_snp") out=getBM(attributes=c("refsnp_id","allele","chrom_start"), filters=c("chr_name","chrom_start","chrom_end"), values=list(8,148350,158612), mart=snp) out[1:5,] ### Archives ### listMarts(host="may2009.archive.ensembl.org/biomart/martservice/") ensembl54=useMart("ENSEMBL_MART_ENSEMBL", host="may2009.archive.ensembl.org/biomart/martservice/") listDatasets(ensembl54) ensembl54=useMart("ENSEMBL_MART_ENSEMBL", host="may2009.archive.ensembl.org/biomart/martservice/", dataset='hsapiens_gene_ensembl') listMarts(archive=TRUE)