From 3881ea2117762142592d1e9a2472e01623d0961f Mon Sep 17 00:00:00 2001 From: Marco van Zwetselaar Date: Thu, 4 Feb 2016 15:18:46 +0300 Subject: [PATCH] Fix header validation. --- uf-headers | 2 +- uf-valid | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/uf-headers b/uf-headers index 085e906..7e55278 100755 --- a/uf-headers +++ b/uf-headers @@ -48,5 +48,5 @@ while [ $# -ne 0 -a "$(expr "$1" : '\(.\).*')" = "-" ]; do shift done -awk -b -O 'NR%2==1' +awk -b -O 'NR%2==1' "$@" diff --git a/uf-valid b/uf-valid index 14ec843..6ef4d68 100755 --- a/uf-valid +++ b/uf-valid @@ -164,7 +164,7 @@ awk -b -O -v P="$(basename "$0")" -v WRONG="[^$ALLOW]" -v H=$VAL_HEADERS -v Q=$Q print P ": no FASTA header found at line " NR ERR = 1 } - else if ( H && HDR !~ /^>[[:alpha:]]+\|\w+(\|\w+)*(\s+.*)?$/ ) { # rudimentary syntax check of header + else if ( H && HDR !~ /^>[[:alpha:]]+\|[[:alnum:]._]+(\|[[:alnum:]._]+)*\|?(\s+.*)?$/ ) { # rudimentary syntax check of header print P ": invalid header syntax at line " NR ": " HDR > "/dev/stderr" ERR = 1 }