Recursively find the correct order of reads
<p>I've some trouble with this task for some hours, and I'm simply stuck at what to do.</p>

<p>First I need a function that takes a dictionary argument and then returns the key associated with the largest value. This is what I've tried:</p>

<pre><code>def findKeyForLargestValue(d):
    maxKey = ''
    maxValue = 0

    for name in d:
        for subName in d[name]:
            d = d[name][subName]

    if d &gt; maxValue:
        maxKey = subName

    return maxKey
</code></pre>

<p>Then I need to make a function that takes a string 'name' and a dictionary 'overlaps' as arguments which must return a list of reads names in order in which they represent the genomic sequence:</p>

<p>`def findOrder(name, overlaps):</p>

<p>readOrder = []`</p>

<p>I need to use the function findKeyForLargestValue(d) inside the other function. I need to use base case which should return [name] and recursive case which should return [name] + findOrder(nextName) where nextName is the name of the read that has the largest overlap to the right end of the current read (name).</p>

<p>Any help is appreciated because I'm really lost. Not even sure that the code for findKeyForLargestValue is correct</p>
