{ "info": { "author": "Alec Crowell", "author_email": "alexander.m.crowell@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "PIRS: Prediction Interval Ranking Score\n=======================================\n\nPIRS provides a means for identifying constitutive expression from time series data. The software was designed for transcriptomic or proteomic data, but can be applied to any quantitative time series data. There is only one class \nrank, which performs the ranking.\n\n----------\nMotivation\n----------\n\nThe issue of identifying increasing, decreasing or even cyclical patterns in time series data is well studied. Little effort has been devoted to screening for stable expression. Identifying constitutive expression is especially \nimportant when selecting reference genes which are later assumed to be stably expressed for purposes such as qPCR. In the past many 'constitutively expressed' reference genes have later been identified to have circadian or other \ndynamic expression patterns. PIRS provides for the systematic screening of expression profiles from high throughput time series to identify those which are truly constitutively expressed.\n\n--------\nFeatures\n--------\n\n* Prescreening of profiles for differential expression using ANOVA\n\n* Ranking of peptides based on linear regression prediction intervals\n\n-------------\nExample Usage\n-------------\n\n```python\nfrom PIRS import simulations, rank\n\nsimulation = simulations.simulate()\nsimulation.write_output(path_to_data)\n\ndata = rank.ranker(path_to_data)\nsorted_data = data.pirs_sort(path_to_output)\n```\n\n------------\nInstallation\n------------\n\npip install pirs\n\n-------------------------------------\nThe Prediction Interval Ranking Score\n-------------------------------------\n\nHow does PIRS identify constitutive expression? Before answering this question, we should consider what characterizes constitutive expression. We would expect such expression to be characterized by similar means across all \ntimepoints and low variance relative to average expression for replicate timepoints. How do we combine these two qualities into a single metric though? In order to identify constitutive expression PIRS uses the \nprediction intervals from linear regressions. A constitutive expression profile would be expected to have a narrow prediction interval which stays close to the overall mean of expression. In contrast an upward or downward trend \nin expression would have a narrow prediction interval which would be farther from the mean expression at the beginning and end of the time series. Lastly circadian or other dynamic expression centered on the mean expression would \nbe expected to have wide prediction intervals which are far from the mean across the whole time series. Each of these cases is pictured below:\n\n![ImageRelative](data/illustration.png \"illustration\")\n\nAfter calculating the prediction intervals PIRS simply considers the sum of squared errors between the upper and lower bounds of the interval and the mean expression across all the observed time points. This value is then scaled \nrelative to the mean expression producing the final score. \n\n### A Note on Data Formatting\nPIRS expects input files to be formatted as tab seperated. The first column should indicate the transcript or protein identifier. The header should start with '#' and the rest of the header should be of the form 02_1 for data with\nthe first number indicating the timepoint and the second the replicate. Single digit timepoints should include the leading zero for \nformatting. Missing values should be indicated by the string 'NULL'. Example data file:\n\n| # | 00_1 | 00_2 | 00_3 | 02_1 | 02_2 | 02_3 |\n|---|---|---|---|---|---|---|\n| ID | data | data | data | data | data | data |\n\n###Performance\nUsing the included simulation utilities we can compare the preformance of PIRS to more frequently used standard deviation (SD) based metrics. To generate a set of simulations, rank by both PIRS and SD and compare precision recall curves, we can run:\n\n```python\nfrom PIRS import simulations, rank\n\nsimulation = simulations.simulate()\nsimulation.write_output()\n\ndata = rank.ranker('simulated_data_with_noise.txt')\nsorted_data = data.pirs_sort(\"pirs_scores.txt\")\n\nold_data = rank.rsd_ranker('simulated_data_with_noise.txt')\nold_sorted_data = old_data.rsd_sort('rsd_scores.txt')\n\nanalysis = simulations.analyze()\nanalysis.add_classes('simulated_data_with_noise_true_classes.txt')\nanalysis.add_data('pirs_scores.txt','PIRS')\nanalysis.add_data('rsd_scores.txt','SD/RSD')\nanalysis.generate_pr_curve()\n```\n\nWhich produces a figure like this:\n\n![ImageRelative](data/PR.png \"PR\")\n\nPIRS clearly outperforms a SD based metric, however it is useful to run several simulations to determine if this improved performance is consistent:\n\n```python\nfrom PIRS import simulations, rank\n\nfor i in range(20):\n simulation = simulations.simulate(rseed=i)\n simulation.write_output(\"sim_\"+str(i)+\".txt\")\n data = rank.ranker(\"sim_\"+str(i)+\".txt\")\n sorted_data = data.pirs_sort(\"pirs_\"+str(i)+\".txt\")\n old_data = rank.rsd_ranker(\"sim_\"+str(i)+\".txt\")\n old_sorted_data = old_data.rsd_sort(\"rsd_\"+str(i)+\".txt\")\n\n\nanalysis = simulations.analyze()\nfor i in range(20):\n analysis.add_classes(\"sim_\"+str(i)+\"_true_classes.txt\",rep=i)\n analysis.add_data(\"pirs_\"+str(i)+\".txt\",'PIRS',rep=i)\n analysis.add_data(\"rsd_\"+str(i)+\".txt\",'SD/RSD',rep=i)\n\n\nanalysis.generate_pr_curve()\n```\nWhich produces something like this:\n\n![ImageRelative](data/multi_PR.png \"multi_PR\")\n\n### Further Exploration\n\nIf you'd like to explore the impact of varying simulated data parameters on the performance of PIRS, all you have to do is supply additional parameters during the simulation step.\n\n* points = NUMBER OF TIMEPOINTS\n* nrows = NUMBER OF ROWS OF DATA\n* nreps = NUMBER OF REPLICATES\n* tpoint_space = AMOUNT OF TIME BETWEEN TIMEPOINTS\n* pcirc = PROBABILITY OF A ROW BEING CIRCADIAN\n* plin = PROBABILITY OF A ROW HAVING A LINEAR TREND\n* phase_prop = PROPORTION OF CIRCADIAN ROWS IN EACH PHASE GROUP (two phases of expression)\n* phase_noise = AMOUNT OF VARIABILITY IN PHASE WITHIN PHASE GROUPS OF CIRCADIAN ROWS\n* amp_noise = AMOUNT OF BIOLOGICAL VARIABILITY IN EXPRESSION\n\n```\nsimulation = simulations.simulate(tpoints, nrows, nreps, tpoint_space, pcirc, plin, phase_prop, phase_noise, amp_noise)\n```\n\n----\nTO DO\n----\n\n* Add API reference on readthedocs.\n\n----\nBuilt With\n----\n\n* numpy\n* pandas\n* scipy \n* sklearn \n* tqdm\n* seaborn\n\n-------\nLicense\n-------\n\n\u00a9 2017 Alexander M. Crowell: BSD-3\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/aleccrowell/PIRS/releases/tag/v0.1.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aleccrowell/PIRS", "keywords": "circadian,time series,constitutive expression,bioinformatics", "license": "BSD-3", "maintainer": "", "maintainer_email": "", "name": "PIRS", "package_url": "https://pypi.org/project/PIRS/", "platform": "", "project_url": "https://pypi.org/project/PIRS/", "project_urls": { "Download": "https://github.com/aleccrowell/PIRS/releases/tag/v0.1.1", "Homepage": "https://github.com/aleccrowell/PIRS" }, "release_url": "https://pypi.org/project/PIRS/0.1.1/", "requires_dist": [ "numpy", "pandas", "scipy", "sklearn", "tqdm", "seaborn" ], "requires_python": "", "summary": "Prediction Interval Ranking Score", "version": "0.1.1" }, "last_serial": 4466858, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "44ddd9f3938d956b12f66b65f08d781a", "sha256": "79091324e992862b4b35982e5e06f0657ab846709a911baa9e8e839f9472bd61" }, "downloads": -1, "filename": "PIRS-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "44ddd9f3938d956b12f66b65f08d781a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3301, "upload_time": "2018-10-23T17:12:59", "url": "https://files.pythonhosted.org/packages/6b/ec/fb7d2949b2b092e489578b2f0ad15a00d08b36cb4f5b8a477b43de588224/PIRS-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "28f395ab34edf1102f07070d0af1e737", "sha256": "8f971990e07839271962e53da3e9a75127f6db13c414ac60d306d0c48ecddde9" }, "downloads": -1, "filename": "PIRS-0.0.1.tar.gz", "has_sig": false, "md5_digest": "28f395ab34edf1102f07070d0af1e737", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2839, "upload_time": "2018-10-23T17:13:05", "url": "https://files.pythonhosted.org/packages/e1/43/4887cc796664457f31163a82cefb8fb7601879bd9703b0cb2073e7c8c7d8/PIRS-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c575c9206039c3f4c101ead2c62139f5", "sha256": "1d2cf02e00360065df367a680d120e65c4016f71502192be4b18bac6f222f322" }, "downloads": -1, "filename": "PIRS-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c575c9206039c3f4c101ead2c62139f5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3299, "upload_time": "2018-10-23T17:13:00", "url": "https://files.pythonhosted.org/packages/4d/dc/98bdb46ab3780fa59041ce08a5fcfb3b9a8d51537beae4c60c2ad006def6/PIRS-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c70409066f0ec674557d85b8d5043613", "sha256": "ab7a3a1acb908cd2aa99e398346ffc059075bd1a85c6e19c6ec9a9c3e192382f" }, "downloads": -1, "filename": "PIRS-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c70409066f0ec674557d85b8d5043613", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2844, "upload_time": "2018-10-23T17:13:06", "url": "https://files.pythonhosted.org/packages/cf/0b/bd2f21e660f9fc0058b914da1ab22e4eead0e84043c90905703fa30f6d23/PIRS-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "c5beb24172e37bf1ae71cfcaa083f5a1", "sha256": "5e069efdc7501484ed8b02027cdd29ce632dd4e562ceff46b39c54f4376c4c87" }, "downloads": -1, "filename": "PIRS-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "c5beb24172e37bf1ae71cfcaa083f5a1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3299, "upload_time": "2018-10-23T17:13:01", "url": "https://files.pythonhosted.org/packages/f5/14/39c2c3c9f6386b458f5fb45c15338bc52a44c1aa53701416919e005aa4de/PIRS-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ec52c18022dda68834f0e7b082ca495", "sha256": "235ae4583eabb764bfc4e5495ea75e420498690c629ccab33b658bfeabc239ed" }, "downloads": -1, "filename": "PIRS-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9ec52c18022dda68834f0e7b082ca495", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2842, "upload_time": "2018-10-23T17:13:07", "url": "https://files.pythonhosted.org/packages/4b/78/5cc523a58dce9743a1379ae3f28834f2fa39fc411a70caf682318dc2b221/PIRS-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "617f823e5751cf016c5673efc2a38621", "sha256": "bbdd84ff5bba84ea0a03c07b3459442b4194877e7dc61d859fb6c9bba36b4c05" }, "downloads": -1, "filename": "PIRS-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "617f823e5751cf016c5673efc2a38621", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3300, "upload_time": "2018-10-23T17:13:02", "url": "https://files.pythonhosted.org/packages/46/8b/3a3496447769e223b7b54d19d03a3e2783b794a5ad2132088e7828c309c6/PIRS-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c2387734aa9a8e3cb84369c219a498d5", "sha256": "97a5f1084654fbd27716e48b611bb0983230337b6138e45f870225c759734424" }, "downloads": -1, "filename": "PIRS-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c2387734aa9a8e3cb84369c219a498d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2846, "upload_time": "2018-10-23T17:13:08", "url": "https://files.pythonhosted.org/packages/70/06/16df9ad30f57ed058d1f9b904a747f9720688935f2c406b5427e80f46328/PIRS-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "90925c04b172b706b21a180294be6e66", "sha256": "f6cb7d751f24bed4d57172d20b1a3593837f5eee53ed45bc75e82ee29cca7b8b" }, "downloads": -1, "filename": "PIRS-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "90925c04b172b706b21a180294be6e66", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3300, "upload_time": "2018-10-23T17:13:03", "url": "https://files.pythonhosted.org/packages/cf/71/2b9547e6d833ff2b5898823c3aa89934352770fd91d03d473983e1670b3a/PIRS-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4a688a0f5299370a67da5971b6d1c1bb", "sha256": "07f0e952e27c9df8b15343cdb30288dd0d97f2f7b973a1ef4730b9f3e1de93dc" }, "downloads": -1, "filename": "PIRS-0.0.5.tar.gz", "has_sig": false, "md5_digest": "4a688a0f5299370a67da5971b6d1c1bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2844, "upload_time": "2018-10-23T17:13:09", "url": "https://files.pythonhosted.org/packages/0d/79/66ba99bba1a0ecb5b75adde6e1e3d44759a84bbed891556d934a91d7b9fb/PIRS-0.0.5.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "05d2d196b1639f708893a784ddd2b528", "sha256": "3a66ce984c167f0cb98e80647b855c8983c6f9d901f0d5e919a1191cd8429914" }, "downloads": -1, "filename": "PIRS-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "05d2d196b1639f708893a784ddd2b528", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3316, "upload_time": "2018-10-23T17:13:04", "url": "https://files.pythonhosted.org/packages/cd/12/11dddd087026392de72f4979804701d0a322dde66be21db2ac2a00e39f2f/PIRS-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c3e334f53425f84defee6ea7400ad10", "sha256": "88a72e5968fff9b03437b548ce1c1de07c0cc0bf9bba8342aa71ac0727c57b09" }, "downloads": -1, "filename": "PIRS-0.1.tar.gz", "has_sig": false, "md5_digest": "6c3e334f53425f84defee6ea7400ad10", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2887, "upload_time": "2018-10-23T17:13:10", "url": "https://files.pythonhosted.org/packages/35/22/f870a769d76dc630e1e5fc8e667e90151a818dc828e8faa4dd2fa33345a3/PIRS-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "cb57e120ee2a4840014998e5e7fd80ae", "sha256": "145ccf08e685c2db962c4d4a642c6ce79c27ef482fbaeb97966e03afca3578c9" }, "downloads": -1, "filename": "PIRS-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cb57e120ee2a4840014998e5e7fd80ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8256, "upload_time": "2018-11-08T19:52:06", "url": "https://files.pythonhosted.org/packages/65/83/27b1f0f58c2b3929d8bf0144d01c1f688e330558573610b6342a700ca08d/PIRS-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c142e8efa3432b4240eaa7a705a92038", "sha256": "4a32d50cbd90d46aa63eb41a9027dc4f2b80caa75e04600c244070a48e8639d6" }, "downloads": -1, "filename": "PIRS-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c142e8efa3432b4240eaa7a705a92038", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7739, "upload_time": "2018-11-08T19:52:09", "url": "https://files.pythonhosted.org/packages/bc/af/7142c1a1c9828a948dc6caebf21e05403b628bafa2879d28cf3517998072/PIRS-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cb57e120ee2a4840014998e5e7fd80ae", "sha256": "145ccf08e685c2db962c4d4a642c6ce79c27ef482fbaeb97966e03afca3578c9" }, "downloads": -1, "filename": "PIRS-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cb57e120ee2a4840014998e5e7fd80ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8256, "upload_time": "2018-11-08T19:52:06", "url": "https://files.pythonhosted.org/packages/65/83/27b1f0f58c2b3929d8bf0144d01c1f688e330558573610b6342a700ca08d/PIRS-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c142e8efa3432b4240eaa7a705a92038", "sha256": "4a32d50cbd90d46aa63eb41a9027dc4f2b80caa75e04600c244070a48e8639d6" }, "downloads": -1, "filename": "PIRS-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c142e8efa3432b4240eaa7a705a92038", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7739, "upload_time": "2018-11-08T19:52:09", "url": "https://files.pythonhosted.org/packages/bc/af/7142c1a1c9828a948dc6caebf21e05403b628bafa2879d28cf3517998072/PIRS-0.1.1.tar.gz" } ] }