title: merging/summing dictionaries in dictionaries
body: <p>Python 3.5</p>
  
  <p>I have a dictionary which has mutiple dictionaries which has multiple dictionaries. It looks like this (simplified):</p>
  
  <pre><code>database = {'HIV' : {'gene1' : {'val': 2, 'thr' : 4, 'met' : 5}, 
                    'gene2' : {'val': 3, 'thr' : 6, 'met' : 7}},
             'HIV2' : {'gene1' : {'val': 4, 'thr' : 1, 'met' : 6}, 
                     'gene2' : {'val': 7, 'thr' : 9, 'met' : 8}}
             }
  </code></pre>
  
  <p>Obviously I have more of everything.
  I want all the genes to be merged (in a new dictionary, so it would look like:</p>
  
  <pre><code>database2 = {'HIV' : {'genes' : {'val': 5, 'thr' : 10, 'met' : 12}},
             'HIV2' : {'genes' : {'val': 11, 'thr' : 10, 'met' : 14}}
             }
  </code></pre>
  
  <p>It might be a messy way of storing values, but it's what I have to work with.
  How can I sum up all the values for all the genes for each virus (e.g. HIV, HIV2 etc)?</p>