Files
annotate/summarize_annot.sh
Eric Coissac 3d9be22e1d Small changes
Former-commit-id: bf83f19efe2590803c089697858590aee4720089
Former-commit-id: e7d0bae099d6449b97c431f7ba82568f45bcc005
2023-05-11 14:29:43 +02:00

30 lines
478 B
Bash
Executable File

#!/bin/bash
resume_ft() {
local input=$1
grep -E "^FT (CDS|rRNA|tRNA) |/gene=" ${input} \
| awk '
/\/gene=/ && (gene!=1) {
print $0;
gene=1
}
/^FT (CDS|rRNA|tRNA)/ {
print $0;
gene=0
}'
}
count_tRNA() {
local input=$1
resume_ft $input \
| grep '^FT tRNA' \
| wc -l
}
printf "tRNA genes : %d\n" "$(count_tRNA $1)"