Skip to content
Snippets Groups Projects
Commit 7c06bc20 authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Better handling of multi-species dumps.

parent f90bcb31
No related branches found
No related tags found
No related merge requests found
# Dump gene and xref information to an XML file for indexing by the EBI's
# search engine.
#
# To copy files to the EBI so that they can be picked up:
# scp homo_sapiens_core_41_36c.xml.gz glenn@puffin.ebi.ac.uk:xml/
use strict;
use DBI;
......@@ -28,7 +30,7 @@ if( !$host || !$dbpattern ) {
usage();
}
my $entry_count = 0;
my $entry_count ;
my $fh;
......@@ -37,7 +39,6 @@ run();
sub run() {
# loop over databases
# TODO - separate file for each database?
my $dsn = "DBI:mysql:host=$host";
$dsn .= ";port=$port" if ($port);
......@@ -70,7 +71,8 @@ sub run() {
'-port' => $port,
'-user' => $user,
'-pass' => $pass,
'-dbname' => $dbname);
'-dbname' => $dbname,
'-species' => $dbname);
header($dba, $dbname);
......@@ -114,6 +116,8 @@ sub content {
my ($dba) = @_;
$entry_count = 0;
my $gene_adaptor = $dba->get_GeneAdaptor();
foreach my $gene (@{$gene_adaptor->fetch_all()}) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment