for site in 1:nsites votes[1] = votes[2] = votes[3] = votes[4] = votes[5] = 0 for seq in 1:neqs nuc = mat[seq, site] votes[1] += iscompatible(nuc, DNA_A) votes[2] += iscompatible(nuc, DNA_C) votes[3] += iscompatible(nuc, DNA_G) votes[4] += iscompatible(nuc, DNA_T) votes[5] += iscompatible(nuc, DNA_Gap) end end
quote # REPL[63], line 2:
begin
$(Expr(:inbounds, true))
for site = 1:nsites # REPL[63], line 3:
votes[1] = (votes[2] = (votes[3] = (votes[4] = (votes[5] = 0)))) # REPL[63], line 4:
for seq = 1:neqs # REPL[63], line 5:
nuc = mat[seq,site] # REPL[63], line 6:
votes[1] += iscompatible(nuc,DNA_A) # REPL[63], line 7:
votes[2] += iscompatible(nuc,DNA_C) # REPL[63], line 8:
votes[3] += iscompatible(nuc,DNA_G) # REPL[63], line 9:
votes[4] += iscompatible(nuc,DNA_T) # REPL[63], line 10:
votes[5] += iscompatible(nuc,DNA_Gap)
end
end
$(Expr(:inbounds, :pop))
end
end
@inline function iscompatible{T<:Nucleotide}(x::T, y::T) return compatbits(x) & compatbits(y) != 0end
# Return the compatibility bits of `nt`.@inline function compatbits(nt::Nucleotide) return reinterpret(UInt8, nt)end