I have a data frame that looks like this:
Chr start stop ref alt Hom/het ID
chr1 5179574 5183384 ref Del Het 719
chr1 5179574 5184738 ref Del Het 915
chr1 5179574 5184738 ref Del Het 951
chr1 5336806 5358384 ref Del Het 376
chr1 5347979 5358384 ref Del Het 228
I would like to merge any duplicate rows, combining the last ID column so that all IDs are in one row/column, like this:
Chr start stop ref alt Hom/het ID
chr1 5179574 5183384 ref Del Het 719
chr1 5179574 5184738 ref Del Het 915, 951
chr1 5336806 5358384 ref Del Het 376
chr1 5347979 5358384 ref Del Het 228
I have found examples of people removing duplicates and summing a column, but I just want to combine all IDs with duplicate regions in a list in a single column.