Sha256: 3fddc291976331bc32691a8feac65cb07c37763b97c9761a3a1dc4111bb25681
Contents?: true
Size: 383 Bytes
Versions: 108
Compression:
Stored size: 383 Bytes
Contents
NUCLEOTIDES = 'ATCG' def count(strand, abbreviation): _validate(abbreviation) return strand.count(abbreviation) def nucleotide_counts(strand): return { abbr: strand.count(abbr) for abbr in NUCLEOTIDES } def _validate(abbreviation): if abbreviation not in NUCLEOTIDES: raise ValueError('{} is not a nucleotide.'.format(abbreviation))
Version data entries
108 entries across 108 versions & 1 rubygems