Sha256: 7161f2664d785b021c8c94afbe1197528fcb39f291199ad41ebe077844a9af3d

Contents?: true

Size: 242 Bytes

Versions: 49

Compression:

Stored size: 242 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) || throw(DomainError())
        counter[sym] += 1
    end
    return counter
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.158 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.157 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.156 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.155 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.154 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.153 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.152 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.151 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.150 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.149 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.148 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.147 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.146 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.145 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.144 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.143 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.142 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.141 tracks/julia/exercises/nucleotide-count/example.jl
trackler-2.2.1.140 tracks/julia/exercises/nucleotide-count/example.jl