I have 2 file
file 1-
colIDs rowIDs
M1 M2
M1 M3
M3 M1
M3 M2
M4 M5
M7 M6
file 2-
Pcol Mcol
P1 M1,M2,M5,M6
P2 M1,M2,M3,M5
P3 M4,M5,M7,M6
I want to count the frequency
of the file 1 pair of column 1 and column 2 in file 2 Mcol.
Expected output-
colIDs rowIDs freq
M1 M2 2
M1 M3 1
M3 M1 1
M3 M2 1
M4 M5 1
M7 M6 1