{ "info": { "author": "Forrest Collman, Sven Dorkenwald, Casey Schneider-Mizell", "author_email": "caseysm@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# AnalysisDataLink\n\nThis repostitory facilitates easy access to the materialized (SQL) database tables. Have a look at https://github.com/seung-lab/AnnotationPipelineOverview to get a better overview of the system. \n\nThe database can be accessed directly as described in [below](https://github.com/seung-lab/AnalysisDataLink#accessing-the-sql-databases-directly). However, it is recommended to use this repository as it not only helps with querying the database but also sets datatypes and converts the geometry coordinates which are stored in a postgis string format.\n\n## Access through the DataLink\n\nThe DataLink has three hierarchy levels:\n- low level: `datalink_base.py`\n- query level: `datalink.py`\n- abstract level: `datalink_ext.py`\n\nWe anticpate that most users operate on the highest level where queries to the different table schemas are predefined for convenient access. However, these functions might be too limited in some cases and require more low level access. We hope that users contribute to this repo by formulating their currently unsupported queries with the means of the lower level modules and adding them to `datalink_ext.py`. \n\n### Example\n\nAccessing synapses from all pyramidal cells onto all other cells:\n\n```\nfrom analysisdatalink import datalink_ext as de\nadle = de.AnalysisDataLinkExt(\"pinky100\", 50, sqlalchemy_database_uri)\n\n# Read all pyramidal cell ids\npyc_ids = adle.query_cell_types(\"soma_valence\", cell_type_include_filter=[\"e\"], return_only_ids=True, exclude_zero_root_ids=True)\n\n# Read synapses restricted to pyramidal cells (takes ~11s and returns 17571 synapses)\nsynapse_df = adle.query_synapses(\"pni_synapses_i3\", pre_ids=pyc_ids)\n```\n\nSee below for how to build the `sqlalchemy_database_uri`. For convenience, one can define `DATABASE_URI` as global system variable which will be read if `sqlalchemy_database_uri` is undefined.\n\n\n## Accessing the SQL databases directly\n\nThe SQL database can be accessed in many ways, sqlAlchemy and pandas are a good place to start. Adminer is a good tool to view the database content.\n\n### Table naming\n\nAll tables are called following a convention:\n```\n{dataset_name}_{table_name}_v{materialization_version}\n```\nFor instance, a synapse table might be called: `pinky100_pni_synapses_i3_v38`.\n\n### Pandas examples\n\nGetting all the cell segment ids (also called root ids):\n\n```\nimport pandas as pd\nsql_query = \"SELECT * FROM pinky100_cellsegment_v38\"\ndf = pd.read_sql(sql_query, database_uri, index_col=\"id\")\n```\n\nwhere `database_uri` is build as follows:\n\n```\ndatabase_uri = \"postgresql://{user_name}:{password}@{database_ip}/postgres\"\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/seung-lab/AnalysisDataLink", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "AnalysisDataLink", "package_url": "https://pypi.org/project/AnalysisDataLink/", "platform": "", "project_url": "https://pypi.org/project/AnalysisDataLink/", "project_urls": { "Homepage": "https://github.com/seung-lab/AnalysisDataLink" }, "release_url": "https://pypi.org/project/AnalysisDataLink/0.4.1/", "requires_dist": null, "requires_python": "", "summary": "Tools to query data from the dynamic annotation framework", "version": "0.4.1" }, "last_serial": 5720909, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3aa1de4b01a04cacd398c72d958da622", "sha256": "42005cbf9b1f4e9651abefe3d86edb0267e734489e289946d321998ed49363ae" }, "downloads": -1, "filename": "AnalysisDataLink-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3aa1de4b01a04cacd398c72d958da622", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2408, "upload_time": "2018-11-16T22:15:22", "url": "https://files.pythonhosted.org/packages/a0/3c/7b27d8d7de1d6e58b427ffdef7d6d4cdccf470b44bb8db4919608e0ff549/AnalysisDataLink-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d900bf12503eaef56d68a332fc3fd7ac", "sha256": "7eb4ae3a15985034627e0e80a620a74baab1489e10765f0d634d30f4338684fe" }, "downloads": -1, "filename": "AnalysisDataLink-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d900bf12503eaef56d68a332fc3fd7ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2657, "upload_time": "2018-11-16T22:57:42", "url": "https://files.pythonhosted.org/packages/03/2e/b45e35ef7e3a9b1eb179584ea2f92448323c7a89228419ffbb4b0c12ef55/AnalysisDataLink-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "c5a5f3a77d5e514837962061c486b4b3", "sha256": "c50a29e7f5574c4b9e981785a8a50650f43296e3081e08593ef0ea672d9b02ac" }, "downloads": -1, "filename": "AnalysisDataLink-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c5a5f3a77d5e514837962061c486b4b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5387, "upload_time": "2018-12-03T19:45:21", "url": "https://files.pythonhosted.org/packages/ba/a5/bc9482737c32d16f8447729cee47118096a5bf6ca83c604ceea25e1d469a/AnalysisDataLink-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8f409ec2dc95f16460f8c8e4c03b1cc4", "sha256": "24ef0be3a0c0a66876affe4e1150689d975f158d370e65328fc1a78491037d75" }, "downloads": -1, "filename": "AnalysisDataLink-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8f409ec2dc95f16460f8c8e4c03b1cc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5502, "upload_time": "2018-12-03T23:57:42", "url": "https://files.pythonhosted.org/packages/0b/67/927b10a82322c6c761f1ce2e292738ed9c69f352019984256038728734ec/AnalysisDataLink-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "733be40adcd81da5277ff181aa9889c2", "sha256": "9ffdd4469b0b5d8cf5ad52f1683e8638132638d98ab9ff29d639bdd04c904cb0" }, "downloads": -1, "filename": "AnalysisDataLink-0.1.4.tar.gz", "has_sig": false, "md5_digest": "733be40adcd81da5277ff181aa9889c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5602, "upload_time": "2018-12-04T21:57:58", "url": "https://files.pythonhosted.org/packages/c0/40/f7f2d800c5f0b952bfc86ee20af68f3fa8ace86aff32d96af2665f87c2c2/AnalysisDataLink-0.1.4.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "b762911bc4bf51b7300ffd5d84cd66e6", "sha256": "9fbc7fbf94d7c28cb926397e7ece3ca882fa464ea0b7c32834d4b45173b50226" }, "downloads": -1, "filename": "AnalysisDataLink-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b762911bc4bf51b7300ffd5d84cd66e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7358, "upload_time": "2019-05-06T23:07:22", "url": "https://files.pythonhosted.org/packages/4a/8c/1087976063874b6c0de2babfabaae7ced78050e4ce743fc20fd7472c0dd5/AnalysisDataLink-0.2.0.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "d391a4a47d8455a277fe2becab537f4a", "sha256": "5db5f7cb20c5de9d11918a8328b61438432f6ba3deea7f28ad31b149ecb46ce5" }, "downloads": -1, "filename": "AnalysisDataLink-0.2.5.tar.gz", "has_sig": false, "md5_digest": "d391a4a47d8455a277fe2becab537f4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7792, "upload_time": "2019-08-19T02:26:35", "url": "https://files.pythonhosted.org/packages/e0/32/a9fcc0162d2a705b81b7d236b513cd9dafa9c5fcdf5e640a927e4484f800/AnalysisDataLink-0.2.5.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2abdd77e46a8eef8a4d448d28d5b60f3", "sha256": "177bda5f8a808c0a3f05aef4d3f877925af97d3a36e00468c0bb01aa8d15ac04" }, "downloads": -1, "filename": "AnalysisDataLink-0.3.0.tar.gz", "has_sig": false, "md5_digest": "2abdd77e46a8eef8a4d448d28d5b60f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7917, "upload_time": "2019-08-19T02:32:19", "url": "https://files.pythonhosted.org/packages/65/26/dbb4035f97b4bf99f25aafd43721a9e171f3065a0f018074a4d5c3a8e624/AnalysisDataLink-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "5b370db34213917c651f3fc437610c21", "sha256": "618f23091547f143d63843cdbe2ec31c5127d54b16f176aff23f8bbd52427e16" }, "downloads": -1, "filename": "AnalysisDataLink-0.4.0.tar.gz", "has_sig": false, "md5_digest": "5b370db34213917c651f3fc437610c21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7853, "upload_time": "2019-08-20T16:38:22", "url": "https://files.pythonhosted.org/packages/de/fa/0584b61a309ef0fdcae9306f17a369a2cc75a7c193b11290307d57d87d13/AnalysisDataLink-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "0fde93bc0206987932038807210b4be2", "sha256": "8cda40e1f0fc5add19678a120a6b327c46adc7186673ff6c4c3049eeb51d432d" }, "downloads": -1, "filename": "AnalysisDataLink-0.4.1.tar.gz", "has_sig": false, "md5_digest": "0fde93bc0206987932038807210b4be2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7856, "upload_time": "2019-08-23T13:58:05", "url": "https://files.pythonhosted.org/packages/42/6b/8cced6f42bb5a3ec3b318b2e4aedb531494a58b6cb4d8afd0773d229b440/AnalysisDataLink-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0fde93bc0206987932038807210b4be2", "sha256": "8cda40e1f0fc5add19678a120a6b327c46adc7186673ff6c4c3049eeb51d432d" }, "downloads": -1, "filename": "AnalysisDataLink-0.4.1.tar.gz", "has_sig": false, "md5_digest": "0fde93bc0206987932038807210b4be2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7856, "upload_time": "2019-08-23T13:58:05", "url": "https://files.pythonhosted.org/packages/42/6b/8cced6f42bb5a3ec3b318b2e4aedb531494a58b6cb4d8afd0773d229b440/AnalysisDataLink-0.4.1.tar.gz" } ] }