multiple rows in one for gene mutation analysis

Hi

I have a dabatase with multiple mutations for a big number of patients (more than 1000). I wish to put on the same row the mutations for each patient. Is it possible to automate it?
Here an example of how is the db now

|ID Gene|

|1| KRAS|
|1| p53|
|1| STK11|
|2| EGFR|
|2| p53|
|3| STK11|
|3| KEAP1|
|3| p53|

And how I need to format

|ID| EGFR KRAS STK11 p53 Keap1

|1| 0 1 1 1 0
|2| 1 0 0 1 0
|3 0 0 1 1 1

I hope I described it clearly!
thank you to everyone can help me!!

Hi @filippogd

Welcome to KNIME Forum.

After you add a Dummy Column =1 to your dataset, you can you Pivot your data. See
multiple_rows_in_one.knwf (36.2 KB)
Schermafdruk van 2022-10-17 20-48-08
gr. Hans

1 Like

Hi @HansS !
It worked perfectly! Thank you very much!!!
Filippo

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.