Skip to content

Commit

Permalink
Fix header validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
zwets committed Feb 4, 2016
1 parent 14ae2d6 commit 3881ea2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion uf-headers
Original file line number Diff line number Diff line change
Expand Up @@ -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' "$@"

2 changes: 1 addition & 1 deletion uf-valid
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 3881ea2

Please sign in to comment.