{ "info": { "author": "Peter Griess, Ben Glick", "author_email": "pg@std.in, glick@glick.cloud", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Bio-Informatics", "Topic :: Software Development :: Libraries" ], "description": "Running NCBI BLAST manually is of course not rocket science, but this\nmodule provides several benefits over doing so:\n\n* Automatically runs a BLAST process for each CPU on the system;\n achieves far better throughput than the ``-num_threads`` option\n* Provides an iterator API that emits native Python objects for each\n BLAST result `as they're produced`, rather than at the end\n* ``Result`` and ``Hit`` objects obviate the need for manually parsing\n results; all values represented by their native Python types (e.g.\n ``Hit.evalue`` is a ``float``, etc)\n\n.. _`NCBI BLAST`: http://blast.ncbi.nlm.nih.gov/\n\nExample\n-------\n\nHere's a simple example with comments hilighting some relevant\nfeatures\n\n::\n\n import pyblast\n \n with open('data.fasta') as f:\n # Use the pyblast.blastx() iterator function\n for r in pyblast.blastx(f, db='/path/to/swissprot'):\n msg = 'query {} has {} hits'.format(r.query_id, len(r.hits))\n if r.hits:\n # Use Hit.evalue as a float for comparison\n min_evalue = sorted([h.evalue for h in r.hits])[0]\n msg += '; minimum evalue {:f}'.format(min_evalue)\n\n print msg\n\nThis will produce output like the following\n\n::\n\n query M00181:167:000000000-A4VBV:1:1101:11880:1874 1:N:0:6 has 6 hits; minimum evalue 0.310000\n query M00181:167:000000000-A4VBV:1:1101:17067:1875 1:N:0:6 has 14 hits; minimum evalue 0.200000\n query M00181:167:000000000-A4VBV:1:1101:15039:1878 1:N:0:6 has 4 hits; minimum evalue 4.400000\n query M00181:167:000000000-A4VBV:1:1101:17090:1895 1:N:0:6 has 6 hits; minimum evalue 1.700000\n query M00181:167:000000000-A4VBV:1:1101:15843:1907 1:N:0:6 has 2 hits; minimum evalue 1.800000\n\n\nAPI\n---\n\n.. _`blastn`:\n\n``blastn(input_file, *args, **kwargs)``\n\nIterator to process the contents of the FASTA ``input_file`` using\n``blastn``; yields `Result`_ objects.\n\nThe ``*args`` and ``**kwargs`` arguments control how `blastn` is\ninvoked. The former are passed as options without values, while the\nlatter are passed as options with values. For example,\n``blastn(some_file, 'ungapped', db='foo/bar')`` will run ``blastn``\nwith the ``-ungapped -db foo/bar`` options.\n\nIn addition, the following keyword arguments are handled specially and\nare not passed on to BLAST:\n\n- ``pb_num_processes``: number of BLAST processes to spawn; default is ``sysconf(SC_NPROCESSORS_ONLN)``\n- ``pb_fields``: iterable of field names to retrieve for each hit; default is `DEFAULT_HIT_FIELDS`_. The list of valid field names (and their meanings) can be found in the ``*** Formatting options`` section of ``blastn -help``.\n\n``blastp(input_file, *args, **kwargs)``\n\nSee documentation for `blastn`_.\n\n``blastx(input_file, *args, **kwargs)``\n\nSee documentation for `blastn`_.\n\n.. _`Result`:\n\n``Result``\n\nThe result of BLAST processing a single query sequence. The set of\nattributes on this object are:\n\n- ``id``: identifier for the query sequence; can be ``None``\n- ``description``: textual description of the query sequence; can be ``None``\n- ``hits``: array of `Hit`_ objects\n\n.. _`Hit`:\n\n``Hit``\n\nA single sequence hit in a `Result`_ object.\n\nThe attributes of this object are the names of the fields requested of\nBLAST. For example, if ``blastn`` was run with ``pb_fields=['qseqid',\n...]`` then one could access the ``qseqid`` value of the ``Hit``\nobject ``h`` like so: ``h.qseqid``. Fields referenced that were not\nrequested of BLAST have a ``None`` value.\n\nIn addition, BLAST fields are converted to their native Python types.\nFor example, ``evalue`` fields are automatically converted to floating\npoint values.\n\n.. _`DEFAULT_HIT_FIELDS`:\n\n``DEFAULT_HIT_FIELDS``\n\nThe default fields returned for each ``Hit`` object.\n\n``VERSION``\n\nThe version of ``pyblast`` that's being used. This can be used to more\neasily than feature detection to determine what features of the module\nare available.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/benhg/pyblast", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyblast3", "package_url": "https://pypi.org/project/pyblast3/", "platform": "", "project_url": "https://pypi.org/project/pyblast3/", "project_urls": { "Homepage": "https://github.com/benhg/pyblast" }, "release_url": "https://pypi.org/project/pyblast3/0.1/", "requires_dist": null, "requires_python": "", "summary": "Run NCBI BLAST with an easy-to-use Pythonic API", "version": "0.1" }, "last_serial": 5886630, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "fad84315159a39cf5bc00a7e2f614e8c", "sha256": "4557b6cda33a591ade5c17873ad25c405754c40aedbe4cbb38027152870e4477" }, "downloads": -1, "filename": "pyblast3-0.1.tar.gz", "has_sig": false, "md5_digest": "fad84315159a39cf5bc00a7e2f614e8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2970, "upload_time": "2019-09-25T18:14:24", "url": "https://files.pythonhosted.org/packages/72/68/80dc9d2d03fa72efaec4a2e53df4013bd829a273eda7f4d787e6b679ae23/pyblast3-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fad84315159a39cf5bc00a7e2f614e8c", "sha256": "4557b6cda33a591ade5c17873ad25c405754c40aedbe4cbb38027152870e4477" }, "downloads": -1, "filename": "pyblast3-0.1.tar.gz", "has_sig": false, "md5_digest": "fad84315159a39cf5bc00a7e2f614e8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2970, "upload_time": "2019-09-25T18:14:24", "url": "https://files.pythonhosted.org/packages/72/68/80dc9d2d03fa72efaec4a2e53df4013bd829a273eda7f4d787e6b679ae23/pyblast3-0.1.tar.gz" } ] }