Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jerowe committed Jul 6, 2017
2 parents 16d7b2e + 72f1e63 commit 3e72bdd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 32 deletions.
6 changes: 3 additions & 3 deletions lib/BioX/Workflow/Command/run/Rules/Rules.pm
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ sub walk_indir_outdir {

my $text = $attr->interpol_directive( $attr->outdir );

$DB::single = 2;
# $DB::single = 2;
$self->walk_indir_outdir_sample( $attr, $text );
}

Expand Down Expand Up @@ -846,7 +846,7 @@ sub check_indir_outdir {
my $self = shift;
my $attr = shift;

$DB::single = 2;
# $DB::single = 2;
return unless $attr->by_sample_outdir;
return unless $self->has_sample;
return if $attr->override_process;
Expand Down Expand Up @@ -893,7 +893,7 @@ Outdir should be global_attr->outdir/rule_name
sub carry_directives {
my $self = shift;

$DB::single = 2;
# $DB::single = 2;
$self->local_attr->outdir(
$self->global_attr->outdir . '/' . $self->rule_name );

Expand Down
3 changes: 3 additions & 0 deletions lib/BioX/Workflow/Command/run/Utils/Files/ResolveDeps.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ sub add_graph {
my $self = shift;
my $cond = shift;

return unless $self->files;
return unless $self->has_files;

for my $file ( $self->all_files ) {
if ( !exists $self->rule_deps->{ $self->rule_name }->{$cond}->{$file} )
{
Expand Down
15 changes: 3 additions & 12 deletions lib/BioX/Workflow/Command/run/Utils/Files/TrackChanges.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ Files just for this rule
##TODO Make this a hash?
=cut

# has 'files' => (
# traits => ['Hash'],
# is => 'rw',
# isa => 'HashRef',
# default => sub { {} },
# handles => {
# files_pairs => 'kv',
# clear_files => 'clear',
# },
# );

has 'files' => (
traits => ['Array'],
is => 'rw',
Expand Down Expand Up @@ -87,7 +76,9 @@ sub walk_INPUT {
return unless $ref_name;
return unless $ref_name eq 'Path::Tiny';

$self->push_files( $ref->absolute );
my $file = $ref->absolute;
$file = "$file";
$self->push_files( $file );
}

1;
36 changes: 19 additions & 17 deletions lib/BioX/Workflow/Command/stats.pm
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,25 @@ has 'app_log_file' => (
return $log_file;
}
);

has '+app_log' => (
has 'app_log' => (
is => 'rw',
default => sub {
my $self = shift;
my $app_log_file = $self->app_log_file;
my $log_conf = <<EOF;
log4perl.category = DEBUG, LOGFILE
log4perl.appender.LOGFILE=Log::Log4perl::Appender::File
log4perl.appender.LOGFILE.filename=$app_log_file
EOF

$log_conf .= <<'EOF';
log4perl.appender.LOGFILE.mode=append
log4perl.appender.LOGFILE.layout=PatternLayout
log4perl.appender.LOGFILE.layout.ConversionPattern=[%d] %m %n
EOF

Log::Log4perl->init( \$log_conf );
my $self = shift;
Log::Log4perl->init( \ <<'EOT');
log4perl.category = FATAL, Screen
log4perl.appender.Screen = \
Log::Log4perl::Appender::ScreenColoredLevels
log4perl.appender.Screen.layout = \
Log::Log4perl::Layout::PatternLayout
log4perl.appender.Screen.layout.ConversionPattern = \
[%d] %m %n
EOT
return get_logger();
},
lazy => 1,
);


has 'table_log' => (
is => 'rw',
default => sub {
Expand Down Expand Up @@ -120,6 +117,11 @@ around 'pre_FILES' => sub {

$self->$orig( $attr, $cond );

return unless $self->has_files;
return unless $self->files;

$DB::single=2;

for my $file ( $self->all_files ) {
$self->preprocess_row( $file, $cond );
}
Expand Down

0 comments on commit 3e72bdd

Please sign in to comment.