For calculing the graph Laplacian L, it's needed the Adjacency matrix. I have the protein list (nodes):
['A', 'B', 'C', 'D', 'E', 'F']
And the intreaction list between this proteins (edges):
[('B', 'A'), ('D', 'A'), ('F', 'D'), ('A', 'D'), ('A', 'B'), ('E', 'B'), ('C', 'D'), ('E', 'C'), ('D', 'B'), ('C', 'E'), ('A', 'C'), ('C', 'B'), ('B', 'D'), ('D', 'F'), ('B', 'E'), ('C', 'A'), ('D', 'C'), ('B', 'C')]
How can I convert the list into a adjacency matrix with values of 1 if interaction occurs or 0 if not, only using numpy.
The output would be:
A B C D E F
A 0 1 1 1 0 0
B 1 0 1 1 1 0
C 1 1 0 1 1 0
D 1 1 1 0 0 1
E 0 1 1 0 0 0
F 0 0 0 1 0 0