Files
annotate/detectors/normalize/tools/selectViridiplantae.sh
Eric Coissac 831669433e Switch to a swissprot based reference database for CDS annotation
Former-commit-id: 3da31ce8a135394ecac041291134d61f11f06d8f
Former-commit-id: 406f41a7cb2db14ea832480b86f72a11d3b0ab4a
2022-02-16 22:50:17 +01:00

23 lines
695 B
Bash
Executable File

#!/bin/bash
# -- CAUTION -- Works as long than the script
# is not called through a symlink
THIS_DIR="$(dirname ${BASH_SOURCE[0]})"
source "${THIS_DIR}/../../../scripts/bash_init.sh"
( \
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 | \
$AwkCmd '{print $1}' | \
grep '\.gbk' | \
sed -E 's/(^.*\.gbk(.gz)?).$/\1/' | \
uniq