Skip to content

Commit

Permalink
There should always be output from a datacheck run - but, if somethin…
Browse files Browse the repository at this point in the history
…g has gone wrong, output might not be written. This would get picked up and reported when the run completes - but the jobs for converting to json were failing before then, and the datacheck process was left hanging. So, make that step robust to the absence of output.
  • Loading branch information
James Allen committed Dec 17, 2020
1 parent 2497aca commit 8da0433
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/Bio/EnsEMBL/DataCheck/Pipeline/ConvertTapToJson.pm
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,21 @@ sub run {
my $passed = $self->param('json_passed');
my $by_species = $self->param('json_by_species');

$self->parse_results($tap, $output_file, $by_species, $passed);
if (-e $tap) {
$self->parse_results($tap, $output_file, $by_species, $passed);
}
}

sub write_output {
my $self = shift;

$self->dataflow_output_id(
{ json_output_file => $self->param('json_output_file') }, 1
);
my $json_output_file = $self->param('json_output_file');

if (-e $json_output_file) {
$self->dataflow_output_id(
{ json_output_file => $json_output_file }, 1
);
}
}

sub parse_results {
Expand Down

0 comments on commit 8da0433

Please sign in to comment.