Sha256: 5cc23950f3a715ba8cddaddbbe7c1daa410e9ec3226c58d085e066b33f53eac3

Contents?: true

Size: 259 Bytes

Versions: 257

Compression:

Stored size: 259 Bytes

Contents

function count_nucleotides(strand::AbstractString)
    counter = Dict('A' => 0, 'C' => 0, 'G' => 0, 'T' => 0)
    for sym in strand
        sym in keys(counter) || error("Invalid nucleotide in strand")
        counter[sym] += 1
    end
    return counter
end

Version data entries

257 entries across 257 versions & 1 rubygems

Version Path
trackler-2.2.1.130 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.129 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.128 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.127 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.126 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.125 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.124 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.123 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.122 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.121 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.120 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.119 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.118 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.117 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.116 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.115 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.114 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.113 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.111 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.110 tracks/julia/exercises/nucleotide-count/example.jl