00001 00002 =head1 LICENSE 00003 00004 Copyright [2009-2016] EMBL-European Bioinformatics Institute 00005 00006 Licensed under the Apache License, Version 2.0 (the "License"); 00007 you may not use this file except in compliance with the License. 00008 You may obtain a copy of the License at 00009 00010 http://www.apache.org/licenses/LICENSE-2.0 00011 00012 Unless required by applicable law or agreed to in writing, software 00013 distributed under the License is distributed on an "AS IS" BASIS, 00014 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 See the License for the specific language governing permissions and 00016 limitations under the License. 00017 00018 =head1 CONTACT 00019 00020 Please email comments or questions to the public Ensembl 00021 developers list at <dev@ensembl.org>. 00022 00023 Questions may also be sent to the Ensembl help desk at 00024 <helpdesk@ensembl.org>. 00025 00026 =head1 NAME 00027 00028 Bio::EnsEMBL::MetaData::Pipeline::GenomeFactory 00029 00030 =head1 DESCRIPTION 00031 00032 Runnable to generate input for metadata pipeline 00033 00034 =head1 AUTHOR 00035 00036 Dan Staines 00037 00038 =cut 00039 00040 use warnings; 00041 use strict; 00042 00043 package Bio::EnsEMBL::MetaData::Pipeline::GenomeFactory; 00044 00045 use base qw/Bio::EnsEMBL::Production::Pipeline::BaseSpeciesFactory/; 00046 00047 use Bio::EnsEMBL::MetaData::MetaDataProcessor; 00048 use Bio::EnsEMBL::MetaData::AnnotationAnalyzer; 00049 use Bio::EnsEMBL::MetaData::DBSQL::MetaDataDBAdaptor; 00050 use Bio::EnsEMBL::MetaData::DataReleaseInfo; 00051 00052 use Carp; 00053 use Log::Log4perl qw(:easy); 00054 Log::Log4perl->easy_init($INFO); 00055 my $log = get_logger(); 00056 00057 sub run { 00058 my ($self) = @_; 00059 00060 # create a release to use 00061 $log->info("Connecting to info database"); 00062 my $dba = 00063 Bio::EnsEMBL::MetaData::DBSQL::MetaDataDBAdaptor->new( 00064 -USER =>, 00065 $self->param('info_user'), 00066 -PASS =>, 00067 $self->param('info_pass'), 00068 -HOST =>, 00069 $self->param('info_host'), 00070 -PORT =>, 00071 $self->param('info_port'), 00072 -DBNAME =>, 00073 $self->param('info_dbname') 00074 ); 00075 00076 my $rdba = $dba->get_DataReleaseInfoAdaptor(); 00077 my $release = $self->param('release'); 00078 my $eg_release = $self->param('eg_release'); 00079 my $release_date = $self->param('release_date'); 00080 $log->info( "Storing release e$release" . ( ( defined $eg_release ) ? 00081 "/EG$eg_release" : "" ) . 00082 " $release_date" ); 00083 00084 $rdba->store( 00085 Bio::EnsEMBL::MetaData::DataReleaseInfo->new( 00086 -ENSEMBL_VERSION => $release, 00087 -ENSEMBL_GENOMES_VERSION => $eg_release, 00088 -RELEASE_DATE => $release_date ) 00089 ); 00090 00091 $log->info("Completed release creation"); 00092 00093 # run rest of process 00094 $self->SUPER::run(); 00095 return; 00096 } ## end sub run 00097 00098 1; 00099