{ "info": { "author": "David Matten", "author_email": "david.matten@uct.ac.za", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Education", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Scientific/Engineering :: Information Analysis" ], "description": "# smallBixTools\na few small functions for bioinformatics\n\n\n\n# smallBixTools a few small functions for bioinformatics.\n\nSee readme for full details.\n\nRepo location:\n\nhttps://bitbucket.org/hivdiversity/small_bix_tools\n\nDocs:\nhttps://small-bix-tools.readthedocs.io/en/latest/\n\nList of functions:\n(INCOMPLETE)\n\nget_regions_from_panel:\n\nSlices regions out of a fasta formatted file, joins them together, and writes the resulting fasta file to the given location.\nan example call might be: get_regions_from_panel(\"test.fasta\", 0, 10], [20, 30, \"/tmp\", \"outfile.fasta\")\nwhich would, for each sequence in the input file: \"test.fasta\", take the region from 0 to 10 joined with the\nregion from 20 to 30, and write the result to the file: \"/tmp/outfile.fasta\".\n\nfind_ranges\n\nFind contiguous ranges in a list of numerical values.\neg: data = [1,2,3,4,8,9,10]\nfind_ranges(data) will return:\n1, 2, 3, 4], [8, 9, 10\n\nhamdist\n\nUse this after aligning sequences.\nThis counts the number of differences between equal length str1 and str2\nThe order of the input sequences does not matter.\n\nfasta_to_dct\n\na dictionary of the contents of the file name given. Dictionary in the format:\n{sequence_id: sequence_string, id_2: sequence_2, etc.}\n\ndct_to_fasta\n\n:param d: dictionary in the form: {sequence_id: sequence_string, id_2: sequence_2, etc.}\n:param fn: The file name to write the fasta formatted file to.\n:return: Returns True if successfully wrote to file.\n\nfind_duplicate_ids\n\ncustomdist\n\nhyphen_to_underscore_fasta\n\nauto_duplicate_removal\n\nAttempts to automatically remove duplicate sequences from the specifed file. Writes results to output file\nspecified. Uses BioPython SeqIO to parse the in file specified. Replaces spaces in the sequence id with underscores.\nItterates over all sequences found - for each one, checking if its key already exists in an accumulating, if it\ndoes: check if the sequence which each specifies is the same. If they have the same key, and the same sequence -\nthen keep the second instance encountered. Once the file has been parsed - write to the output file specified all\nsequences found which\nWill raise an exception if an error occurs during execution.\n\nbuild_cons_seq\n\n# https://www.biostars.org/p/14026/\n\nown_cons_maker\n\nsplit_file_into_timepoints\n\nsize_selector\n\npy2_fasta_iter\n\nfrom Brent Pedersen: https://www.biostars.org/p/710/#1412\ngiven a fasta file. yield tuples of header, sequence\n\npy3_fasta_iter\n\nmodified from Brent Pedersen: https://www.biostars.org/p/710/#1412\ngiven a fasta file. yield tuples of header, sequence\n\nconvert_count_to_frequency_on_fasta\n\nwhen running vsearch as such:\nvsearch \u2013cluster_fast {} \u2013id 0.97 \u2013sizeout \u2013centroids {}\nWe get a centroids.fasta file with seqid header lines like:\n>ATTCCGGTATCT_9;size=1432;\n>CATCATCGTAAG_14;size=1;\netc.\nThis method converts those count values into frequencies.\nNotes: The delimiter between sections in the sequence id must be \";\".\nThere must be a section in the sequence id which has exactly: \"size=x\" where x is an integer.\nThis must be surrounded by \";\"'s\n\ncountNinPrimer\n\nMotifbinner2 requires values to be specified for primer id length and primer length. Its tiresome to have to\ncalculate this for many strings. So, I wrote this to help myself.\nAn example of a primer sequence might be: NNNNNNNAAGGGCCAAAGGAACCCTTTAGAGACTATG\nAnd we would like to know how many N's there are, how many other characters there are, and what the combined\ntotal lenght is.\n\ncompare_fasta_files\n\nCompares two fasta files, to see if they contain the same data. The sequences must be named the same. We check if\nsequence A from file 1 is the same as sequence A from file 2.\nThe order in the files does not matter.\nGaps are considered.\n\nunmake_hash_of_seqids\n\nWhen calling mafft - sequence ids over 253 in length are truncated. This can result in non-unique ids if the first\n253 characters of the seqid are the same, with a difference following that.\nTo get around this - we can has the sequence ids, and write a new .fasta file for mafft to work on, then\ntranslate the sequence ids back afterwards.\n\nThis function does the translation back afterwards.\n\nThis is a sibling function to: make_hash_of_seqIDS.\n\nWill raise an exception on error\n\nmake_hash_of_seqids\n\nWhen calling mafft - sequence ids over 253 in length are truncated. This can result in non-unique ids if the first\n253 characters of the seqid are the same, with a difference following that.\nTo get around this - we can has the sequence ids, and write a new .fasta file for mafft to work on, then\ntranslate the sequence ids back afterwards.\n\nThis function does the hashing and writing to file.\n\nThis is a sibling function to: unmake_hash_of_seqIDS\n\nWill raise an exception on error", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/hivdiversity/small_bix_tools", "keywords": "bioinformatics computational-biology", "license": "GNU GENERAL PUBLIC LICENSE", "maintainer": "", "maintainer_email": "", "name": "smallBixTools", "package_url": "https://pypi.org/project/smallBixTools/", "platform": "", "project_url": "https://pypi.org/project/smallBixTools/", "project_urls": { "Homepage": "https://bitbucket.org/hivdiversity/small_bix_tools" }, "release_url": "https://pypi.org/project/smallBixTools/0.0.33/", "requires_dist": null, "requires_python": "", "summary": "A few small methods for bioinformatics", "version": "0.0.33" }, "last_serial": 5512019, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c002215aab42d2e516973c8bf9c04ed8", "sha256": "480396c1761c4e801d8680c83b57101262de9e2a303b000a101f2671fdb19f49" }, "downloads": -1, "filename": "smallBixTools-0.0.10.tar.gz", "has_sig": false, "md5_digest": "c002215aab42d2e516973c8bf9c04ed8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4546, "upload_time": "2016-01-04T13:06:25", "url": "https://files.pythonhosted.org/packages/09/a9/2105bd3131de630372faefb40dc5718368ed7039cc5ca5e75345da6a3cde/smallBixTools-0.0.10.tar.gz" }, { "comment_text": "", "digests": { "md5": "9ac7fd91140fcf3a5b89c48ace837e66", "sha256": "37b65bf02e90cbd4ba1a24a7b80c43f464f05be5a8a3fa9a3423da2c5545b2b3" }, "downloads": -1, "filename": "smallBixTools-0.0.11.tar.gz", "has_sig": false, "md5_digest": "9ac7fd91140fcf3a5b89c48ace837e66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4708, "upload_time": "2016-01-28T09:44:14", "url": "https://files.pythonhosted.org/packages/ed/f2/ab29911b15f2edfb67f8b93aab86e2d06d6b88a21ead410eebb9b3d0f1c7/smallBixTools-0.0.11.tar.gz" }, { "comment_text": "", "digests": { "md5": "fbcb7c4b3c26719dbc510c69df9aec45", "sha256": "e49362d777e92fc92bf44dc381375b9e145eb853b92f3d191e55e804108ba67b" }, "downloads": -1, "filename": "smallBixTools-0.0.12.tar.gz", "has_sig": false, "md5_digest": "fbcb7c4b3c26719dbc510c69df9aec45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4675, "upload_time": "2016-01-28T11:16:26", "url": "https://files.pythonhosted.org/packages/3a/bd/6cd6e1b78314ed3f19dd1a21956936531254cb3a37c8f3dc9749e38cb4a2/smallBixTools-0.0.12.tar.gz" }, { "comment_text": "", "digests": { "md5": "9409537f7e9773140861da5124630bbb", "sha256": "4a55ee3a0eb5a1c6e349f33216ad336ff6b851f5c432969686e762cff0311201" }, "downloads": -1, "filename": "smallBixTools-0.0.13.tar.gz", "has_sig": false, "md5_digest": "9409537f7e9773140861da5124630bbb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4984, "upload_time": "2016-02-24T14:13:08", "url": "https://files.pythonhosted.org/packages/c8/cf/40bfb76df5175506afd79962fb3b626f7de59433fc768b7368ef94d8bf89/smallBixTools-0.0.13.tar.gz" } ], "0.0.14": [ { "comment_text": "", "digests": { "md5": "214ce069ec4944a1614b3dbd9635f3af", "sha256": "4c7a3ff090d1364d272856dc292ee92069c4c7709de662560021571486739b1a" }, "downloads": -1, "filename": "smallBixTools-0.0.14.tar.gz", "has_sig": false, "md5_digest": "214ce069ec4944a1614b3dbd9635f3af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6524, "upload_time": "2017-07-26T10:57:32", "url": "https://files.pythonhosted.org/packages/da/9f/ec60367b91f19e8133ca956e8277d4e58822cd72577d75480de9fdd8c1d8/smallBixTools-0.0.14.tar.gz" } ], "0.0.17": [ { "comment_text": "", "digests": { "md5": "7d6b9cb527e106d46ab00c6743b45f5e", "sha256": "acded24f7db2bcd5f90991dfdcc7c755435abddc4c5297f5ebb0ebfa956c9b8e" }, "downloads": -1, "filename": "smallBixTools-0.0.17.tar.gz", "has_sig": false, "md5_digest": "7d6b9cb527e106d46ab00c6743b45f5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10156, "upload_time": "2018-04-16T15:11:39", "url": "https://files.pythonhosted.org/packages/4c/ee/9bd6be074415951952aade0578bdbae38b86497ea9623680f5e5ce1f84a9/smallBixTools-0.0.17.tar.gz" } ], "0.0.18": [ { "comment_text": "", "digests": { "md5": "7446132a63a7a2013bcc48e1f72adcef", "sha256": "5c506c72398a9e92870151186ce3aab06dc319aa92251acb94e2a0337a808634" }, "downloads": -1, "filename": "smallBixTools-0.0.18.tar.gz", "has_sig": false, "md5_digest": "7446132a63a7a2013bcc48e1f72adcef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10825, "upload_time": "2018-04-18T15:46:10", "url": "https://files.pythonhosted.org/packages/09/ce/3b12e0203003f40ff899ccf9bcc9f151d3c006e46ff49e9cf5effd6ac437/smallBixTools-0.0.18.tar.gz" } ], "0.0.19": [ { "comment_text": "", "digests": { "md5": "cc6994e37659193f060d0c18b01473d2", "sha256": "0bfd0577162c72f1398b90a44cdb30adcd55bc43c2069741d0f9e7641edac57b" }, "downloads": -1, "filename": "smallBixTools-0.0.19.tar.gz", "has_sig": false, "md5_digest": "cc6994e37659193f060d0c18b01473d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14511, "upload_time": "2018-04-24T09:33:14", "url": "https://files.pythonhosted.org/packages/39/e5/061e52d652a5775b264f06c345e93a44761c6a1be8665a204ffa3ea643c0/smallBixTools-0.0.19.tar.gz" } ], "0.0.20": [ { "comment_text": "", "digests": { "md5": "088ea8a059747232b3d60b11c5ff08bf", "sha256": "0fd2a9bb031a090de4497f7a10e4738b5eddb69f718a2852abe256570a5e3bec" }, "downloads": -1, "filename": "smallBixTools-0.0.20.tar.gz", "has_sig": false, "md5_digest": "088ea8a059747232b3d60b11c5ff08bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15677, "upload_time": "2018-05-16T13:05:53", "url": "https://files.pythonhosted.org/packages/e4/44/37959ac8b363ff93bc2ff0cc213ca0ec8dfe02c0fc4952f89926418fe069/smallBixTools-0.0.20.tar.gz" } ], "0.0.21": [ { "comment_text": "", "digests": { "md5": "0832cc8adfa55ca8ec60ba8dbd06d821", "sha256": "c803cfccb1a2a41fb5896c0de868195f70377b948699a4b1bba1cceda80d7b8c" }, "downloads": -1, "filename": "smallBixTools-0.0.21.tar.gz", "has_sig": false, "md5_digest": "0832cc8adfa55ca8ec60ba8dbd06d821", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15689, "upload_time": "2018-05-16T14:09:59", "url": "https://files.pythonhosted.org/packages/33/10/315865cf6c36f70a815fc01f41afd4a3d6288bb118fd1681e60c06fb3108/smallBixTools-0.0.21.tar.gz" } ], "0.0.22": [ { "comment_text": "", "digests": { "md5": "f040b58464e5ab555147b43aeaf4faec", "sha256": "19f202add128a1065e8a00c4fdb07b23f315dbb1a0046231c8879ee8f19a6bd9" }, "downloads": -1, "filename": "smallBixTools-0.0.22.tar.gz", "has_sig": false, "md5_digest": "f040b58464e5ab555147b43aeaf4faec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15771, "upload_time": "2018-05-17T09:57:03", "url": "https://files.pythonhosted.org/packages/a1/e0/2a7bcd26b540382019a7173ae5d4a71b0c2aa98571764d3e793671e45e1f/smallBixTools-0.0.22.tar.gz" } ], "0.0.23": [ { "comment_text": "", "digests": { "md5": "935d899cbc63b8d1b67532f013ed990f", "sha256": "9c89887d3937bef0fcd0d6aac8180121fa46c5aca60c47837c7f7af543a3fc8a" }, "downloads": -1, "filename": "smallBixTools-0.0.23.tar.gz", "has_sig": false, "md5_digest": "935d899cbc63b8d1b67532f013ed990f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15899, "upload_time": "2018-05-18T14:35:22", "url": "https://files.pythonhosted.org/packages/af/bf/1e4f6fd8677dd9e80ed58e53cc916292a81e6b22f077f89563ea61f537aa/smallBixTools-0.0.23.tar.gz" } ], "0.0.24": [ { "comment_text": "", "digests": { "md5": "64f2f7979da7600ac8801aef85ffc484", "sha256": "5e6abed355d38c65b8c7a636b65dab44740708ff711cc23c654070f20c779498" }, "downloads": -1, "filename": "smallBixTools-0.0.24.tar.gz", "has_sig": false, "md5_digest": "64f2f7979da7600ac8801aef85ffc484", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15840, "upload_time": "2018-05-18T14:39:35", "url": "https://files.pythonhosted.org/packages/37/c7/36de3d0d44c870c2fc792f7585849ad56e50c5b38861c224679f08e3342e/smallBixTools-0.0.24.tar.gz" } ], "0.0.25": [ { "comment_text": "", "digests": { "md5": "6b0d20e273ba5813e19a32842435ebde", "sha256": "8427c05ec944e3c7702d29573d951ccd02cb5b4a0701294be59d390bca0c93ca" }, "downloads": -1, "filename": "smallBixTools-0.0.25.tar.gz", "has_sig": false, "md5_digest": "6b0d20e273ba5813e19a32842435ebde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15832, "upload_time": "2018-05-18T14:42:00", "url": "https://files.pythonhosted.org/packages/aa/36/0374452b47b03072d77d8d17aea62d4f5fd2ba2672863a468c1897d2c516/smallBixTools-0.0.25.tar.gz" } ], "0.0.26": [ { "comment_text": "", "digests": { "md5": "48c9355de7b90d20f95329687e263315", "sha256": "af25678bb3d48b3a8b252c88065ea18e9b1b8b586ebef47237fb15b7003f0193" }, "downloads": -1, "filename": "smallBixTools-0.0.26.tar.gz", "has_sig": false, "md5_digest": "48c9355de7b90d20f95329687e263315", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13153, "upload_time": "2018-08-03T11:22:30", "url": "https://files.pythonhosted.org/packages/3f/9f/32b99a4f0a5f756798aa7d4d677354d9a2f84b177cc213ef23ad04c8d614/smallBixTools-0.0.26.tar.gz" } ], "0.0.27": [ { "comment_text": "", "digests": { "md5": "96e082efdc67f265ad3abb92a994800f", "sha256": "28c4bad6adaaa36b2cd207dfa01c694a57e81c3290da6cbf2d70cfd9ddf1b484" }, "downloads": -1, "filename": "smallBixTools-0.0.27.tar.gz", "has_sig": false, "md5_digest": "96e082efdc67f265ad3abb92a994800f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13761, "upload_time": "2018-08-15T11:46:22", "url": "https://files.pythonhosted.org/packages/53/f6/23f2a527cc48680e5e4ee76bcda008065d7e06bb5898ee3fa57da53d8cf9/smallBixTools-0.0.27.tar.gz" } ], "0.0.28": [ { "comment_text": "", "digests": { "md5": "19981724a66995d3fda8b8772dd5f684", "sha256": "74d2858e9d9fb3fb64318d993687869472eefb7135c783d2688585ead3691bb4" }, "downloads": -1, "filename": "smallBixTools-0.0.28.tar.gz", "has_sig": false, "md5_digest": "19981724a66995d3fda8b8772dd5f684", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17316, "upload_time": "2018-10-26T08:53:31", "url": "https://files.pythonhosted.org/packages/aa/dd/1efcc1e9ceb4238e3d6bf5cd5c1a6f5ee5b31c6b6e77391870a8b20a63e8/smallBixTools-0.0.28.tar.gz" } ], "0.0.29": [ { "comment_text": "", "digests": { "md5": "8de34a7f8c03728bf39904e233e87772", "sha256": "b9e81995d3d4c7aa0f66355f8fa924c51af0041050cababeb8a0b0ee8f66cb5b" }, "downloads": -1, "filename": "smallBixTools-0.0.29.tar.gz", "has_sig": false, "md5_digest": "8de34a7f8c03728bf39904e233e87772", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17272, "upload_time": "2018-10-26T12:33:32", "url": "https://files.pythonhosted.org/packages/5e/fc/151b38300d57e9da3b42971f7ca2ec9e903199812a3b3630eb61e5f27e11/smallBixTools-0.0.29.tar.gz" } ], "0.0.30": [ { "comment_text": "", "digests": { "md5": "4c1ffdee20a95a907b14041a3484d62a", "sha256": "1315d9985b71617f0bd56cef869af22813146b2b1d016e6082f7f8191450b90d" }, "downloads": -1, "filename": "smallBixTools-0.0.30.tar.gz", "has_sig": false, "md5_digest": "4c1ffdee20a95a907b14041a3484d62a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17765, "upload_time": "2018-11-06T08:17:42", "url": "https://files.pythonhosted.org/packages/55/57/333eee756f77033bd27e30fe424bd90ed0d8c42e960ee9dc23e79bc65baa/smallBixTools-0.0.30.tar.gz" } ], "0.0.31": [ { "comment_text": "", "digests": { "md5": "fb5355d4723a9fd55940c619cd2ec583", "sha256": "3d5d84c7e26944570b55f770df21cd2a88ff158e8182d921b819d784de995d84" }, "downloads": -1, "filename": "smallBixTools-0.0.31.tar.gz", "has_sig": false, "md5_digest": "fb5355d4723a9fd55940c619cd2ec583", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18563, "upload_time": "2019-02-14T11:37:08", "url": "https://files.pythonhosted.org/packages/f9/85/9b0f1fb99a1aa322cd79e378224d30c21bb09a8442ac620642f575ed88f6/smallBixTools-0.0.31.tar.gz" } ], "0.0.32": [ { "comment_text": "", "digests": { "md5": "80284521593b158216128e6295ad12db", "sha256": "04ec8b5dd1a6fff51e87a81282a2c3a684600124befca38746035ae4080f2805" }, "downloads": -1, "filename": "smallBixTools-0.0.32.tar.gz", "has_sig": false, "md5_digest": "80284521593b158216128e6295ad12db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19003, "upload_time": "2019-02-15T08:06:39", "url": "https://files.pythonhosted.org/packages/70/5a/1b56107dd6e5b52af524f86291773e319715edb2a7a91c42da6eba2aa0ad/smallBixTools-0.0.32.tar.gz" } ], "0.0.33": [ { "comment_text": "", "digests": { "md5": "c968bee68ab111bde533ce9f7cd554ad", "sha256": "2867a26a7d43242fae06c605d8c159d34eacc4db61efce2022ec661946aa9e5b" }, "downloads": -1, "filename": "smallBixTools-0.0.33.tar.gz", "has_sig": false, "md5_digest": "c968bee68ab111bde533ce9f7cd554ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27725, "upload_time": "2019-07-10T13:06:58", "url": "https://files.pythonhosted.org/packages/55/b1/ad14d6d9a260a72d60c50805ada9786885d8006fd2c52feef6eb589ea892/smallBixTools-0.0.33.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c968bee68ab111bde533ce9f7cd554ad", "sha256": "2867a26a7d43242fae06c605d8c159d34eacc4db61efce2022ec661946aa9e5b" }, "downloads": -1, "filename": "smallBixTools-0.0.33.tar.gz", "has_sig": false, "md5_digest": "c968bee68ab111bde533ce9f7cd554ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27725, "upload_time": "2019-07-10T13:06:58", "url": "https://files.pythonhosted.org/packages/55/b1/ad14d6d9a260a72d60c50805ada9786885d8006fd2c52feef6eb589ea892/smallBixTools-0.0.33.tar.gz" } ] }