Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bin/mlst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use MLST::Requirements qw(require_exe);
#..............................................................................
# Globals

my $VERSION = '2.32.3';
my $VERSION = '2.32.4';
my $EXE = path($FindBin::RealScript)->basename;
my $AUTHOR = 'Torsten Seemann';
my $URL = 'https://github.com/tseemann/mlst';
Expand Down Expand Up @@ -208,8 +208,10 @@ for my $argv (@ARGV) {
'filename' => $argv,
'scheme' => $sch,
'sequence_type' => $ST,
'alleles' => $sch eq '-'
? undef
'status' => status_column($ST, $score, @code),
'score' => $score,
'alleles' => $sch eq '-'
? undef
: { (pairwise { ($a=>$b) } @{$scheme{$sch}->genes}, @code) },
};
}
Expand Down
4 changes: 3 additions & 1 deletion test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ setup() {
local outfile="${BATS_TMPDIR}/$name.json"
run -0 $exe --json "$outfile" example.fna.gz
[[ -r "$outfile" ]]
run -0 grep 'sequence_type' "$outfile"
run -0 grep '"sequence_type"' "$outfile"
run -0 grep '"status"' "$outfile"
run -0 grep '"score"' "$outfile"
}
@test "Using --outfile" {
local outfile="${BATS_TMPDIR}/$name.tsv"
Expand Down