DNA by mute

while read r;do
i= s=${r#*ATG}
((${#s}==${#r}))&&s=
until [[ ${s:i:3} =~ (TAA|TAG|TGA) ]]||((i+3>${#s}));do ((i+=3));done
echo ${s:0:i}
done

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page