{ "info": { "author": "Martin Rusilowicz", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU Affero General Public License v3", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Multimedia :: Graphics :: Presentation", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Bio-Informatics", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "======\nMGraph\n======\n\nA simple, object orientated graphing library.\n\nThis library provides supports to :t:`Groot`, and provides support specifically for graphs somewhere on the phylogenetic tree / graph border.\n\nIt is written 100% in Python.\n\nIf you are looking for a general graphing library you might want to check out :t:`Networkx` or :t:`IGraph`, which supports cyclic relationships and larger numbers of nodes. For trees, :t:`Ete` or :t:`Dendropy` are good options.\n\n\n\n\nFeature set\n-----------\n* Analyses:\n * Shortest path\n * Most recent common ancestor (MRCA) (DAGs)\n * Closest-relation (MRCA) (non-DAGs)\n * Path to MRCA/closest-relation\n * Find best split (acyclic graphs)\n * Find best splits (for cyclic graphs)\n * Smallest connected subgraph\n * Calculate quartet (for acyclic graphs)\n * Calculate smallest quartet (for cyclic graphs)\n * Quartet graph comparison \n * List splits\n * Construct graph from splits\n * Consensus and supertree consensus, (basic algorithms, through Groot) \n * Consensus, supertree consensus and phylogenetic inference (outsourced to current state of the art tools), through Groot.\n * Subgraph by predicate\n* IO:\n * Newick\n * CSV\n * HTML: Vis.JS, Cytoscape.JS, SVG\n * SVG \n * Ete\n * ASCII art\n* Usability:\n * Object orientated\n * Well documented\n * Written with IDEs in mind -\n * methods include full parameter details and PEP484 annotations \n\nInstallation\n------------\n\n```bash\n(sudo) pip install mgraph\n```\n\nUsage\n-----\n\n:t:`MGraph` follows an object orientated approach, where nodes and edges are objects to which arbitrary data may (or may not) be attached.\nThe `MGraph`:t: library is well documented inline using `reStructuredText`_.\n\n.. code-block::\n\n from mgraph import MGraph\n \n g = MGraph.from_newick( \"((A,B),C);\" )\n node1 = g.nodes.by_data( \"A\" )\n node2 = g.nodes.by_data( \"C\" )\n node3 = node1.add_child( \"D\" )\n node3.add_edge_to( node2 )\n print( g.to_csv() )\n\nAll edges and nodes support arbitrary Python data.\n\n.. code-block::\n\n from mgraph import MGraph\n \n g = MGraph()\n spam = g.write_node( \"Spam\" )\n beans = g.write_node( { \"name\": \"Beans\" } )\n eggs = g.write_node( 42 )\n g.write_edge( spam, beans, data = {\"types\": (\"is_parent\", \"is_relation\"), \"weight\": 42 } )\n\n`MGraph`:t: enforces \"a single way\" and makes some basic constraints for cases that represent error more often than intention.\n\n**Constraint 1.** Both nodes and edges are singular; two nodes may only share a single edge and a single edge may only span two nodes.\nThis doesn't mean nodes cannot have multiple relation types between them - the edge's `data` property can accommodate both.\nThis helps to avoid common mistakes and means that when traversing the graph all the necessary data is contained within the singular edge object and the programmer doesn't have to look anywhere else.\n\n.. code-block::\n\n from mgraph import MGraph\n \n g = MGraph()\n node_1 = g.write_node()\n node_2 = g.write_node()\n \n # Don't do this\n g.write_edge(node_1, node_2, data = \"is_parent\")\n g.write_edge(node_1, node_2, data = \"is_relation\") # Error\n \n # Do this\n g.write_edge(node_1, node_2, data = (\"is_parent\", \"is_relation\")) \n\n**Constraint 2.** Self-references are invalid.\n\nThis helps to avoid common mistakes and cycles when traversing the graph.\nTo represent self-references, simply attach data to the node itself. \n\n.. code-block::\n\n from mgraph import MGraph\n \n g = MGraph()\n node_1 = g.write_node()\n \n # Don't do this\n g.write_edge(node_1, node_1, data = \"likes_itself\") # Error\n \n # Do this\n node_1.data = \"likes_itself\"\n ```\n\nDevelopment\n-----------\n\n`MGraph`:t: uses the unit tests run by executing the `__test__.py` file.\nCode coverage should be 70% minimum for each source file.\n\n\nMeta\n----\n\n```ini\nui = bitbucket,pypi,web\nlanguage = python3\nauthor = martin rusilowicz\nlicence = https://www.gnu.org/licenses/agpl-3.0.html\ntype = library\n```\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/mjr129/mgraph", "keywords": "", "license": "https://www.gnu.org/licenses/agpl-3.0.html", "maintainer": "", "maintainer_email": "", "name": "mgraph", "package_url": "https://pypi.org/project/mgraph/", "platform": "", "project_url": "https://pypi.org/project/mgraph/", "project_urls": { "Homepage": "https://bitbucket.org/mjr129/mgraph" }, "release_url": "https://pypi.org/project/mgraph/1.0.0.16/", "requires_dist": null, "requires_python": "", "summary": "Yet another graphing library. This library supports `Groot`:t:, providing functionality for dealing with graphs somewhere on the phylogenetic tree/network border.", "version": "1.0.0.16" }, "last_serial": 4486299, "releases": { "1.0.0.1": [ { "comment_text": "", "digests": { "md5": "d6c1c53c9453fe9f2a9b576b02f11aab", "sha256": "a5fadee84a1c14dec5946394a9ca9d738e44e3ce1a479003e65967e1c82de382" }, "downloads": -1, "filename": "mgraph-1.0.0.1.tar.gz", "has_sig": false, "md5_digest": "d6c1c53c9453fe9f2a9b576b02f11aab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11679, "upload_time": "2018-01-16T13:19:05", "url": "https://files.pythonhosted.org/packages/3b/67/9d4566dc468c7d692d68f4f16dedee5909ca76130e6fe4a18fd0f9628a39/mgraph-1.0.0.1.tar.gz" } ], "1.0.0.10": [ { "comment_text": "", "digests": { "md5": "d84a3522e98cc0e7f5224473ec386080", "sha256": "f72cc5320ffe75cc0266c77da096ed78635c2f191ea5d123dc92ff7307dd985f" }, "downloads": -1, "filename": "mgraph-1.0.0.10.tar.gz", "has_sig": false, "md5_digest": "d84a3522e98cc0e7f5224473ec386080", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37339, "upload_time": "2018-06-26T10:42:47", "url": "https://files.pythonhosted.org/packages/66/0e/62c6e5b8bb88d30c050965480dd46196ca27f5a5d49dea4067cf7eb69051/mgraph-1.0.0.10.tar.gz" } ], "1.0.0.13": [ { "comment_text": "", "digests": { "md5": "446ed43c8dc8203ad212ffdfeecc1461", "sha256": "6d4b231cb082b2fcdee734107d249abfc69ae3938fadbb3fe38c0396207a95fe" }, "downloads": -1, "filename": "mgraph-1.0.0.13.tar.gz", "has_sig": false, "md5_digest": "446ed43c8dc8203ad212ffdfeecc1461", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37345, "upload_time": "2018-07-02T10:52:03", "url": "https://files.pythonhosted.org/packages/83/92/8ba7c6b6c90eea8e8650d2440d00c302440d87a444fbcbe1a5d5dbfbb769/mgraph-1.0.0.13.tar.gz" } ], "1.0.0.14": [ { "comment_text": "", "digests": { "md5": "1d275fc244c4e5cc86cf507a90083409", "sha256": "67e02bb4718ee92e367aeab8a65eca976ff5913b9b752e7911827c51891a694c" }, "downloads": -1, "filename": "mgraph-1.0.0.14.tar.gz", "has_sig": false, "md5_digest": "1d275fc244c4e5cc86cf507a90083409", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37338, "upload_time": "2018-08-14T11:23:23", "url": "https://files.pythonhosted.org/packages/cf/d1/5c60621cfa0d27ff8e59f6276c436cf350d8b629ff75ba12d51bec47b3a7/mgraph-1.0.0.14.tar.gz" } ], "1.0.0.16": [ { "comment_text": "", "digests": { "md5": "224c41ab4f09049734729e6af805f31c", "sha256": "dda68d1ae78c1885389cf41e6276f44dddf10c7d73ec0dadebbd692d0e3155e7" }, "downloads": -1, "filename": "mgraph-1.0.0.16.tar.gz", "has_sig": false, "md5_digest": "224c41ab4f09049734729e6af805f31c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37351, "upload_time": "2018-11-14T16:43:05", "url": "https://files.pythonhosted.org/packages/8a/9f/a1cf27490d67448944ba44eebfab28209eb07e8dee22528c618f47e85664/mgraph-1.0.0.16.tar.gz" } ], "1.0.0.2": [ { "comment_text": "", "digests": { "md5": "6e042434965dc57ebb914bd22fbf45e8", "sha256": "e9cf040b9efedde9e84c69d737bf548ba4863cb65c420ae0043c7ca50e399a61" }, "downloads": -1, "filename": "mgraph-1.0.0.2.tar.gz", "has_sig": false, "md5_digest": "6e042434965dc57ebb914bd22fbf45e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25627, "upload_time": "2018-03-14T18:31:04", "url": "https://files.pythonhosted.org/packages/b8/9c/8d2503abf88c46ed5161d413bf1d66653c8a292b84ea56257ec1f8af383d/mgraph-1.0.0.2.tar.gz" } ], "1.0.0.3": [ { "comment_text": "", "digests": { "md5": "7c28ec965a5e1081174ee569b155d2d5", "sha256": "1f15472485aa4dad84d01705eaee0e955de239eca33f768c31b0f5eb73df0453" }, "downloads": -1, "filename": "mgraph-1.0.0.3.tar.gz", "has_sig": false, "md5_digest": "7c28ec965a5e1081174ee569b155d2d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25637, "upload_time": "2018-03-14T19:04:23", "url": "https://files.pythonhosted.org/packages/4e/9c/7b0ef81fe507bea94dd3bcf7bed2e337aefd0994718c13b4b455fc381f23/mgraph-1.0.0.3.tar.gz" } ], "1.0.0.4": [ { "comment_text": "", "digests": { "md5": "a7cfdafd530f7ad86b3b5718127a01b6", "sha256": "7d7016c80bbcd7235537ed88ea070003b204ec39b6ecd088b2a59640a1a573e0" }, "downloads": -1, "filename": "mgraph-1.0.0.4.tar.gz", "has_sig": false, "md5_digest": "a7cfdafd530f7ad86b3b5718127a01b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26278, "upload_time": "2018-03-28T10:41:55", "url": "https://files.pythonhosted.org/packages/cc/30/a9c1ee9100c9210587f7a9db71bfafab19f380a5d53bf7081bc3946987d5/mgraph-1.0.0.4.tar.gz" } ], "1.0.0.5": [ { "comment_text": "", "digests": { "md5": "61d3ef77f70909560c0be923f0ce61cc", "sha256": "31bbd2fce339f750f1f90c507299ad4fb967780ffb9a16ff8634a3bae2901da9" }, "downloads": -1, "filename": "mgraph-1.0.0.5.tar.gz", "has_sig": false, "md5_digest": "61d3ef77f70909560c0be923f0ce61cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34801, "upload_time": "2018-04-12T10:10:18", "url": "https://files.pythonhosted.org/packages/3b/c9/4458d800b1b60f946ef891087190e638f2de512665cd68a5205c5c29ba52/mgraph-1.0.0.5.tar.gz" } ], "1.0.0.6": [ { "comment_text": "", "digests": { "md5": "f4b2afc103dcb5ca78c863853ee48a74", "sha256": "1548186667339fc0ee83f26835cf6865157977164bb2a5f205290943fc72a09c" }, "downloads": -1, "filename": "mgraph-1.0.0.6.tar.gz", "has_sig": false, "md5_digest": "f4b2afc103dcb5ca78c863853ee48a74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34995, "upload_time": "2018-04-23T09:51:34", "url": "https://files.pythonhosted.org/packages/4c/0f/06c88d9eb3051547e0adfe6272fcff32e130875bafc228d53fd484f97d67/mgraph-1.0.0.6.tar.gz" } ], "1.0.0.7": [ { "comment_text": "", "digests": { "md5": "e40d4750953c168ea789d92603725100", "sha256": "baaaccf038ee524b2c8a1ae798141bdc6bc0ff3633b4849893b0ccae7d37f3e0" }, "downloads": -1, "filename": "mgraph-1.0.0.7.tar.gz", "has_sig": false, "md5_digest": "e40d4750953c168ea789d92603725100", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37327, "upload_time": "2018-06-25T12:22:49", "url": "https://files.pythonhosted.org/packages/2b/a0/5dad80a30dfb9daa4c5dc2a2db802b0d6484ddae42149455c35b87ffa5dc/mgraph-1.0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "224c41ab4f09049734729e6af805f31c", "sha256": "dda68d1ae78c1885389cf41e6276f44dddf10c7d73ec0dadebbd692d0e3155e7" }, "downloads": -1, "filename": "mgraph-1.0.0.16.tar.gz", "has_sig": false, "md5_digest": "224c41ab4f09049734729e6af805f31c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37351, "upload_time": "2018-11-14T16:43:05", "url": "https://files.pythonhosted.org/packages/8a/9f/a1cf27490d67448944ba44eebfab28209eb07e8dee22528c618f47e85664/mgraph-1.0.0.16.tar.gz" } ] }