First of all, use backticks ```
to annotate your code for readibility. Use single ticks for inline code and triple ticks for block code.
Now, I am not sure what you mean here. Are you sure you want to do the double for loop, i.e. for h in eachindex(s1), v in eachindex(s2)
? The results may not be what you are expecting. For example, here is your script with a simple println
statement.
julia> for h in eachindex(s1), v in eachindex(s2)
println("index: $(h), value (s1): $(s1[h]), value (s2): $(s2[v])")
end
index: 1, value (s1): A, value (s2): A
index: 1, value (s1): A, value (s2): C
index: 1, value (s1): A, value (s2): T
index: 1, value (s1): A, value (s2): A
index: 1, value (s1): A, value (s2): C
index: 1, value (s1): A, value (s2): G
index: 1, value (s1): A, value (s2): T
index: 2, value (s1): C, value (s2): A
index: 2, value (s1): C, value (s2): C
index: 2, value (s1): C, value (s2): T
index: 2, value (s1): C, value (s2): A
index: 2, value (s1): C, value (s2): C
index: 2, value (s1): C, value (s2): G
index: 2, value (s1): C, value (s2): T
index: 3, value (s1): G, value (s2): A
index: 3, value (s1): G, value (s2): C
index: 3, value (s1): G, value (s2): T
index: 3, value (s1): G, value (s2): A
index: 3, value (s1): G, value (s2): C
index: 3, value (s1): G, value (s2): G
index: 3, value (s1): G, value (s2): T
index: 4, value (s1): T, value (s2): A
index: 4, value (s1): T, value (s2): C
index: 4, value (s1): T, value (s2): T
index: 4, value (s1): T, value (s2): A
index: 4, value (s1): T, value (s2): C
index: 4, value (s1): T, value (s2): G
index: 4, value (s1): T, value (s2): T
index: 5, value (s1): A, value (s2): A
index: 5, value (s1): A, value (s2): C
index: 5, value (s1): A, value (s2): T
index: 5, value (s1): A, value (s2): A
index: 5, value (s1): A, value (s2): C
index: 5, value (s1): A, value (s2): G
index: 5, value (s1): A, value (s2): T
index: 6, value (s1): C, value (s2): A
index: 6, value (s1): C, value (s2): C
index: 6, value (s1): C, value (s2): T
index: 6, value (s1): C, value (s2): A
index: 6, value (s1): C, value (s2): C
index: 6, value (s1): C, value (s2): G
index: 6, value (s1): C, value (s2): T
index: 7, value (s1): T, value (s2): A
index: 7, value (s1): T, value (s2): C
index: 7, value (s1): T, value (s2): T
index: 7, value (s1): T, value (s2): A
index: 7, value (s1): T, value (s2): C
index: 7, value (s1): T, value (s2): G
index: 7, value (s1): T, value (s2): T
You can see how the double for loop works. For every index h
of s1
, it loops over the entire string s2
.