Package: cpinsim
CPINSim is a package for the simulation of constrained protein interaction networks. Beside simulation of complex formation in a cell there are methods for data preprocessing provided:  Annotation of interactions and constraints with domains; A parser to provide the needed protein input format.FeaturesAnnotate interactions and constraints with domains: Infer domains from known ones where possible, set unique artificial domains otherwise.Parse the interaction and constraints files into a protein-wise text representation as input for the simulation.Simulate the complex formation in a cell for the given input proteins with regard to the interaction dependencies which are encoded as constraints. Further, the simulation of perturbation effects like knockout or overexpression of one or multiple proteins is possible.System requirementspython3networkxscipybitarrayInstallationWe recommend the installation using conda:$condacreate-ncpinsim-cbiocondacpinsim$sourceactivatecpinsim# You now have a 'cpinsim' script; try it:$cpinsim--help# To switch back to your normal environment, use$sourcedeactivateAlternatively, you can download the source code fromgithuband install it using the setup script:$gitclonehttp://github.com/BiancaStoecker/cpinsim.gitcpinsim$cdcpinsim/cpinsimpythonsetup.pyinstallIn this case you have to install the requirements listed above.Platform supportCPINSim is a pure Python program. This means that it runs on any operating system (OS) for which Python 3 and the other packages are available.Example usageThe needed input fileproteins_extended_adhesome.csvcan be downloaded from the git repository viawgethttps://raw.githubusercontent.com/BiancaStoecker/cpinsim/master/example_files/proteins_extended_adhesome.csvExample 1:Simulate the complex formation for proteinsproteins_extended_adhesome.csvwith 100 copies per protein (-n). Save the simulated graph atsimulated_graph.gzand some logging information about the simulation steps atsimulation.log.For further parameters the default values are used.$cpinsimsimulateexample_files/proteins_extended_adhesome.csv-n100-ogsimulated_graph.gz-olsimlation.logExample 2:Simulate the complex formation as in example 1, but now knock out the proteinFYNand overexpress the proteinABL1by factor 5.$cpinsimsimulateexample_files/proteins_extended_adhesome.csv-n100-ogsimulated_graph_ko_FYN_oexp_ABL1.gz-olsimlation_ko_FYN_oexp_ABL1.log-pFYN0-pABL15To investigate the simulation results one can extract the simulation graph in a python shell and for example look at the node lists of the resulting complexes:importpickle,gzipimportnetworkxasnxwithgzip.open("simulated_graph.gz","rb")asf:# load graph, each complex is a connected componentgraph=pickle.load(f)# get list of complexes sorted descendingly by their number of nodescomplexes=sorted(list(nx.connected_component_subgraphs(graph)),key=len,reverse=True)# print the first 5 complexesforcincomplexes[:5]:# nodes have unique integer ids, for protein name the "name" attribut is neededprint([c.node[node]["name"]fornodeinc])With the steps above,complexescontains each protein complex as full networkx graph datastructure for further analysis.Additional example files for the data preprocessing steps and a full workflow including the evaluation of the simulation results will we uploaded in the near future.