{"id":24529096,"url":"https://github.com/saezlab/omnipath_analysis","last_synced_at":"2025-08-16T12:34:05.273Z","repository":{"id":77872896,"uuid":"178004647","full_name":"saezlab/omnipath_analysis","owner":"saezlab","description":"analysis and visualization workflows for the OmniPath 2 paper","archived":false,"fork":false,"pushed_at":"2020-12-20T19:53:36.000Z","size":7931,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-15T17:45:08.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saezlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-27T13:53:42.000Z","updated_at":"2023-02-10T10:16:45.000Z","dependencies_parsed_at":"2023-02-28T07:45:59.287Z","dependency_job_id":null,"html_url":"https://github.com/saezlab/omnipath_analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saezlab/omnipath_analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fomnipath_analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fomnipath_analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fomnipath_analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fomnipath_analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saezlab","download_url":"https://codeload.github.com/saezlab/omnipath_analysis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fomnipath_analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270709084,"owners_count":24631992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T07:34:47.372Z","updated_at":"2025-08-16T12:34:05.216Z","avatar_url":"https://github.com/saezlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The OmniPath paper analysis suite\n\nThis repository contains a Python module and an R package.\nThe purpose of both is to process and analyse the database contents of\nOmniPath, export tables and create figures.\nAs the data always comes from the `pypath` Python module, the `omnipath2`\nPython module in this repository is responsible for the extraction of the\ndata from all main database domains of OmniPath (network, enzyme-substrate,\ncomplexes, annotations, inter-cellular communication).\n\nThe `omnipath2.database` module builds all databases according to the\nparameters provided and saves them into `pickle` files. This way to load\nall databases takes only 2-5 minutes.\n\nVarious modules extract information from the databases and generate tables\nor create figures. For almost all plotting we use the `matplotlib` powered\nbase class in `omnipath2.plot`.\n\nSome of the tables are supplementary tables, but we compile a number of\ntables to provide input for the R package.\n\nThe `omnipath2` R package in the `R` directory reads these tables, further\nprocesses the data and creates further figures.\n\n## Workflow\n\nThe `main` module contains a description of the workflow and a class to call\nall its elements.\n\n## Database\n\nThe class `database.Database` has the methods to compile the data in order\nto make sure we use the databases always the same way. Also it saves\neach database to pickles and serves them to all the other modules. It\nis instantiated in `__init__.py` hence you can do for example to get the\nomnipath network:\n    \n```\nimport omnipath2\nop = omnipath2.data.get_db('omnipath')\n```\n\n## Networks\n\nAt the moment I created 2 PPI networks, one is called `omnipath` and\ncorresponds more or less to the data in the web service, it contains\nall the `extra` datasets; and the other one called `curated` and\ncontains only the literature curated data. In addition we have the\nTF-target, miRNA-mRNA and TF-miRNA networks.\n\n## Extracting data from the databases\n\nA number of methods for combining the network with the intercell\nannotations are already in the `pypath.annot.CustomAnnotation` class,\nhence we don't need to implement these in `omnipath2`. Also for each\ndatabase domains lots of methods to query various numbers and subsets\nare in the relevant class in `pypath`, so we only need to call these.\nJust 2 examples:\n`pypath.intercell.IntercellAnnotation.degree_inter_class_network_inhibitory`\nwill provide the degree distribution of inhibitory edges between 2\nintercell classes, or\n`pypath.main.PyPath.interactions_mutual_by_resource` will return the\nmutual interactions grouped by resource, and so on.\n\n## Plotting in R\n\nThe `r_preprocess` module  exports tables for the R plotting scripts\n-- By default figures and tables are exported to the `figures` and\n`tables` directories into a subdirectory with the current date e.g.\n`tables/20191028/intercell_classes_20191028.tsv`, also each file name\nby default contains the date. In the `R` directory there is an R package\ncalled `omnipath2`; this works from the tables exported by the Python module.\n\n## Supplementary tables\n\nThe `supptables` module compiles and exports the supplementary tables S2-S6\nwith lots of numbers about each database domain.\n\n## Parameters\n\nThe file names are in the `omnipath2.settings` module and might\ncontain variable fields as for certain figures we have more different\nversions, e.g. compiled from different networks\n\n## Color palettes\n\nThe `omnipath2.colors` module reads the palettes and provides them\nto the other modules.\n\n## Plotting in Python\n\nThe `omnipath2.plot` module contains a base class `PlotBase` which we use\nfor most of the plots.\nThe `omnipath2.intercell_plots`, `omnipath2.annotation_plots`,\n`omnipath2.network_plots`, `omnipath2.complexes_plots` modules have the\nplots created by Nico and wrapped into classes inheriting from\n`omnipath2.plot.PlotBase`.\n\n## Directory structure\n\nThe directories can be customized in the `settings` module.\nOne directory, by default `pickles`, contains the pickle dumps of the\ndatabases.\nThe `figures` and `tables` directories contain the figures and tables\ngenerated by the module. Both the Python and the R methods use the\nsame directories. Optionally the figures and tables can be collected into\ntimestamped subdirectories which helps to keep track of their development,\ncheck or remove the old ones or find the most recent ones. Also optionally\na timestamp can be added to each file name. The timestamps by default are\nan 8 digit representation of the date, so every day a new directory will\nbe started (except if you keep running the same session over midnight, then\nstill the old directory will be used).\nThe `files.json` file keeps track of the most recent versions of all tables\nand figures generated both for the Python and R part as well as the earlier\nversions.\n\n## Resource usage\n\nWith all databases loaded Python requires maybe around 5G memory.\nThe inter-cellular network data frame requires little more than 1G.\n`pandas` operations can result 1-3G peaks on top of that baseline.\nOverall it's good to have 8G RAM available.\n\n## How to run\n\nYou can run the whole workflow by calling `main.py`.\n\n```\npython main.py\n```\n\nYou can run selected parts or tasks only:\n\n```\nfrom omnipath2 import main\n\n# 2 parts selected (each a series of tasks)\nworkflow = main.Main(parts = ['intercell_plots', 'network_plots'])\nworkflow.main()\n\n# only selected tasks:\nworkflow = main.Main(steps = main.workflow['intercell_plots'][0])\nworkflow.main()\n```\n\nThe R workflow is called by the `r_plotting` part of the Python one, but\nalso can be run separately:\n\n```\nRscript omnipath2_workflow.r\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaezlab%2Fomnipath_analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaezlab%2Fomnipath_analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaezlab%2Fomnipath_analysis/lists"}