cutseq


Namecutseq JSON
Version 0.0.57 PyPI version JSON
download
home_pagehttps://github.com/y9c/cutseq
SummaryAutomatically cut adapter / barcode / UMI from NGS data
upload_time2024-11-17 05:32:20
maintainerNone
docs_urlNone
authorYe Chang
requires_python<4.0,>=3.8
licenseMIT
keywords bioinformatics ngs adapter barcode umi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ✂️ CutSeq

[![Pypi Releases](https://img.shields.io/pypi/v/cutseq.svg)](https://pypi.python.org/pypi/cutseq)
[![Downloads](https://pepy.tech/badge/cutseq)](https://pepy.tech/project/cutseq)

CutSeq is a tool that provides an efficient wrapper for the cutadapt tool, which is powerful in handling various types of NGS libraries.
Due to the complexities involved in NGS library preparation methods, mutiple operations are necessary to process sequencing reads correctly.

Take _SMARTer® Stranded Total RNA-Seq Kit v3_ as an example, at least 9 operations are required.

![](https://raw.githubusercontent.com/y9c/cutseq/main/docs/takaraV3.png)

For **Read 1**:

1.  Remove the Illumina p7 adapter from the end of the sequence.
2.  Remove 14 nt (8+3+3) at the rightmost position of the sequence, representing UMI and linker sequence from the beginning of read 2. This is required when the library insert size is shorter than the sequencing length.
3.  Remove poly-T sequences at the beginning of the sequence (read 1 is oriented in reverse to the RNA, hence a polyA tail appears as a leading polyT sequence).
4.  Remove low-quality bases from right to left.

For **Read 2**:

5.  Remove the reverse complement Illumina p5 adapter from the end of the sequence.
6.  Extract the 8 nt UMI sequence from the beginning of the sequence and append it to the read name for downstream analysis.
7.  Mask a 6 nt linker sequence at the leftmost position immediately after clipping the UMI sequence.
8.  Remove poly-A sequences at the end of the read.
9.  Remove low-quality bases from right to left.

These operations must be performed in the **correct order**. The limitations of the cutadapt tool make it challenging to configure these operations in a single command, often leading to errors unnoticed in some publications.

---

To solve this by using cutadapt, we can run multiple cutadpat insitent sequentially or pipe multiple commands together. But this waste lots of IO and computational resource. I am thinking there a more eligent API to make things easy. Then comes this toy project.
-- **What you need is only one parameter which spcific what the library would looks like.**

CutSeq overcomes these limitations by enabling multiple operations in a automatical manner to ensure accuracy and efficiency.

## How to install?

```bash
pip install cutseq
```

## How to use?

Execute adapter trimming by providing a single parameter and your input files:

```bash
cutseq -A TAKARAV3 test_R1.fq.gz test_R2.fq.gz
```

Alternatively, you can specify a custom adapter sequence:

`cutseq -a "ACACGACGCTCTTCCGATCTXXX<XXXXXXNNNNNNNNAGATCGGAAGAGCACACGTC"`

![](https://raw.githubusercontent.com/y9c/cutseq/main/docs/explain_library.png)

The customized scheme can be explained by diagram above.

- The outmost parts on both ends are the Illumina adapters.
- The first inner parts are inline barcode sequence or customized PCR primers in the library construction step. These are also fixed DNA sequence, and will be represented by by sequence within `(` and `)`.
- The second inner parts are the UMI sequence, which is a random sequence and will be represented by `N`.
- The innermost parts are sequnce to be masked, which will be represented by `X`. This can be random tail in the library construction step, caused by template switching or other reasons.
- The center parts are the actual library sequence, which will be represented by `>` , `<` or `-`. `>` means that sequence is forward, `<` means that sequence is reverse, `-` means that sequence orientation is unknown.

More details can be found in the [document](https://cutseq.yech.science)

## TODO

[ ] support more library scheme

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/y9c/cutseq",
    "name": "cutseq",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "bioinformatics, NGS, adapter, barcode, UMI",
    "author": "Ye Chang",
    "author_email": "yech1990@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/54/45/2f4ac0592a0e06fac117d1db82c5240881359e46ed2355ca43f18fe039ff/cutseq-0.0.57.tar.gz",
    "platform": null,
    "description": "# \u2702\ufe0f CutSeq\n\n[![Pypi Releases](https://img.shields.io/pypi/v/cutseq.svg)](https://pypi.python.org/pypi/cutseq)\n[![Downloads](https://pepy.tech/badge/cutseq)](https://pepy.tech/project/cutseq)\n\nCutSeq is a tool that provides an efficient wrapper for the cutadapt tool, which is powerful in handling various types of NGS libraries.\nDue to the complexities involved in NGS library preparation methods, mutiple operations are necessary to process sequencing reads correctly.\n\nTake _SMARTer\u00ae Stranded Total RNA-Seq Kit v3_ as an example, at least 9 operations are required.\n\n![](https://raw.githubusercontent.com/y9c/cutseq/main/docs/takaraV3.png)\n\nFor **Read 1**:\n\n1.  Remove the Illumina p7 adapter from the end of the sequence.\n2.  Remove 14 nt (8+3+3) at the rightmost position of the sequence, representing UMI and linker sequence from the beginning of read 2. This is required when the library insert size is shorter than the sequencing length.\n3.  Remove poly-T sequences at the beginning of the sequence (read 1 is oriented in reverse to the RNA, hence a polyA tail appears as a leading polyT sequence).\n4.  Remove low-quality bases from right to left.\n\nFor **Read 2**:\n\n5.  Remove the reverse complement Illumina p5 adapter from the end of the sequence.\n6.  Extract the 8 nt UMI sequence from the beginning of the sequence and append it to the read name for downstream analysis.\n7.  Mask a 6 nt linker sequence at the leftmost position immediately after clipping the UMI sequence.\n8.  Remove poly-A sequences at the end of the read.\n9.  Remove low-quality bases from right to left.\n\nThese operations must be performed in the **correct order**. The limitations of the cutadapt tool make it challenging to configure these operations in a single command, often leading to errors unnoticed in some publications.\n\n---\n\nTo solve this by using cutadapt, we can run multiple cutadpat insitent sequentially or pipe multiple commands together. But this waste lots of IO and computational resource. I am thinking there a more eligent API to make things easy. Then comes this toy project.\n-- **What you need is only one parameter which spcific what the library would looks like.**\n\nCutSeq overcomes these limitations by enabling multiple operations in a automatical manner to ensure accuracy and efficiency.\n\n## How to install?\n\n```bash\npip install cutseq\n```\n\n## How to use?\n\nExecute adapter trimming by providing a single parameter and your input files:\n\n```bash\ncutseq -A TAKARAV3 test_R1.fq.gz test_R2.fq.gz\n```\n\nAlternatively, you can specify a custom adapter sequence:\n\n`cutseq -a \"ACACGACGCTCTTCCGATCTXXX<XXXXXXNNNNNNNNAGATCGGAAGAGCACACGTC\"`\n\n![](https://raw.githubusercontent.com/y9c/cutseq/main/docs/explain_library.png)\n\nThe customized scheme can be explained by diagram above.\n\n- The outmost parts on both ends are the Illumina adapters.\n- The first inner parts are inline barcode sequence or customized PCR primers in the library construction step. These are also fixed DNA sequence, and will be represented by by sequence within `(` and `)`.\n- The second inner parts are the UMI sequence, which is a random sequence and will be represented by `N`.\n- The innermost parts are sequnce to be masked, which will be represented by `X`. This can be random tail in the library construction step, caused by template switching or other reasons.\n- The center parts are the actual library sequence, which will be represented by `>` , `<` or `-`. `>` means that sequence is forward, `<` means that sequence is reverse, `-` means that sequence orientation is unknown.\n\nMore details can be found in the [document](https://cutseq.yech.science)\n\n## TODO\n\n[ ] support more library scheme\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Automatically cut adapter / barcode / UMI from NGS data",
    "version": "0.0.57",
    "project_urls": {
        "Homepage": "https://github.com/y9c/cutseq",
        "Repository": "https://github.com/y9c/cutseq"
    },
    "split_keywords": [
        "bioinformatics",
        " ngs",
        " adapter",
        " barcode",
        " umi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9cb91624d9d714c152bd640ff2cd0713de3bd1944f362adaed5a2f1c4f271bc8",
                "md5": "a584d985e2de6c37fac62e1639f26c18",
                "sha256": "d8f2477fb543abe571f19efb6d1d1fd79162241163b3c07e955be6926be5c87f"
            },
            "downloads": -1,
            "filename": "cutseq-0.0.57-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a584d985e2de6c37fac62e1639f26c18",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 13762,
            "upload_time": "2024-11-17T05:32:19",
            "upload_time_iso_8601": "2024-11-17T05:32:19.047474Z",
            "url": "https://files.pythonhosted.org/packages/9c/b9/1624d9d714c152bd640ff2cd0713de3bd1944f362adaed5a2f1c4f271bc8/cutseq-0.0.57-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54452f4ac0592a0e06fac117d1db82c5240881359e46ed2355ca43f18fe039ff",
                "md5": "45fec3bb13302f86b181346ed3e46b5d",
                "sha256": "60d6a037d9ff36e30f2da68847e9e77cd8ee6981530e5d5d33f22d5deab0d329"
            },
            "downloads": -1,
            "filename": "cutseq-0.0.57.tar.gz",
            "has_sig": false,
            "md5_digest": "45fec3bb13302f86b181346ed3e46b5d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 12867,
            "upload_time": "2024-11-17T05:32:20",
            "upload_time_iso_8601": "2024-11-17T05:32:20.541810Z",
            "url": "https://files.pythonhosted.org/packages/54/45/2f4ac0592a0e06fac117d1db82c5240881359e46ed2355ca43f18fe039ff/cutseq-0.0.57.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 05:32:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "y9c",
    "github_project": "cutseq",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cutseq"
}
        
Elapsed time: 3.24947s