{ "info": { "author": "NMDP Bioinformatics, CIBMTR", "author_email": "cibmtr-pypi@nmdp.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Natural Language :: English", "Programming Language :: Python :: 3.7" ], "description": "===============================\nSeqAnn\n===============================\n\n\n.. image:: https://img.shields.io/travis/nmdp-bioinformatics/SeqAnn.svg\n :target: https://travis-ci.org/nmdp-bioinformatics/SeqAnn\n\n.. image:: https://readthedocs.org/projects/seqann/badge/?version=latest\n :target: https://seqann.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/nmdp-bioinformatics/SeqAnn/shield.svg\n :target: https://pyup.io/repos/github/nmdp-bioinformatics/SeqAnn/\n :alt: Updates\n\n.. image:: https://img.shields.io/pypi/v/seqann.svg\n :target: https://pypi.python.org/pypi/seqann\n\n.. image:: https://coveralls.io/repos/github/nmdp-bioinformatics/SeqAnn/badge.svg?branch=master\n :target: https://coveralls.io/github/nmdp-bioinformatics/SeqAnn?branch=master\n\n\nPython package for annotating gene features\n\n\n* Free software: LGPL 3.0\n* Documentation: https://seqann.readthedocs.io.\n* `Jupyter Notebook`_\n\n\nOverview\n---------\n\nThe ``seqann`` package allows \nusers to annotate gene features in consensus sequences. Annotations can be created by passing consensus sequences to the ``annotate`` method in the\n``BioSeqAnn`` class. No parameters are required when initalizing a ``BioSeqAnn`` class. However, annotations can be\ncreated significantly faster when using a BioSQL database. When a BioSQL database is not provided the lastest `hla.dat`_ file is downloaded and parsed.\nA BioSQL database containing all of IPD-IMGT/HLA is available on DockerHub_ and can be\nrun on any machine that has docker installed. \n\nParameters\n----------\n\nBelow are the list of parameters and the default values used when initalizing a ``BioSeqAnn`` object.\n\n.. table::\n :widths: 10 10 10 50\n\n +-------------+-------------------+---------+-------------------------------------------------------------------------------+\n | Parameter | Type | Default | Description |\n +=============+===================+=========+===============================================================================+\n | server | ``BioSeqDatabase``| None | A BioSQL database containing all of the sequence data from IPD-IMGT/HLA. |\n +-------------+-------------------+---------+-------------------------------------------------------------------------------+\n | dbversion | ``str`` | Latest | The IPD-IMGT/HLA or KIR database release. |\n +-------------+-------------------+---------+-------------------------------------------------------------------------------+\n | datfile | ``str`` | None | The IPD-IMGT/HLA or KIR dat file to use in place of the **server** parameter. |\n +-------------+-------------------+---------+-------------------------------------------------------------------------------+\n | kir | ``bool`` | False | Flag for indicating the input sequences are from the KIR gene system. |\n +-------------+-------------------+---------+-------------------------------------------------------------------------------+\n | align | ``bool`` | False | Flag for producing the alignments along with the annotations. |\n +-------------+-------------------+---------+-------------------------------------------------------------------------------+\n | verbose | ``bool`` | False | Flag for running in verbose mode. |\n +-------------+-------------------+---------+-------------------------------------------------------------------------------+\n | verbosity | ``int`` | None | Numerical value to indicate how verbose the output will be in verbose mode. |\n +-------------+-------------------+---------+-------------------------------------------------------------------------------+\n | debug | ``Dict`` | None | A dictionary containing a process names as the key and verbosity as the value |\n +-------------+-------------------+---------+-------------------------------------------------------------------------------+\n\nUsage\n---------\n\nTo annotated a sequence initialize a new ``BioSeqAnn`` object and then pass the sequence to the\n``annotate`` method. The sequence must be a Biopython ``Seq``. The locus of the sequence is not required but it will improve the accuracy of the annotation.\n\n\n The packages `ncbi-blast+` and `clustalo` are required to be installed on your system.\n\n\n.. code-block:: python3\n\n from seqann import BioSeqAnn\n seqann = BioSeqAnn()\n ann = seqann.annotate(sequence, \"HLA-A\")\n\n\nThe annotation of sequence can be done with or without providing a ``BioSeqDatabase``. To use a BioSQL database \ninitialize a ``BioSeqDatabase`` with the parameters that match the database you have running. If you are \nrunning the imgt_biosqldb from DockerHub_ then the following parameters we be the same. \n\n.. code-block:: python3\n\n from seqann import BioSeqAnn\n from BioSQL import BioSeqDatabase\n server = BioSeqDatabase.open_database(driver=\"pymysql\", user=\"root\",\n passwd=\"my-secret-pw\", host=\"localhost\",\n db=\"bioseqdb\", port=3306)\n seqann = BioSeqAnn(server=server)\n ann = seqann.annotate(sequence, \"HLA-A\")\n\n\nYou may need to set environment variables: *BIOSQLHOST* (e.g. \"localhost\") and *BIOSQLPORT* (e.g. 3306) to your docker instance.\n\n\nAnnotations\n------------\n\n.. code-block:: shell\n\n {\n 'complete_annotation': True,\n 'annotation': {'exon_1': SeqRecord(seq=Seq('AGAGACTCTCCCG', SingleLetterAlphabet()), id='HLA:HLA00630', name='HLA:HLA00630', description='HLA:HLA00630 DQB1*03:04:01 597 bp', dbxrefs=[]),\n 'exon_2': SeqRecord(seq=Seq('AGGATTTCGTGTACCAGTTTAAGGCCATGTGCTACTTCACCAACGGGACGGAGC...GAG', SingleLetterAlphabet()), id='HLA:HLA00630', name='HLA:HLA00630', description='HLA:HLA00630 DQB1*03:04:01 597 bp', dbxrefs=[]),\n 'exon_3': SeqRecord(seq=Seq('TGGAGCCCACAGTGACCATCTCCCCATCCAGGACAGAGGCCCTCAACCACCACA...ATG', SingleLetterAlphabet()), id='HLA:HLA00630', name='', description='HLA:HLA00630', dbxrefs=[])},\n 'features': {'exon_1': SeqFeature(FeatureLocation(ExactPosition(0), ExactPosition(13), strand=1), type='exon_1'),\n 'exon_2': SeqFeature(FeatureLocation(ExactPosition(13), ExactPosition(283), strand=1), type='exon_2')\n 'exon_3': SeqFeature(FeatureLocation(ExactPosition(283), ExactPosition(503), strand=1), type='exon_3')},\n 'method': 'nt_search and clustalo',\n 'gfe': 'HLA-Aw2-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-4',\n 'seq': SeqRecord(seq=Seq('AGAGACTCTCCCGAGGATTTCGTGTACCAGTTTAAGGCCATGTGCTACTTCACC...ATG', SingleLetterAlphabet()), id='HLA:HLA00630', name='HLA:HLA00630', description='HLA:HLA00630 DQB1*03:04:01 597 bp', dbxrefs=[])\n }\n\n\nOnce a sequence has been annotated the gene features and their corresponding sequences are available in the returned ``Annotation`` object. If a full\nannotation is not able to be produced then nothing will be returned. Below is an example showing how the features can be accessed and printed out.\n\n.. code-block:: python3\n\n ann = seqann.annotate(sequence, \"HLA-A\")\n for feat in ann.annotation:\n print(feat, ann.gfe, str(ann.annotation[feat].seq), sep=\"\\t\")\n\n\nInstall\n------------\n\n.. code-block:: shell\n\n pip install seqann\n\n\nDependencies\n------------\n* `Clustal Omega`_ 1.2.0 or higher\n* `Python 3.6`_\n* blastn_\n\n.. _DockerHub: https://hub.docker.com/r/nmdpbioinformatics/imgt_biosqldb/\n.. _`GitHub page`: http://google.com\n.. _`hla.dat`: https://github.com/ANHIG/IMGTHLA\n.. _`Python 3.6`: https://www.python.org/downloads\n.. _`Clustal Omega`: http://www.clustal.org/omega/\n.. _blastn: https://blast.ncbi.nlm.nih.gov/Blast.cgi?PAGE_TYPE=BlastDocs&DOC_TYPE=Download\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n.. _`Jupyter Notebook`: https://github.com/nmdp-bioinformatics/SeqAnn/blob/master/notebook/Examples.ipynb\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/nmdp-bioinformatics/seq-ann", "keywords": "seqann", "license": "LGPL 3.0", "maintainer": "", "maintainer_email": "", "name": "seq-ann", "package_url": "https://pypi.org/project/seq-ann/", "platform": "", "project_url": "https://pypi.org/project/seq-ann/", "project_urls": { "Homepage": "https://github.com/nmdp-bioinformatics/seq-ann" }, "release_url": "https://pypi.org/project/seq-ann/1.0.5/", "requires_dist": [ "biopython (==1.74)", "PyMySQL (==0.9.3)", "bson (==0.5.8)", "requests (==2.22.0)" ], "requires_python": "", "summary": "Sequence Annotation", "version": "1.0.5" }, "last_serial": 5891466, "releases": { "1.0.5": [ { "comment_text": "", "digests": { "md5": "cfe6b0b2c80b729c9c58c75d14794f45", "sha256": "9c775da77bf66bef10b6a3fd9ebf4f589bfa4af1fc6bbc5f3d49f7fefb66f970" }, "downloads": -1, "filename": "seq_ann-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cfe6b0b2c80b729c9c58c75d14794f45", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22334736, "upload_time": "2019-09-26T16:15:26", "url": "https://files.pythonhosted.org/packages/01/4b/848dc2fbf23199f65b88476588cfe9abb259e88f76c86d39a7469e013fc3/seq_ann-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e52c2dad4042ca3f5dc339da93d86b5b", "sha256": "207a88fbe224ab4d382f8d197888fad48021f07d5508d723a4d79b7c849fa739" }, "downloads": -1, "filename": "seq-ann-1.0.5.tar.gz", "has_sig": false, "md5_digest": "e52c2dad4042ca3f5dc339da93d86b5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21139976, "upload_time": "2019-09-26T16:16:01", "url": "https://files.pythonhosted.org/packages/df/73/6c1e37780bab1d243af397c838800eba6ad66c120725ba5f5069d13def3e/seq-ann-1.0.5.tar.gz" } ], "1.0.5.dev1": [ { "comment_text": "", "digests": { "md5": "6ac2e59fc49cb7a6a4771a4efa935f27", "sha256": "4b9ae2fe7baaafb11f1041b6b39efaa2d5cb00acfeb2e77ea21a3637436b771c" }, "downloads": -1, "filename": "seq_ann-1.0.5.dev1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6ac2e59fc49cb7a6a4771a4efa935f27", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22334824, "upload_time": "2019-09-26T15:20:02", "url": "https://files.pythonhosted.org/packages/92/b6/e1d28c71fee7152836b757203643e85dbaea27abf48c71aeb4640fef91fd/seq_ann-1.0.5.dev1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "52fb172a0d1d4ff30f50f70c8cbc482f", "sha256": "37b7ea1ffac6941074e84821cb6319ac9d5d6b4c4ab027cbc3d252ce015bb862" }, "downloads": -1, "filename": "seq-ann-1.0.5.dev1.tar.gz", "has_sig": false, "md5_digest": "52fb172a0d1d4ff30f50f70c8cbc482f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21140062, "upload_time": "2019-09-26T15:20:41", "url": "https://files.pythonhosted.org/packages/45/bf/dcbe030d98cca9431589f85a57554a5742458f78e63d6be841c8a82fa375/seq-ann-1.0.5.dev1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cfe6b0b2c80b729c9c58c75d14794f45", "sha256": "9c775da77bf66bef10b6a3fd9ebf4f589bfa4af1fc6bbc5f3d49f7fefb66f970" }, "downloads": -1, "filename": "seq_ann-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cfe6b0b2c80b729c9c58c75d14794f45", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22334736, "upload_time": "2019-09-26T16:15:26", "url": "https://files.pythonhosted.org/packages/01/4b/848dc2fbf23199f65b88476588cfe9abb259e88f76c86d39a7469e013fc3/seq_ann-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e52c2dad4042ca3f5dc339da93d86b5b", "sha256": "207a88fbe224ab4d382f8d197888fad48021f07d5508d723a4d79b7c849fa739" }, "downloads": -1, "filename": "seq-ann-1.0.5.tar.gz", "has_sig": false, "md5_digest": "e52c2dad4042ca3f5dc339da93d86b5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21139976, "upload_time": "2019-09-26T16:16:01", "url": "https://files.pythonhosted.org/packages/df/73/6c1e37780bab1d243af397c838800eba6ad66c120725ba5f5069d13def3e/seq-ann-1.0.5.tar.gz" } ] }