This is a test version of Biostars. For the public version, visit https://www.biostars.org.
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}

python dna seq help bio

can someone solve this for me?

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.

0 answers

No answers yet.

Log in to answer this question.