I have datasets containing mutations for 26 samples (so 26 different sets of data) and I want to compare how similar they are to themselves. So for example, I would like to compare how Sample 1 is similar to Sample 1 to 26 for each of the 26 samples. At the end, I hope to get something like a heat map where the first row and first column are each of the 26 samples.
Someone has suggested using the intersect and union function in R to calculate the similarity but that would be very laborious as I would have to run the functions 676 times (26*26).
Is there any program to do this quickly or is there a way that I could make this more efficient in R?