{"id":19320556,"url":"https://github.com/aluriak/powergrasp-1","last_synced_at":"2025-04-12T14:42:48.831Z","repository":{"id":143141010,"uuid":"37429101","full_name":"Aluriak/PowerGrASP-1","owner":"Aluriak","description":"Graph compression with FCA and ASP.        New versions at:","archived":false,"fork":false,"pushed_at":"2018-04-03T17:56:01.000Z","size":1166,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-03-26T09:21:16.733Z","etag":null,"topics":["answer-set-programming","compression","graph","python"],"latest_commit_sha":null,"homepage":"https://github.com/aluriak/powergrasp","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aluriak.png","metadata":{"files":{"readme":"README.mkd","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2015-06-14T20:49:30.000Z","updated_at":"2024-09-04T06:47:37.000Z","dependencies_parsed_at":"2023-04-27T05:31:26.059Z","dependency_job_id":null,"html_url":"https://github.com/Aluriak/PowerGrASP-1","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2FPowerGrASP-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2FPowerGrASP-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2FPowerGrASP-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2FPowerGrASP-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aluriak","download_url":"https://codeload.github.com/Aluriak/PowerGrASP-1/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248583428,"owners_count":21128594,"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","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":["answer-set-programming","compression","graph","python"],"created_at":"2024-11-10T01:29:28.270Z","updated_at":"2025-04-12T14:42:48.806Z","avatar_url":"https://github.com/Aluriak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PowerGrASP\n__This repository is inactive, source of the powergrasp package *until version 0.7.0*. For 0.8.0 and higher, see [the currently active repository](https://github.com/aluriak/powergrasp).__\n\n\nThe Python [Powergraph analysis](https://en.wikipedia.org/wiki/Power_graph_analysis) tool,\nbased on [Answer Set Programming](https://en.wikipedia.org/wiki/Answer_set_programming) solving and formal concept analysis.\n\nMore technical documentation about PowerGrASP can be found in the [documentation file](doc/documentation.mkd).\nPowerGrASP results, compared to the existing BIOTEC tool, can be found in the [results file](doc/results.mkd).\n\n\n\n## Installation \u0026 Requirements\n\n    pip install powergrasp\n\nJust be sure that you provides a clingo binary in your $PATH.\n\n\n## Basic use\nPowerGrASP can be used as a script:\n\n    python3 -m powergrasp --graph-data=human_proteom.lp --output-file=for_cytoscape.bbl\n\nOr can be embedded in any python program:\n\n    import powergrasp\n    powergrasp.recipes.powergraph('human_proteom.lp', 'for_cytoscape.bbl')\n\n## Other recipes\nSome other recipes are implemented, including oriented graph compression, and alternative scoring methods.\n\n\n## General overview\nThe compression is configurable through command line arguments or compress function parameters.\nUsed ASP source code can be changed, interactive mode can be set,… Please look at help and docstring:\n\n    # in terminal\n    python3 -m powergrasp --help\n    # in python\n    \u003e\u003e\u003e help(powergrasp)\n    # or, in the PowerGrASP git directory, with make\n    make help\n\n\n\n## I/O\nNB: Create another output or input format support is possible by implement a new Converter class (see *powergrasp/converter/*).\n\n### Input file\nPowerGrASP doesn't generate logging for pleasure : it actually perform a treatment on input data, if provided.\nThe supported input file formats are currently :\n- ASP: atoms edge/2, with edge(X,Y) describing a link between nodes X and Y.\n- SBML: a regular SBML file, when species and reactions will be treated as nodes.\n- GML: a regular Graph Modeling Language file, readable by networkx python module.\n- GraphML: a regular [GraphML](http://graphml.graphdrawing.org/) file, readable by [networkx python module](https://networkx.github.io/documentation/networkx-1.9/reference/readwrite.graphml.html).\n\nExample of inputs can be found in the [powergrasp/test/](powergrasp/tests) directory.\nSome of these are simple and used for unit testing. Take a look to [ddiam](powergrasp/tests/double_biclique.lp), [coli](powergrasp/tests/ecoli_2896-23.gml) or [star](powergrasp/tests/star.lp).\n\nOther formats will be supported in the future.\n\n### Output\n\n#### Bubble formatted file\nThe output of PowerGrASP is a *Bubble* formatted file. This file can be used to get a visualization of the compressed graph.\nThe format *Bubble* is an endemic format designed by Royer et Al for power graph describing.\n\nBubble files can be used in several ways:\n\n##### Cytoscape\nPrint a power graph through Cytoscape is made possible by the [CyOog](http://www.biotec.tu-dresden.de/research/schroeder/powergraphs/) plugin,\nwhich handle the format *Bubble*.\nCytoscape, in order to using the CyOog plugin, must be in version __[2.x](http://www.cytoscape.org/download_old_versions.html)__.\n\n\n###### Caveats\nCyOog does not handles edges that are printed multiple times, nor oriented edges.\nThus, oriented compression is not efficiently reprensented using Cytoscape.\n\n##### Oog Command line tool\nBIOTEC team also released a [command line tool](http://www.biotec.tu-dresden.de/research/schroeder/powergraphs/download-command-line-tool.html) for power graph analysis.\nThis tool allow to print a bubble file without Cytoscape usage, with something like:\n\n    java -jar Oog.jar -inputfiles=path/to/bubble.bbl -img -f=png\n\nAdd *\u0026\u003e/dev/null* to prevent any logging output.\n\n\n##### Bubbletools\n[This python lib](https://github.com/Aluriak/bubble-tools) could help to generate any type of output from bubble files. It provides some examples, like [GEXF](https://gephi.org/gexf/format/) for [Gephi](https://gephi.org/) (that [stops to handle it](https://github.com/gephi/graphstore/pull/128) since last release). It is used by PowerGrASP itself to convert bubble output to another formats.\n\n\n## Standard output management\nBy default, PowerGrASP generates lots of outputs in stdout, essentially for debugging and compression tracking.\nWith the option *loglevel*, its possible to control this behavior:\n\n    python3 -m powergrasp --graph-data=tests/proteome_yeast_2.lp --loglevel=warning\n\nThis will block all outputs with a strictly lesser priority than warning.\nAvailable levels comes from logging API:\n\n    log level        | PowerGrASP\n    -----------------|-------------------\n    critical         | totally silencious\n    error            | very rarely disturbing\n    warning          | rarely disturbing\n    info             | trackable\n    debug            | trackable with __high__ verbosity\n    notset           | kraken released\n\nPlease note that some options (notabily *count-models* and *count-cc*) are completely independant of this logging management, as they work with the standard output.\n\n\n## Statistics\nThe compression compute some statistics about itself, and generate the final results\nat the end of the compression in the standard output.\nWith some arguments, you can also show a colored graphic :\n\n    python3 -m powergrasp --graph-data=tests/proteome_yeast_2.lp --stats-file=data/statistics.csv --plot-stats\n\nInstead of show it, powergrasp can save it in png (note that the *--plot-stats* flag is not necessary when *plot-file* option is given):\n\n    python3 -m powergrasp --graph-data=tests/proteome_yeast_2.lp --stats-file=data/statistics.csv --plot-file=data/statistics.png\n\n\n## Answer Set Programming\nASP is a declarative and logic language, designed for the treatment of combinatorial problems (like graph compression).\nThe implementation used in this project is the [*Potsdam Answer Set Solving Collection*](http://potassco.sourceforge.net/index.html).\n\nAll ASP source codes necessary for the PowerGrASP program can be found in *powergrasp/ASPsources/* directory.\n\n\n\n## Interests \u0026 References\n\nThe [Power Graph approach for graph compression](https://en.wikipedia.org/wiki/Power_graph_analysis) allows a lossless compression with an emphasis on biological meaning.\nIn fact, formal concepts used by Power Graph analysis have a sens in biology, especially in the case of proteomes.\n\nAll graphs can be compressed through Power Graph, and will be more readable once compressed,\nbut interactomes, at least, also gain in interpretability.\n\nThe main inspiration of PowerGrASP : PowerGraph Analysis:\n\n    Loïc Royer, Matthias Reimann, Bill Andreopoulos, and Michael Schroeder.\n    Unraveling Protein Networks with Power Graph Analysis.\n    PLoS Comput Biol, 4(7):e1000108, July 2008.\n\nUsage of the PowerGraph Analysis:\n\n    Loic Royer, Matthias Reimann, A. Francis Stewart, and Michael Schroeder.\n    Network Compression as a Quality Measure for Protein Interaction Networks.\n    PLoS ONE, 7(6):e35729, June 2012.\n\n    Yun Zhang, Charles A Phillips, Gary L Rogers, Erich J Baker, Elissa J Chesler, and Michael A Langston.\n    On finding bicliques in bipartite graphs: a novel algorithm and\n    its application to the integration of diverse biological data types.\n    BMC Bioinformatics, 15(1):110, 2014.\n\nASP through Potassco implementation:\n\n    M. Gebser, R. Kaminski, B. Kaufmann, M. Ostrowski, T. Schaub, and M. Schneider.\n    Potassco: The Potsdam answer set solving collection.\n    AI Communications, 24(2):107–124, 2011.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faluriak%2Fpowergrasp-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faluriak%2Fpowergrasp-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faluriak%2Fpowergrasp-1/lists"}