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.49 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.48 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.47 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.46 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.45 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.44 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.43 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.42 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.41 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.40 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.39 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.38 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.37 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.36 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.35 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.34 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.33 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.32 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.31 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.30 tracks/julia/exercises/nucleotide-count/example.jl