From 0184a09d0f69293f4944ddd2d7415430a50b4539 Mon Sep 17 00:00:00 2001 From: Torsten Seemann Date: Sun, 9 Jul 2017 10:35:41 +1000 Subject: [PATCH] Issue #5 - skip over unreadable files --- bin/abricate | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/abricate b/bin/abricate index 48df330..b738a15 100755 --- a/bin/abricate +++ b/bin/abricate @@ -93,6 +93,10 @@ for my $file (@ARGV) { my %seen; my @hit; msg("Processing: $file"); + if (! -r $file) { + msg("WARNING: '$file' does not exist, or is unreadable"); + next FILE; + } my $cmd = "(gzip -d -c -f \Q$file\E | seqret -auto -filter -osformat2 fasta |" . " blastn -db \Q$db_path\E -outfmt '$format'" . " -task blastn -evalue 1E-20 -dust no -max_target_seqs 10000 -perc_identity $minid"