[BioC] getBM local

Mark Robinson mrobinson at wehi.EDU.AU
Fri Jul 25 04:57:54 CEST 2008


Hi Amanda.

According to the 'getBM' example, you need to call 'useMart' to setup  
the connection.  Presumably, you could direct 'useMart' to your local  
DB via its web service or mysql.  A place to start is '?useMart'.  I'm  
not sure how Biomart-like in terms of schemas your local DB will need  
to be in order to use getBM.  Looking at the source for 'getBM' might  
help there.


 >      mart <- useMart("ensembl")
 >      datasets <- listDatasets(mart)
 >      mart<-useDataset("hsapiens_gene_ensembl",mart)
Checking attributes and filters ... ok
 >      v<- 
getBM 
(attributes 
= 
c 
("affy_hg_u95av2 
","hgnc_symbol 
","chromosome_name 
","band 
"),filters="affy_hg_u95av2",values=c("1939_at","1503_at","1454_at"),  
mart=mart)
  affy_hg_u95av2 hgnc_symbol chromosome_name   band
1        1454_at       SMAD3              15 q22.33
2        1503_at       BRCA2              13  q13.1
3        1503_at                          13  q13.1
4        1939_at        TP53              17  p13.1
 > class(v)
[1] "data.frame"

 > mart
Object of class 'Mart':
Using the ensembl BioMart database
Using the hsapiens_gene_ensembl dataset
 > slotNames(mart)
[1] "mysql"            "connections"      "mysqldriver"       
"mainTables"
[5] "biomart"          "host"             "port"             "vschema"
[9] "dataset"          "filters"          "attributes"        
"attributePointer"
[13] "archive"
 > mart at host
[1] "http://www.biomart.org:80/biomart/martservice"
 > mart at mysql
[1] FALSE


Alternatively (and I'm not sure exactly what need downstream of this),  
since 'getBM' simply returns a data frame, perhaps just a simple query  
to your database (e.g. dbSendQuery and fetch from RMySQL) that returns  
a table would be just as simple.  (Sorry, this is the same answer I  
gave in your previous question).

Mark



On 25/07/2008, at 11:50 AM, Amanda Miotto wrote:

>
> Dear All
>
> I am looking to get getBM to read from a local source rather than  
> ensembl.
> Would anyone have documentation or directions in relation to how to  
> set
> this up?
>
> Thank you,
>
> Amanda Miotto
> a.miotto at griffith.edu.au
>
> Software Engineer.
> Research Computing Services
> INFORMATION SERVICES
> Griffith University, NATHAN 4111, AUSTRALIA
> Phone:  +61 7 37354419  Fax:  +61 7 37356650
> Web:    http://eResearch.griffith.edu.au/
>
> PRIVILEGED - PRIVATE AND CONFIDENTIAL:
> This email and any files transmitted with it are intended solely for
> the use of the addressee(s) and may contain information which is
> confidential or privileged.  If you receive this email and you are
> not the addressee(s) [or responsible for delivery of the email to the
> addressee(s)], please disregard the contents of the email, delete the
> email and notify the author immediately.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

------------------------------
Mark Robinson
Epigenetics Laboratory, Garvan
Bioinformatics Division, WEHI
e: m.robinson at garvan.org.au
e: mrobinson at wehi.edu.au
p: +61 (0)3 9345 2628
f: +61 (0)3 9347 0852



More information about the Bioconductor mailing list