--- ``` @startuml start :Start; while (Noch mehr Nukleotide?) is (Ja) :Nukleotid aus der Sequenz holen; if (Nukleotid ist 'A') then (Ja) :Ersetze durch 'T'; elseif (Nukleotid ist 'T') then (Ja) :Ersetze durch 'A'; elseif (Nukleotid ist 'G') then (Ja) :Ersetze durch 'C'; else (Nein) :Ersetze durch 'G'; endif :Ergebnis speichern; endwhile (Nein) :Reverse; :Ausgeben; stop @enduml ```
--- ``` @startuml start :Start; while (Noch mehr Nukleotide?) is (Ja) :Nukleotid aus der Sequenz holen; if (Nukleotid ist 'A') then (Ja) :Ersetze durch 'T'; elseif (Nukleotid ist 'T') then (Ja) :Ersetze durch 'A'; elseif (Nukleotid ist 'G') then (Ja) :Ersetze durch 'C'; elseif (Nukleotid ist 'C') then (Ja) :Ersetze durch 'G'; else (Nein) :Ersetze durch '_'; endif :Ergebnis speichern; endwhile (Nein) :Reverse; :Ausgeben; stop @enduml ```
--- ``` @startuml start :Start; partition "Initialization" { :original_alphabet = ['A', 'T', 'G', 'C']; :replace_alphabet = ['T', 'A', 'C', 'G']; :reverse_comp_sequence = []; } while (nucleotide left in dna_sequence) is (true) :nucleotide = Get next nucleotide; if (nucleotide is in original_alphabet) then (Yes) :index = Index of nucleotide in original_alphabet; :replacement = Get element from replace_alphabet using index; :Add replacement to reverse_comp_sequence; else (No) :Add '_' to reverse_comp_sequence; endif endwhile (false) :Reverse reverse_comp_sequence; :return Concatenate reverse_comp_sequence as string; @enduml ```