Since the 0.6 version of BioMart, installation within external websites has become much harder as the code is not suited for such integrations without a number of post CVS checkout modifications. These you will find listed at the end.
To enable BioMart in your checkout - include in your Plugins.pm directory the following line (directly above the EnsEMBL::Ensembl plugin line:
'EnsEMBL::Mart' => $SiteDefs::ENSEMBL_SERVERROOT.'/public-plugins/mart',
NOTE: We do not run the BioMart application within the same Apache instances as the rest of the Ensembl site AND we use a secondary MySQL server for the BioMart databases.
There are a number of reasons for this - mainly due to the size of the Apache processes Mart produces (these are all 0.5G) and the number of tables in the Mart database. These both have adverse effects on the performance of the Ensembl website - so we have ring-fenced hardware specifically for running BioMart.
One solution is to use a reverse proxy to dispatch in-bound network traffic to a set of servers, while presenting a single interface to the caller (see Apache's mod-proxy documentation), and mod_rewrite to redirect users to the separate Mart machine.
RewriteEngine on ProxyPreserveHost On # requests going to the server RewriteRule ^/biomart/(martview.*) http://your.mart.server/biomart/$1 [P,L] RewriteRule ^/biomart/(martservice.*) http://your.mart.server/biomart/$1 [P,L] RewriteRule ^/biomart/(martresults.*) http://your.mart.server/biomart/$1 [P,L] # requests coming back from server ProxyPassReverse / http://your.mart.server/
If you decide to do this, you also need to:
if ($ENV{'ENSEMBL_MART_ENABLED'}) {and the closing curly bracket two lines below it.
foreach(keys %$hash) { if($_ eq "background") { foreach my $param (keys %{$hash->{$_}}) { if($param eq "resultsDir1") { $background_dir = $hash->{$_}->{$param}; } } } } $background_dir.='/';With:
## Let us do a nasty little hack (see BioMart.pm) to sensbily and ## in a working manner allow for heirarchical file saving to stop filesystems ## barfing really badly... $background_file =~ s/^[\.\\\/]+//; use Digest::MD5 qw(md5_hex); (my $background_directory = md5_hex($background_file) ) =~ s/^(\w)(\w\w).*$/$1\/$2/; my $background_dir = $hash->{'background'}{'resultsDir1'}.'/'.$background_directory.'/';
colour_saturation0=#000000 colour_saturation20=#efefef colour_saturation40=#fff9af colour_saturation60=#fff9af colour_saturation80=#ffffdd colour_saturation100=#ffffff
my $background_file_hash = int(rand($background_file_dirCount)) + 1;with
my $background_file_hash = 1; ## Let us do a nasty little hack (see martresults.PLS) to sensbily and ## in a working manner allow for heirarchical file saving to stop filesystems ## barfing really badly... use Digest::MD5 qw(md5_hex); use File::Path; (my $background_directory = md5_hex( $background_file )) =~ s/^(\w)(\w\w).*$/$1\/$2/; $background_file_dir .= $background_directory.'/'; mkpath( $background_file_dir, 0, 0777 );
Copy the .tt files from public-plugins/mart/templates to biomart-perl/conf/templates/custom.
© 2024 Inserm. Hosted by genouest.org. This product includes software developed by Ensembl.