Sha256: a888842fce840b772145d190ca035a380845ccd691690a06899242f6687ee36c
Contents?: true
Size: 289 Bytes
Versions: 300
Compression:
Stored size: 289 Bytes
Contents
declare -A trans trans[G]='C' trans[C]='G' trans[A]='U' trans[T]='A' for i in $(seq 1 ${#1}); do nt="${1:$i-1:1}" comp_nt="${trans[$nt]}" if [ -z "$comp_nt" ]; then echo 'Invalid nucleotide detected.' exit 1 fi complement="$complement$comp_nt" done echo $complement
Version data entries
300 entries across 300 versions & 1 rubygems