1 - I moved the self.decomposition_depth += 1 to after the if not len(self.node_ids_to_analyze): so that the decomposition depth is not incremented before this check has been made (else, upon exiting after no decomposition, it looks as though one round of decomposition was completed).
2 and 3 - I pass in the decomposition depth to the update_final_nodes method so that we can check for the specific instance where the nodes considered to be final nodes may be the root node, when no decomposition has occurred.
N.B. I have only run two tests and these tests only involve the actual decomposition and output of count tables. They do not include figure generation etc. I ran on a set of sequences that undergo decomposition in the expected manner. And I ran on a set of sequences that were causing me trouble (i.e. 0 decomposition of the root node). For the former, the results are exactly the same before and after my changes. For the latter, the changes fix the problem and the root node is included in the final nodes.
Given that I haven't tested the creation of figures etc., I'm more than happy for you not to include this commit - as you like. I run a stripped down version of your code in SymPortal to which I will make these changes so that I can keep running MED.
Hi @meren,
I've made 3 minor changes.
1 - I moved the
self.decomposition_depth += 1
to after theif not len(self.node_ids_to_analyze):
so that the decomposition depth is not incremented before this check has been made (else, upon exiting after no decomposition, it looks as though one round of decomposition was completed).2 and 3 - I pass in the decomposition depth to the
update_final_nodes
method so that we can check for the specific instance where the nodes considered to be final nodes may be the root node, when no decomposition has occurred.N.B. I have only run two tests and these tests only involve the actual decomposition and output of count tables. They do not include figure generation etc. I ran on a set of sequences that undergo decomposition in the expected manner. And I ran on a set of sequences that were causing me trouble (i.e. 0 decomposition of the root node). For the former, the results are exactly the same before and after my changes. For the latter, the changes fix the problem and the root node is included in the final nodes.
Given that I haven't tested the creation of figures etc., I'm more than happy for you not to include this commit - as you like. I run a stripped down version of your code in SymPortal to which I will make these changes so that I can keep running MED.
Thanks again for your help.
Ben
Command run for testing: