Sha256: 4a36059e34540dc789bab33a83e5cd1a2f18e79cf0da5c56926423a414d91999
Contents?: true
Size: 377 Bytes
Versions: 288
Compression:
Stored size: 377 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('%s is not a nucleotide.' % abbreviation)
Version data entries
288 entries across 288 versions & 1 rubygems