Skip to content

Commit

Permalink
Merge pull request Ensembl#342 from Ensembl/hotfix/downloaddata_file_…
Browse files Browse the repository at this point in the history
…check

Check file presence and print File::Fetch error if needed
  • Loading branch information
ndliberial authored Oct 18, 2022
2 parents 8ad4a4a + 11a3785 commit 5938c9f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions modules/Bio/EnsEMBL/Analysis/Hive/RunnableDB/HiveDownloadData.pm
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,20 @@ sub run {

my $client = $self->param('client');
my $file = $client->fetch(($self->param_is_defined('options') ? @{$self->param('options')}: undef));
$self->check_file($file);
$file = $self->uncompress($file) if ($self->param('uncompress'));
if ($self->param('create_faidx')) {
my $samtools = Bio::EnsEMBL::Analysis::Runnable::Samtools->new(
-program => $self->param('samtools'),
);
$samtools->index_genome($file);
if ($file) {
$self->check_file($file);
$file = $self->uncompress($file) if ($self->param('uncompress'));
if ($self->param('create_faidx')) {
my $samtools = Bio::EnsEMBL::Analysis::Runnable::Samtools->new(
-program => $self->param('samtools'),
);
$samtools->index_genome($file);
}
$self->output([$file]);
}
else {
$self->throw($client->error());
}
$self->output([$file]);
}


Expand Down

0 comments on commit 5938c9f

Please sign in to comment.