ngs-test-utils


Namengs-test-utils JSON
Version 0.0.6 PyPI version JSON
download
home_pageNone
SummaryUtilities for generation of synthetic NGS files
upload_time2024-11-04 12:02:05
maintainerNone
docs_urlNone
authorGenialis, Inc.
requires_python<3.13,>=3.11
licenseApache 2.0
keywords ngs test bioinformatics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==============
NGS test utils
==============

Utilities for generation of synthetic NGS files.

A simple showcase::

    from ngs_test_utils import testcase

    class ExampleTestCase(testcase.NgsTestCase):
        """NGS-test-utils showcase."""

        def test_example(self):
            """Make a simple GTf and BAM file."""

            self.gtf = self.make_gtf([
                dict(feature="gene", start=100, end=500, gene_id="G1"),
                dict(feature="exon", start=100, end=200, gene_id="G1"),
                dict(feature="exon", start=400, end=500, gene_id="G1"),
            ])

            self.bam = self.make_bam(
                chroms=[("chr1", 1000)],
                segments=[
                    dict(qname="r1", pos=150, cigar=[(0, 75)]),
                    dict(qname="r2", pos=250, cigar=[(0, 150)]),
                ],
            )

            # Use these files to run your tests...

In the above example you can see:

- Test case class subclasses ``testcase.NgsTestCase`` instead of
  ``unittest.TestCase``. This class brings in all the methods for
  generating synthetic files.
- Methods for generation of files aim to support "Pythonic"
  construction of NGS files from scratch. Although the methods try to be
  user-friendly,  one needs to be familiar with the structure of the
  file format.
- Method ``self.make_gtf`` accepts list of GTF segments. Each of these
  segments represents a line in a GTF file. Segment is given as a dict
  of values that represent columns (and attributes) of a line in GTF
  file.
- Method ``self.make_bam`` accepts a list of chromosomes (this is
  ingredient for BAM header) and list of segments (for BAM body).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ngs-test-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.11",
    "maintainer_email": null,
    "keywords": "ngs, test, bioinformatics",
    "author": "Genialis, Inc.",
    "author_email": "info@genialis.com",
    "download_url": "https://files.pythonhosted.org/packages/97/45/3922dc185eece66ac225b995634fbcbfeb9dbea628ec9829d959f4a0da62/ngs_test_utils-0.0.6.tar.gz",
    "platform": null,
    "description": "==============\nNGS test utils\n==============\n\nUtilities for generation of synthetic NGS files.\n\nA simple showcase::\n\n    from ngs_test_utils import testcase\n\n    class ExampleTestCase(testcase.NgsTestCase):\n        \"\"\"NGS-test-utils showcase.\"\"\"\n\n        def test_example(self):\n            \"\"\"Make a simple GTf and BAM file.\"\"\"\n\n            self.gtf = self.make_gtf([\n                dict(feature=\"gene\", start=100, end=500, gene_id=\"G1\"),\n                dict(feature=\"exon\", start=100, end=200, gene_id=\"G1\"),\n                dict(feature=\"exon\", start=400, end=500, gene_id=\"G1\"),\n            ])\n\n            self.bam = self.make_bam(\n                chroms=[(\"chr1\", 1000)],\n                segments=[\n                    dict(qname=\"r1\", pos=150, cigar=[(0, 75)]),\n                    dict(qname=\"r2\", pos=250, cigar=[(0, 150)]),\n                ],\n            )\n\n            # Use these files to run your tests...\n\nIn the above example you can see:\n\n- Test case class subclasses ``testcase.NgsTestCase`` instead of\n  ``unittest.TestCase``. This class brings in all the methods for\n  generating synthetic files.\n- Methods for generation of files aim to support \"Pythonic\"\n  construction of NGS files from scratch. Although the methods try to be\n  user-friendly,  one needs to be familiar with the structure of the\n  file format.\n- Method ``self.make_gtf`` accepts list of GTF segments. Each of these\n  segments represents a line in a GTF file. Segment is given as a dict\n  of values that represent columns (and attributes) of a line in GTF\n  file.\n- Method ``self.make_bam`` accepts a list of chromosomes (this is\n  ingredient for BAM header) and list of segments (for BAM body).\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Utilities for generation of synthetic NGS files",
    "version": "0.0.6",
    "project_urls": {
        "repository": "https://github.com/genialis/ngs-test-utils"
    },
    "split_keywords": [
        "ngs",
        " test",
        " bioinformatics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5047bdd91e19f72d4ce104ed67f2838d8f17fc548b18c692db24ce7ba08d7db5",
                "md5": "b548f8a1deee0706159d1eaf5b1ce53e",
                "sha256": "bf55dcf4e1f085249f213dafd50f456378cc5f7c058ca945c34284af16346140"
            },
            "downloads": -1,
            "filename": "ngs_test_utils-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b548f8a1deee0706159d1eaf5b1ce53e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.11",
            "size": 13624,
            "upload_time": "2024-11-04T12:02:03",
            "upload_time_iso_8601": "2024-11-04T12:02:03.212686Z",
            "url": "https://files.pythonhosted.org/packages/50/47/bdd91e19f72d4ce104ed67f2838d8f17fc548b18c692db24ce7ba08d7db5/ngs_test_utils-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "97453922dc185eece66ac225b995634fbcbfeb9dbea628ec9829d959f4a0da62",
                "md5": "6765764f3362cbac72ef782f95142f0c",
                "sha256": "4db672dd2e1ceab094e123e45316614a4ba2c3f67da33e6ca6c4f4092621f9e4"
            },
            "downloads": -1,
            "filename": "ngs_test_utils-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "6765764f3362cbac72ef782f95142f0c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.11",
            "size": 15450,
            "upload_time": "2024-11-04T12:02:05",
            "upload_time_iso_8601": "2024-11-04T12:02:05.306127Z",
            "url": "https://files.pythonhosted.org/packages/97/45/3922dc185eece66ac225b995634fbcbfeb9dbea628ec9829d959f4a0da62/ngs_test_utils-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-04 12:02:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "genialis",
    "github_project": "ngs-test-utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "ngs-test-utils"
}
        
Elapsed time: 0.40644s