What is the reverse complement of GCTAGCT?
function pattern_RC(dna)
R_dna = “”
ln = length(dna)
for i in ln:-1:1
if dna[i] == “A”
R_dna = R_dna * “T”
elseif dna[i]== “T”
R_dna = R_dna * “A”
elseif dna[i]== “G”
R_dna = R_dna * “C”
elseif dna[i]== “C”
R_dna = R_dna * “G”
else
#println(“Error in the code”)
end
end
return R_dna
end
dna= “GCTAGCT”
R_dna = pattern_RC(dna)
println("Reverse Complement of DNA strand is : ", R_dna)
I am sorry for simple stupid question. But I am trying to learn Julia by doing.