{ "info": { "author": "Xiaoping Li", "author_email": "lixiaopi@oregonstate.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3" ], "description": "# NCBI_Companion\n## Introduction\n\nNCBI_Companion targets to construct databases, generate a fasta file and a taxonomy mappingusing by using Genbank Entrez utilities.\n\nBiopython copyright belongs to Biopython teams\nEntrez copyright belongs to NCBI entrez teams\n***\n## Contents\n\n### class LoadSpecies\n\n>This class is to used fetch species name contains in csv file, text file, excel or fasta file.\n\n**Functions**\n\n| function names | parameters | Return |\n|--------------------|-----------------|-------|\n| LoadSpecies | species_input, species_output, ifout | initialize |\n| ReadSpeciesFile_text | None | a list (if specified, a table in local directory) |\n| ReadSpeciesFile_excel | sp_col, sheetname, header, fullname | a list (or a local file) |\n| ReadSpeciesFile_csv | sp_col, header, fullname | a list (or a local file ) |\n| ExtractSpeciesFromFasta | ranges, delimiter | a list (or a local file) |\n\n>all those functions return a list of species names or ID list\n\n**Usage**\n\n```python\nspecies = LoadSpecies(input_file, output_file, ifout = True)\nspecies.ReadSpeciesFile_excel(sp_col='act_sym_fullname', sheetname = 0, header = 0, fullname = False)\n```\n\n***\n### class NCBI_Tools\n> This class implements Biopython Entrez to interact with NCBI/Genbank API to either get accession id, taxonomy id, sequences or taxonomy ranking, or converting them. Some of core functions return a tracker flag that can trace which functions have been called. This order will be used by Sqlite_Dumps class to generate fasta file and mapping file\n\n**Functions**\n\n| Functions | parameters | return | database table name | Tracker Flag |\n|---|---|---|---|---|\n| NCBI_Tools | ncbi_key, ncbi_email, sqlite_db, ncbi_db, idtype | initialize | None | None |\n| Update_API | key, email | updated key and email | None | None |\n| getTracker | None | a tracker list | None | None |\n| ncbi_Species2Genome | species list | accession ID list | Sp2Genome | P9 |\n| ncbi_Search2Acc | search terms, howmany to quire | Search2AccIDs |Tracker | P1 |\n| ncbi_Species2Acc | species list, more terms (optional) | Sp2AccIDs | Tracker | P2 |\n| ncbi_GetSeqsFromAcc | table_name, column_name | Acc2Seq | Tracker | P3 |\n| ncbi_GetTaxIdFromAcc | table_name, column_name | Uid2TaxIDs | Tracker | P4 |\n| ncbi_eAcc2Seq | accession ID | Tracker | Acc2Seq | P5 |\n| ncbi_eAcc2TaxID | accession ID | Tracker | Uid2TaxIDs | P6 |\n| ncbi_Species2Taxa | species list, style, levels_n | Tracker | Sp2Taxa | P7 |\n| ncbi_Id2Taxa | style, levels_n | Tracker | TaxId2Ranking | P8 |\n\n\n**Usage**\n\nExample 1: Known species list and search for its trnL gene\n\nTracker Flag: P2---> P3 / P4 ---> P4 / P3 ---> P8 \n\n```python\nfrom NCBI_Companion import NCBI_Companion\ncompanion = NCBI_Companion.NCBI_Tools(key, email, 'databasename', 'nuccore', 'acc')\ncompanion.ncbi_Species2Acc(species_list, 'trnL')\ncompanion.ncbi_GetSeqsFromAcc('Sp2AccIDs', 'acc_id')\ncompanion.ncbi_GetTaxIdFromAcc('Sp2AccIDs', 'acc_id')\ncompanion.ncbi_Id2Taxa(style = 'qiime', levels_n = 7) # 7 levels of taxonomy ranking qiime style D_0_..;\n```\n\n\n### class Sqlite_Dumps\n\n**Functions**\n\n| functions | parameters | return |\n|---|---|---|\n| Sqlite_Dumps | sqlite_db, output_prefix, tracker, header_type = 'acc' | initialize |\n| sqlite_dump | None | a fasta and a mapping file in local |\n\n\n**Usage**\n\n```python\n# get tracker\ntracker = companion.getTracker()\ndump = Sqlite_Dumps('database constructed by NCBI_Tools', 'fasta and mapping file name, not extension', tracker, header_type = 'acc')\n```\n\n\n\n\n\n\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/lixiaopi1985/NCBI_Companion", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "NCBI-Companion", "package_url": "https://pypi.org/project/NCBI-Companion/", "platform": "", "project_url": "https://pypi.org/project/NCBI-Companion/", "project_urls": { "Homepage": "https://github.com/lixiaopi1985/NCBI_Companion" }, "release_url": "https://pypi.org/project/NCBI-Companion/1.0.8/", "requires_dist": [ "biopython (>=1.72)", "pandas (>=0.23.4)", "beautifulsoup4 (>=4.6.3)" ], "requires_python": "", "summary": "NCBI_Companion assists you to build a reference database with a fasta and a mapping file through Genbank", "version": "1.0.8" }, "last_serial": 4573211, "releases": { "1.0.8": [ { "comment_text": "", "digests": { "md5": "16eb4b3478f99bbc02813c3b90bd081b", "sha256": "e3e403d4774ed2339945eefcacbcca128d395d58dd4503c4a96427f5e7274c3e" }, "downloads": -1, "filename": "NCBI_Companion-1.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "16eb4b3478f99bbc02813c3b90bd081b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12273, "upload_time": "2018-12-07T20:19:48", "url": "https://files.pythonhosted.org/packages/f4/1a/32fb516781086703a47ba91cb97e4456996a56643db607bb20d774bf53ba/NCBI_Companion-1.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f23c16daba8ec20f36e1dfe698bcbc72", "sha256": "48152917f1f9de4e2a934e66c5c232e2335a440222239e20e7ba3d128b56f7c2" }, "downloads": -1, "filename": "NCBI_Companion-1.0.8.tar.gz", "has_sig": false, "md5_digest": "f23c16daba8ec20f36e1dfe698bcbc72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11654, "upload_time": "2018-12-07T20:19:50", "url": "https://files.pythonhosted.org/packages/00/4a/6069cf8d6b8c5a4a9f51c56bf1ff1c64c9ff08f6bc5ec60b703e8c5486c6/NCBI_Companion-1.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "16eb4b3478f99bbc02813c3b90bd081b", "sha256": "e3e403d4774ed2339945eefcacbcca128d395d58dd4503c4a96427f5e7274c3e" }, "downloads": -1, "filename": "NCBI_Companion-1.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "16eb4b3478f99bbc02813c3b90bd081b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12273, "upload_time": "2018-12-07T20:19:48", "url": "https://files.pythonhosted.org/packages/f4/1a/32fb516781086703a47ba91cb97e4456996a56643db607bb20d774bf53ba/NCBI_Companion-1.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f23c16daba8ec20f36e1dfe698bcbc72", "sha256": "48152917f1f9de4e2a934e66c5c232e2335a440222239e20e7ba3d128b56f7c2" }, "downloads": -1, "filename": "NCBI_Companion-1.0.8.tar.gz", "has_sig": false, "md5_digest": "f23c16daba8ec20f36e1dfe698bcbc72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11654, "upload_time": "2018-12-07T20:19:50", "url": "https://files.pythonhosted.org/packages/00/4a/6069cf8d6b8c5a4a9f51c56bf1ff1c64c9ff08f6bc5ec60b703e8c5486c6/NCBI_Companion-1.0.8.tar.gz" } ] }