how to synchronize loops?

Hello everybody!

I've files separated into 2 sets. set A contains molecules and set B contains scaffold.

set A:

- mol_1.sdf

- mol_2.sdf etc...

set B:

- mol_1-scaffold.sdf

- mol_2-scaffold.sdf etc...

I use the "SAReport" node from MOE library. I'd like it to read automatically mol_1.sdf with mol_1-scaffold.sdf, then mol_2.sdf with mol_2-scaffold.sdf etc...

Therefore, I've put 2 "List files" nodes to import the filenames. Each of them is linked to a "Tablerow to Variable Loop" node. I also have 2 "read SDF" nodes (from MOE library), one for each set (A and B). These 2 reader are connected to the "SAReport" node inputs. Then I have connected the flow variable from the "Tablerow to Variable Loop", that reads the set A variable, to the right flow variable port of the first sdf reader, and in the same way for the set B. But then I don't know where to connect my two "Loop End" nodes, so I have put one "loop end" for each SD reader, but it doesn't work!

There is a Warning message: Unable to merge flow object stacks: stack can't be merged: Conflicting FlowObjects:org.knime.core.node.workflow.FlowLoopContext@dcd4a75 vs. org.knime.core.node.workflow.FlowLoopContext@20d34e67

I don't really know what to do, and by the way, if I continue in this way, I don't know if there will be a reading synchronization...

Thanks for any help!


I'm finding it hard to visualise the workflow, can you take a screenshot.


Below, what I've done, it's a little bite different from what I said. I use an only "List files" and I split the files.



I think it maybe better to remove the SAReport node first, and let each loop complete with the Loop End nodes you have. In the output of the Loop End nodes you will a new column called iteration number, which will be a new number for each loop. You will be able to tie this number up between the molecules and the scaffolds.

So you could concetenate the two together, and now just use a single loop. So you would take an Interval Loop Start, starting at 0 and going up in 1 number steps. Attach to this a row filter node to filter using this variable on the iteration column, then use a Row Splitter node to split the molecules from the scaffolds, and then attach these to the SAReport node, and also attach a Loop End to the Row Splitter node.

If you have no easy way to separate the molecules and scaffolds, then use a RuleEngine node prior to the concetanate to add a new column with the label Molecules for one, and Scaffolds for the other.

Hopefully using the one loop, will now make it easier to complete and run. 

If this doesnt work, it may need a variable line between the Loop End node and the HTML viewer node to force this viewer node to run during each loop.

It looks a tricky one this, best I can think of.



Actually my data fit your solution! I can't say if the problem is entirely solved because of a problem with "SAReport" node, but your idea to convert the 2 loops in an unique one was great!

Thank you.