se namespace::autoclean;
use Data::Dumper;
use YAML;
use Storable qw(dclone);
use Try::Tiny;
use JSON;
extends 'BioX::Workflow::Command';
use BioSAILs::Utils::Traits qw(ArrayRefOfStrs);
use Capture:
=> 'rw',
isa => 'Str',
required => 0,
predicate => 'has_path',
);
option 'json' => (
is => 'rw',
isa => 'Bool',
default => 0,
);
option 'show_only_errors'
$self->app_log->warn('Exiting now.');
return;
}
$DB::single = 2;
if ( $self->json ) {
capture_stderr {
$self->inspect;
};
}
else {
$se
my ($tfh, $tfilename) = tempfile();
my ($jfh, $jfilename) = tempfile();
my $json = $self->serialize_to_json($jfilename);
write_file($tfilename, $source);
#
my $cmd = 'biosails-bio
use File::Slurp;
use JSON;
use Try::Tiny;
has 'remove_from_json' => (
is => 'rw',
isa => 'ArrayRef',
default => sub {
[
'remove_from_json', 'register_namespac
o_json {
my $self = shift;
my $file = shift;
my %hacky_self = %{$self};
foreach my $remove ( @{ $self->remove_from_json } ) {
delete $hacky_self{$remove};
}
my $json
= JSON->new->utf8->pretty->allow_blessed->encode( \%hacky_self );
if ($file) {
write_file( $file, $json );
}
return $json;
}
sub read_json_file {
my $self = shift;
my $fi
{
builder => 'create_reg_attr',
lookup => [
'.*_json$', '.*_yaml$', '.*_yml$', '.*_jsn$',
]
}
);
$self->set_register_pro
{
builder => 'process_directive_config',
lookup => [
'.*_json$', '.*_yaml$', '.*_yml$', '.*_jsn$',
],
}
);
};
=head3 process_directive
he other functions we need to process a rule
1. Do a sanity check of the rule - it could be yaml/json friendly but not biox friendly
2. Clone the local attr
3. Check for carrying indir/outdir INPUT/O