Skip to content

Commit

Permalink
In uf-bare check for accidental application to non-unfasta
Browse files Browse the repository at this point in the history
  • Loading branch information
zwets committed Jun 23, 2018
1 parent 585ad3d commit 3ff6601
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uf-bare
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ done

# Do the work

awk -b -O -v F="$HDRSFILE" '
awk -b -O -v F="$HDRSFILE" -v P="$(basename "$0")" '
NR%2==1 && substr($0,1,1) != ">" { print P ": warning: discarding line that does not look like a FASTA header: " $0 > "/dev/stderr" }
NR%2==1 && F { print > F }
NR%2==0' "$@"

Expand Down

0 comments on commit 3ff6601

Please sign in to comment.