BEL to SPIA matrix

This notebook outlines how to export the SPIA matrix of a given BEL graph using PyBEL-Tools


In [9]:
import requests
import pybel
from pybel_tools.analysis.spia import *

In [2]:
response = requests.get('https://raw.githubusercontent.com/pharmacome/knowledge/master/hbp_knowledge/albuquerque2009.bel.json')

In [3]:
graph = pybel.from_json(response.json())

In [12]:
spia_matrix = bel_to_spia_matrices(graph)

spia_matrices_to_excel(spia_matrix, 'spia.xlsx')


100%|██████████| 495/495 [00:00<00:00, 22670.68it/s]

In [ ]: