#!/usr/bin/pythonimportpypathimportitertoolspa=pypath.PyPath()# uncomment either (A) or (B)# (A) Load only causal resources:# pa.init_network(pypath.data_formats.pathway)# pa.load_resources(pypath.data_formats.ptm)# pa.third_source_directions()# pa.remove_htp(threshold = 1, keep_directed = True)# pa.remove_undirected(min_refs = 2)# pa.clean_graph()# (B) or load the full OmniPath:# pa.load_omnipath()# enzyme-substrate interactions can not be translated# need to be removed and loaded again:if'ptm'inpa.graph.es.attributes():delpa.graph.es['ptm']# translate to mouse (10090)pa.orthology_translation(10090)# load mouse enzyme-substrate interaction data:pa.load_ptms()# Ready.
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.