Skip to content

Commit 5ef427a

Browse files
committed
Merge branch 'master' into develop
2 parents 0a1d877 + 6d2b216 commit 5ef427a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

lib/BioX/Workflow/Command/Utils/Plugin.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use MooseX::App::Role;
66

77
use Cwd qw(getcwd);
88
use Try::Tiny;
9+
use strict;
910

1011
with 'MooseX::Object::Pluggable';
1112

lib/BioX/Workflow/Command/stats.pm

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ use Text::ASCIITable;
88
use Number::Bytes::Human qw(format_bytes parse_bytes);
99
use File::Details;
1010
use File::Basename;
11+
use List::MoreUtils qw(uniq);
1112

1213
extends qw( BioX::Workflow::Command );
14+
1315
use BioX::Workflow::Command::Utils::Traits qw(ArrayRefOfStrs);
1416
use BioX::Workflow::Command::run::Utils::Directives;
1517

@@ -138,7 +140,8 @@ sub gen_row {
138140
my $sample = shift;
139141
my $sample_files = shift;
140142

141-
foreach my $file (@$sample_files) {
143+
my @uniq = uniq(@{$sample_files});
144+
foreach my $file (@uniq) {
142145

143146
my @trow = ();
144147

@@ -147,11 +150,14 @@ sub gen_row {
147150
push( @trow, $cond );
148151

149152
my $rel = '';
153+
$rel = $file ;
150154
$rel = File::Spec->abs2rel($file) if $self->use_full;
151-
$rel = basename($file) unless $self->use_full;
155+
156+
my $basename = basename($file) unless $self->use_full;
152157

153158
#Add the filename
154-
push( @trow, $rel );
159+
push( @trow, $rel ) if $self->use_full;
160+
push( @trow, $basename ) if !$self->use_full;
155161

156162
#Does the file exist?
157163
if ( -e $file ) {

0 commit comments

Comments
 (0)