Commit f816e3ce by Eric Coissac

Modify script to accept compressed genome files

parent 15ec72ca
#!/bin/bash
grep -A 1 ' ORGANISM' $* | \
( \
for f in $* ; do \
if [[ "$f" =~ \.gz$ ]] ; then \
GREP=zgrep; \
else \
GREP=grep; \
fi; \
${GREP} -H -A 1 ' ORGANISM' $f; \
done \
) | \
grep -B 1 Viridiplantae | \
gawk '{print $1}' | \
grep '\.gbk' | \
sed -E 's/(^.*\.gbk).$/\1/' | \
sed -E 's/(^.*\.gbk(.gz)?).$/\1/' | \
uniq
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment