{ "info": { "author": "Johannes Linder", "author_email": "johannes.linder@hotmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Isolearn\n\nA Python API for automated loading, processing and streaming of genomics data into deep learning models (Keras).\nImplements Keras data generators for loading and encoding Pandas dataframes and RNA-Seq count matrices into numerical tensors.\n\n#### When to use Isolearn\n- When you want to encode DNA sequence features (e.g. hexamer counts or one-hot encodings) of large genomic datasets, for use in downstream learning algorithms.\n- When you want to stream data and encode sequence features on the fly as mini batches.\n- When you want seamless integration with Keras as parallelizable genomic data generators.\n- When you are building a complex multi-task model composed of several data sets.\n\n### Installation\nThe latest stable version of Isolearn can be installed with pip:\n```sh\npip install isolearn\n```\n\nIsolearn can also be installed from the [github repository](https://github.com/johli/isolearn.git):\n```sh\ngit clone https://github.com/johli/isolearn.git\ncd isolearn\npython setup.py install\n```\n\n#### Isolearn requires the following packages to be installed\n- Keras >= 2.2.4\n- Pandas >= 0.24.2\n- Scipy >= 1.2.1\n- Numpy >= 1.16.2\n\n### Usage\nIsolearn is centered around data generators, where the generator's task is to transform your sequence data (stored in a Pandas dataframe) and corresponding measurements (e.g. column in the Pandas dataframe, or RNA-Seq count matrix) into numerical input features and output targets.\n\nA simple Keras Data Generator can built using the isolearn.keras package:\n```python\nimport isolearn.keras as iso\nimport pandas as pd\nimport numpy as np\n\n#Create some functional sequence data\n\ndata = pd.DataFrame(\n {\n 'seq' : ['ACGTGGGCTTTCAACTCTAAAACGAGA', 'ACGTGGGCTTTCAACTCTAAAACGAGA', ...],\n 'enrichment' : [3.2, -5.1, ...]\n }\n)\n\n#Construct a data generator\n#The generator one-hot encodes the sequences\n#It also takes the log of the enrichment targets\n\ngen = iso.DataGenerator(\n data_ids = np.arange(len(data), dtype=np.int),\n sources = { 'data' : data },\n batch_size = 32,\n inputs = [\n {\n 'id' : 'onehot',\n 'source_type' : 'dataframe',\n 'source' : 'data',\n 'extractor' : lambda row, index: row['seq'][100: 200],\n 'encoder' : iso.OneHotEncoder(seq_length=100),\n 'dim' : (100, 4),\n 'sparsify' : False\n }\n ],\n outputs = [\n {\n 'id' : 'log_enrichment',\n 'source_type' : 'dataframe',\n 'source' : 'data',\n 'extractor' : lambda row, index: row['enrichment'],\n 'transformer' : lambda v: np.log(v)\n }\n ],\n shuffle = True\n)\n\n#Now we are all set to feed the data generator into Keras when training a model.\n#We can also use the data generator directly as a batch streamer by simply indexing it:\n\n[X], [y] = gen[13] #Generate batch 13\n```\n\n### Example Notebooks (Alternative Splicing)\nThese examples show how to build more complex data generators and how to integrate them into Keras or other learning algorithms. The examples are based on Alternative Splicing data from [https://github.com/Alex-Rosenberg/cell-2015](https://github.com/Alex-Rosenberg/cell-2015).\n\n[Notebook 1a: Logistic Regression of Sequence Hexamer Counts](https://nbviewer.jupyter.org/github/johli/isolearn/blob/master/example/splicing_hexamer_regression.ipynb)
\n[Notebook 1b: Logistic Regression of Sequence Hexamer Counts (Multiple Cell Types)](https://nbviewer.jupyter.org/github/johli/isolearn/blob/master/example/splicing_hexamer_regression_multicell.ipynb)
\n[Notebook 2a: (Keras) Sequence-Convolutional Neural Network](https://nbviewer.jupyter.org/github/johli/isolearn/blob/master/example/splicing_cnn_multicell.ipynb)
\n[Notebook 2b: (Keras) Sequence-Convolutional Neural Network (Sampled Splice Junctions)](https://nbviewer.jupyter.org/github/johli/isolearn/blob/master/example/splicing_cnn_perturbed_multicell.ipynb)
\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/johli/isolearn", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "isolearn", "package_url": "https://pypi.org/project/isolearn/", "platform": "", "project_url": "https://pypi.org/project/isolearn/", "project_urls": { "Homepage": "https://github.com/johli/isolearn" }, "release_url": "https://pypi.org/project/isolearn/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Keras Genomics Data Generators", "version": "0.2.1" }, "last_serial": 5213430, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f314876dce8739419d1e4c4d80ff101b", "sha256": "6740455ca5e84eba977bbf82ea0ad1b6fffb7953b31adafc1d129fc9838084f2" }, "downloads": -1, "filename": "isolearn-0.1-py3.6.egg", "has_sig": false, "md5_digest": "f314876dce8739419d1e4c4d80ff101b", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 20229, "upload_time": "2019-04-20T01:18:01", "url": "https://files.pythonhosted.org/packages/b3/79/9fbb8ca681eb17a4ec99f6f9a94dd51d4b72cb5c98d1dcf5aa4881f6477a/isolearn-0.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "f709ad7e1dcdaf1c9420c8663eae47c7", "sha256": "eef62251d5e240fc8cff59b386a14765b440e8107c21b7094dfc84cdc13a9d95" }, "downloads": -1, "filename": "isolearn-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f709ad7e1dcdaf1c9420c8663eae47c7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9227, "upload_time": "2019-04-20T01:18:00", "url": "https://files.pythonhosted.org/packages/ae/07/58e38e5ce327e47310c16105b9424e8be24dc77ef81447ca4adeeeeca303/isolearn-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fdfa9cd4a70b937607e67f56d6e82484", "sha256": "c3843dc37454587b062e2bdfb4c09d868ea1595e303d4ab773c8c15fd4968977" }, "downloads": -1, "filename": "isolearn-0.1.tar.gz", "has_sig": false, "md5_digest": "fdfa9cd4a70b937607e67f56d6e82484", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7749, "upload_time": "2019-04-20T01:18:03", "url": "https://files.pythonhosted.org/packages/88/64/945945f9151e15505197e067bd5212fc8aeb84d7cb2faf2d6a3f9418a0de/isolearn-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "834b6119f535e3b156967ca70d2deb93", "sha256": "763b292586afbdb3571557d9f29224c887c3527428b1e6d88ea9db7ce47791bc" }, "downloads": -1, "filename": "isolearn-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "834b6119f535e3b156967ca70d2deb93", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10972, "upload_time": "2019-05-01T17:32:32", "url": "https://files.pythonhosted.org/packages/4a/b0/a2ad3a6c722e4e22757eab871333e4685af0f62233e2e98e399f531bfdf4/isolearn-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f63145f402332e2188b783002adcc68a", "sha256": "a1a9bf4d07841715f82681d3cc8f2c940bec3a2a41b04d51f4be3fe825864da7" }, "downloads": -1, "filename": "isolearn-0.2.tar.gz", "has_sig": false, "md5_digest": "f63145f402332e2188b783002adcc68a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9227, "upload_time": "2019-05-01T17:32:34", "url": "https://files.pythonhosted.org/packages/2e/f0/6e648718014d0b172cda24f6a78508ba3d115488d0bb6479be6fa53d444a/isolearn-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "17267679f36df1ab40d751fb137e772c", "sha256": "e7b1d5536024d81c6b6e04f5f932a3a57b46ca2921704fd80b73a8f1afaa95f1" }, "downloads": -1, "filename": "isolearn-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "17267679f36df1ab40d751fb137e772c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12138, "upload_time": "2019-05-01T17:35:32", "url": "https://files.pythonhosted.org/packages/ee/ce/41a4f0b429fc723486eeea6e0ac543c0e60cbd31fc73aac379dcbac04998/isolearn-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59f40ed487b833d2ad784800081d583d", "sha256": "d0feaa7de079e360e01e9ac65f8197325aeec2bd126c0d0725f13b8ea46187b6" }, "downloads": -1, "filename": "isolearn-0.2.1.tar.gz", "has_sig": false, "md5_digest": "59f40ed487b833d2ad784800081d583d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11638, "upload_time": "2019-05-01T17:35:35", "url": "https://files.pythonhosted.org/packages/f3/1b/02a1acbf51862117e64967c6946db95d536505bd0a2002509cd0f525c937/isolearn-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "17267679f36df1ab40d751fb137e772c", "sha256": "e7b1d5536024d81c6b6e04f5f932a3a57b46ca2921704fd80b73a8f1afaa95f1" }, "downloads": -1, "filename": "isolearn-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "17267679f36df1ab40d751fb137e772c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12138, "upload_time": "2019-05-01T17:35:32", "url": "https://files.pythonhosted.org/packages/ee/ce/41a4f0b429fc723486eeea6e0ac543c0e60cbd31fc73aac379dcbac04998/isolearn-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59f40ed487b833d2ad784800081d583d", "sha256": "d0feaa7de079e360e01e9ac65f8197325aeec2bd126c0d0725f13b8ea46187b6" }, "downloads": -1, "filename": "isolearn-0.2.1.tar.gz", "has_sig": false, "md5_digest": "59f40ed487b833d2ad784800081d583d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11638, "upload_time": "2019-05-01T17:35:35", "url": "https://files.pythonhosted.org/packages/f3/1b/02a1acbf51862117e64967c6946db95d536505bd0a2002509cd0f525c937/isolearn-0.2.1.tar.gz" } ] }