Group Loop / Loop Close problem

Greetings once again! Another issue with reporting from MOSAIQ in Oncology that I can’t seem to crack.

I have a report that pulls tumour markers (currently about 13 in total) status in cancers (e.g., PD-LI = 10%, ROS1 = normal). The report has a column called “Test” which contains the terms “PD-L1” and “ROS1”, a column to identify the patient, a column with the date of the test, and a column that provides the result (“10%”, “normal”). So a simple structure.

I want to write out all the PD-L1 data into a single Excel spreadsheet (“PD-L1.xlsx”) and all the ROS1 data into another Excel spreadsheet (“ROS1.xlsx”). I know that I can do that with 13 separate Row Splitter functions, but I can also do it with Group Loop Start/Loop End function.

Here is my current arrangement (there have been many previously!)

Group Loop Start selects “Test”.
String Manipulation (Variable) selects “string($${IcurrentIteration}$$)”.
Excel Writer has the path “P:\LungCancerMarkers\ + $${IcurrentIteration}$$ + .xlsx” and the created variable (none to choose) as IcurrentIteration.

While it runs, only one file is produced, so it’s obviously not working.

Apologies once again for being so inept, but can you help me please? Thanks in advance,

A

How are you passing the dynamic path to the Excel Writer node?

2 Likes

Dear @rfeigel

Thank you for the prompt reply.

That question is, I believe, the crux of the problem! I have looked through various similar problems but I think I am missing the correct transfer.

Here is a section of the report with the data:

PatientID Test TestDate Result
69371 p16 2021-07-16 --
75750 SUVn_max 2020-02-17 2.8
77687 PD-L1 2020-06-16 1%
77687 SUVp_max 2020-06-23 12.1
76988 PD-L1 2020-04-23 95%
79466 PD-L1 2020-10-23 20%
76944 PD-L1 2020-04-28 3%
76000 PD-L1 2020-01-13 70%
76463 PD-L1 2020-03-06 5%
81857 PD-L1 2021-06-16 99%
73531 SUVn_max 2019-07-31 4.8

Hopefully this is helpful. My role is as an oncologist and while I am savy in IT gneralities, I am not in coding level issues, not without a lot of hand holding!

A

I have made some alterations, and I can see recursive looping in the process (flashing boxes), BUT it is not writing out separate files, and there is an error message.

I have uploaded the current process as it stands. Data included, all deidentified.

KNIME_AAM.knwf (57.5 KB)

Thanks for the help,

A

Hi @AAM

Your idea with the Group Loop should work more or less .
And add a String to Path (Variable) . And Remove the Loop End

The wf you provided is empty. So I can’t check the configuration of the nodes,
You need to uncheck: reset workflow before exporting

Gr. Hans

1 Like

Dear @HansS

Thank you for the reply. I have made the changes you suggest and remade the workflow. I see the sense in the changes you have suggested, however, when it runs, I am still getting a single file, not the 13 or so that I was hoping for. I suspect that this may be buried in the configurations.

KNIME_LungMarkers_AAM.knwf (289.0 KB)

1 Like

Hi @AAM

This wf should work : HansS_KNIME_LungMarkers_AAM.knwf (498.1 KB)

I had to remove some punctuations from Test :, to get proper filenames.
the excel reader use the path as a flow variable.

gr. Hans

3 Likes

Dear @HansS

Thank you so much, it does work as intended!

As I am using KNIME on Linux at home, I can’t see what you did to Excel Writer (the variable assignation isn’t there AFAICanSee), but I’ll look closer when I return to work.

A

1 Like