hey, can someone help me with python?
can someone solve this for me?
Write a function 'kmers' that count the kmers of length 3. It should get a DNA sequence and return a dictionary with the substrings of length 3 as keys and the number of occurrences in the sequence as value. Example:
kmers('CGCTAACGCAC') = {'AAC': 1,
'ACG': 1,
'CAC': 1,
'CGC': 2,
'CTA': 1,
'GCA': 1,
'GCT': 1,
'TAA': 1}
• 94 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Show some code and errors, if any. The OP sounds like an assignment, and you should show something you've attempted.
Biostars is not a forum for providing homework answers. If this is not homework, and you've put together something that failed, then try another post that shows what you've tried and why it fails and we may be able to help point you in the right direction. Best of luck.