Given a DNA string, compute how many times each nucleotide occurs in the string.

NucleotideCountTest.fs

// This file was auto-generated based on version 1.3.0 of the canonical data.moduleNucleotideCountTestopenFsUnit.XunitopenXunitopenNucleotideCount[<Fact>]let``Emptystrand``()=letstrand=""letexpected=[('A',0);('C',0);('G',0);('T',0)]|>Map.ofList|>SomenucleotideCountsstrand|>shouldequalexpected[<Fact(Skip="Remove to run test")>]let``Cancountonenucleotideinsingle-characterinput``()=letstrand="G"letexpected=[('A',0);('C',0);('G',1);('T',0)]|>Map.ofList|>SomenucleotideCountsstrand|>shouldequalexpected[<Fact(Skip="Remove to run test")>]let``Strandwithrepeatednucleotide``()=letstrand="GGGGGGG"letexpected=[('A',0);('C',0);('G',7);('T',0)]|>Map.ofList|>SomenucleotideCountsstrand|>shouldequalexpected[<Fact(Skip="Remove to run test")>]let``Strandwithmultiplenucleotides``()=letstrand="AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC"letexpected=[('A',20);('C',12);('G',17);('T',21)]|>Map.ofList|>SomenucleotideCountsstrand|>shouldequalexpected[<Fact(Skip="Remove to run test")>]let``Strandwithinvalidnucleotides``()=letstrand="AGXXACT"letexpected=NonenucleotideCountsstrand|>shouldequalexpected