my $runnable = Bio::EnsEMBL::Analysis::RunnableDB::Funcgen::MAT->new
(
-db => $db,
-input_id => 'chromosome::20:1:100000:1',
-analysis => $analysis,
);
$runnable->fetch_input;
$runnable->run;
$runnable->write_output;
This module provides an interface between the ensembl functional genomics
database and the Runnable MAT which wraps the program MAT (Model-based
Analysis of Tiling-array, see
http://chip.dfci.harvard.edu/~wli/MAT).
sub fetch_input
{
my ($self) = @_;
print "Analysis::RunnableDB::Funcgen::MAT::fetch_input\n";
my $runnable = 'Bio::EnsEMBL::Analysis::Runnable::Funcgen::'
.$self->analysis->module;
warn("No input to fetch since we are going to work directly on the CEL files.");
$runnable = $runnable->new
(
-query => $self->query,
-program => $self->analysis->program_file,
-analysis => $self->analysis,
);
$self->runnable($runnable);
return 1; } |
sub new
{
print "Analysis::RunnableDB::Funcgen::MAT::new\n";
my ($class,@args) = @_;
my $self = $class->SUPER::new(@args);
$self->read_and_check_config($CONFIG);
return $self; } |
sub query
{ my ($self, $chip) = @_;
if($chip){
throw("Must pass RunnableDB::Funcgen::MAT::query an integer ".
"specifying the chip to process not ".$chip)
unless($chip =~ m/^\d+$/); $self->{'chip'} = $chip;
}
return $self->{'chip'}; } |
sub write_output
{
print "RunnableDB::Funcgen::MAT::write_output\n";
my ($self) = @_;
my @result_files = map { $_->resultsfile } @{$self->runnable};
print Dumper @result_files;
my $Importer = Bio::EnsEMBL::Funcgen::Importer->new
(
-name => $ENV{EXPERIMENT},
-vendor => $ENV{VENDOR},
-format => $ENV{FORMAT},
-db => $self->db,
-host => $self->db->host,
-port => $self->db->port,
-user => $self->db->username,
-pass => $self->db->password,
-dbname => $self->db->dbname,
-species => $ENV{SPECIES},
-data_version => $ENV{DATA_VERSION},
-input_dir => $ENV{ANALYSIS_WORK_DIR},
-output_dir => $ENV{ANALYSIS_WORK_DIR},
-result_files =>\@ result_files,
-experimental_set_name => $ENV{EXP_SET},
-exp_date => $ENV{EXP_DATE},
-feature_analysis => $self->analysis->logic_name,
-feature_type_name => $ENV{FEATURE_TYPE},
-cell_type_name => $ENV{CELL_TYPE},
-location => $ENV{LOCATION},
-contact => $ENV{CONTACT},
-group => $ENV{EGROUP},
-recover => 1,
-verbose => 1,
);
$Importer->register_experiment();
}
1; } |