Re: [mart-dev] How to enable Multiple databases on Biomart?

2010-12-03 Thread Darren Oakley
Hi,

Just add in extra 'MartDBLocation' or 'MartURLLocation' blocks to the XML.  
Here's a small portion of one of ours:

!DOCTYPE MartRegistry
MartRegistry
   MartDBLocation 
   name= ikmc 
   displayName = IKMC Genes and Products 
   databaseType= mysql 
   host= .internal.sanger.ac.uk 
   port= 3303 
   database= ikmc_mart_alt 
   schema  = ikmc_mart_alt 
   user=  
   password=  
   visible = 1 
   default =  
   includeDatasets =  
   martUser= 
   /
   MartURLLocation 
 name= biomart
 database= biomart 
 default = 
 displayName = MGI (Jackson Laboratory US)
 host= www.biomart.org
 proxy   = http://wwwcache.sanger.ac.uk:3128;
 includeDatasets = markers
 martUser=  
 path= /biomart/martservice
 port= 80
 serverVirtualSchema = default
 visible = 1
   /
   MartURLLocation 
 name= htgt 
 database= htgt_mart 
 default =  
 displayName = WTSI Mouse Genetics Programme (Sanger UK) 
 host= www.sanger.ac.uk 
 proxy   = http://wwwcache.sanger.ac.uk:3128;
 includeDatasets =  
 martUser=  
 path= /htgt/biomart/martservice 
 port= 80 
 serverVirtualSchema = default 
 visible = 1 
   /
/MartRegistry

On 2 Dec 2010, at 20:15, suo wrote:

 Dear All,
 
 How to put multiple databases in the registry file or make other 
 configuration to make it happen?
 
 In the manual, a registry file is like:
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE MartRegistry
 MartRegistry
  MartDBLocation
 name = my_mart
 displayName  = My BioMart Database
 databaseType = mysql
 host = localhost
 port = 3306
 database = my_mart
 schema   = my_mart
 user = gmod
 password = gmod
 visible  = 1
 default  = 
 includeDatasets = 
 martUser = 
  /
 /MartRegistry
 
 Thanks in advance!
 
 
 
 
 
 



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 



Re: [mart-dev] BioMart Perl API retrieve filter values

2010-12-03 Thread Syed Haider

Hey Patrice,

look at this piece of code, hope this helps:

foreach my $option(@{$filter-getAllOptions}){
next if (!$option-filter);
my $options = $option-filter-getAllOptions;
my @vals;
foreach (@$options){
push @vals,$_-value;
}
my @filters = ($option-filter);
foreach my $filt (@filters) {
print $filt-name.\t.$filt-displayName;
}
}




On 30/11/2010 14:26, Patrice Dehais wrote:

Hello

I've a filter which defines a chromosomal region, thus in the marteditor
it has no field, tableConstraint, nor key but a filterList with
appropriate filter list (chr,start,end).
It works fine when I use Web interface of BioMart.
However, I need to retrieve the value of this filter in a homemade
Formatter.
I can retrieve values of all other filters (except this one) using this
script in the getDisplayNames subroutine of the formatter :

  foreach my $f (@{$query-getAllFilters}) {
  foreach my $row (@{$f-getTable-getRows}){
  printf STDERR filter name: %s value= %s\n,$f-name,$row-[0];
  }
  }

Why doesn't it work for this special kind of filter ?

thanks

Patrice