Skip to content

Commit 3054f6d

Browse files
committed
Merge branch 'master' into develop
2 parents cca4d01 + 0f93946 commit 3054f6d

File tree

6 files changed

+36
-4
lines changed

6 files changed

+36
-4
lines changed

Changes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ Revision history for BioX-Workflow-Command
22

33
{{$NEXT}}
44

5+
2.0.8 2017-05-04 14:30:02 +04
6+
- Cleaned up logging to create a table - no more wall of text!
7+
- Fixed HPC meta to correctly overwrite global when global/local are arrayref of keys
8+
- Follow symbolic links when looking for Samples
9+
- Throw an error when making a directory fails
10+
511
2.0.7 2017-05-01 12:32:58 +04
612
- Added in chunking functionality
713

META.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"web" : "https://github.com/jerowe/BioX-Workflow-Command"
111111
}
112112
},
113-
"version" : "2.0.7",
113+
"version" : "2.0.8",
114114
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0225"
115115
}
116116

lib/BioX/Workflow/Command.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package BioX::Workflow::Command;
22

33
use v5.10;
4-
our $VERSION = '2.0.7';
4+
our $VERSION = '2.0.8';
55

66
use MooseX::App qw(Color);
77
use MooseX::Types::Path::Tiny qw/Path/;

lib/BioX/Workflow/Command/run/Utils/Directives.pm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,13 @@ has 'HPC' => (
264264
##This is useful for features where we want to do things like
265265
##split a file into parts
266266
##count by kmers, etc
267+
=head2 Iterables
268+
269+
Lists to iterate by
270+
271+
Chunks and chroms are included by default
272+
273+
=cut
267274

268275
has 'chunks' => (
269276
is => 'rw',
@@ -283,6 +290,15 @@ has 'use_chunks' => (
283290
}
284291
);
285292

293+
294+
has 'chroms' => (
295+
is => 'rw',
296+
isa => 'ArrayRef',
297+
default => sub {
298+
return [1 .. 22, 'X', 'Y', 'MT'];
299+
},
300+
)
301+
286302
=head2 stash
287303
288304
This isn't ever used in the code. Its just there incase you want to persist objects across rules

lib/BioX/Workflow/Command/run/Utils/Rules.pm

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use Data::Merger qw(merger);
66
use Data::Walk;
77
use Data::Dumper;
88
use File::Path qw(make_path remove_tree);
9+
use Try::Tiny;
910

1011
with 'BioX::Workflow::Command::Utils::Files::TrackChanges';
1112
use BioX::Workflow::Command::Utils::Traits qw(ArrayRefOfStrs);
@@ -655,8 +656,16 @@ sub walk_attr {
655656

656657
$attr->walk_process_data( $self->rule_keys );
657658

658-
if ( $attr->create_outdir ) {
659-
make_path( $attr->outdir );
659+
if ( $attr->create_outdir && !$attr->outdir->is_dir ) {
660+
661+
try {
662+
$attr->outdir->mkpath;
663+
}
664+
catch {
665+
$self->app_log->fatal( "We were not able to make the directory.\n\t"
666+
. $attr->outdir
667+
. "\n\tError: $!" );
668+
};
660669
}
661670

662671
return $attr;

t/lib/TestsFor/BioX/Workflow/Command/run/Test004.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ sub test_001 {
152152
my $expect_log = <<EOF;
153153
; \\
154154
biox file_log \\
155+
\t--exit_code `echo \$\?` \\
155156
\t--file $test_dir/data/raw/Sample_02/some_input_rule1 \\
156157
\t--file $test_dir/some_output_rule1\n
157158
EOF

0 commit comments

Comments
 (0)