gtfparse-transcript-transformer


Namegtfparse-transcript-transformer JSON
Version 2.0.3 PyPI version JSON
download
home_pagehttps://github.com/jdcla/gtfparse
SummaryGTF Parsing
upload_time2023-12-15 19:49:32
maintainer
docs_urlNone
authorAlex Rubinsteyn
requires_python
licensehttp://www.apache.org/licenses/LICENSE-2.0.html
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            Temporary fix for gtfparse to work with polars>0.16, based on https://github.com/y9c/gtfparse

gtfparse
========
Parsing tools for GTF (gene transfer format) files.

# Example usage

## Parsing all rows of a GTF file into a Pandas DataFrame

```python
from gtfparse import read_gtf

# returns GTF with essential columns such as "feature", "seqname", "start", "end"
# alongside the names of any optional keys which appeared in the attribute column
df = read_gtf("gene_annotations.gtf")

# filter DataFrame to gene entries on chrY
df_genes = df[df["feature"] == "gene"]
df_genes_chrY = df_genes[df_genes["seqname"] == "Y"]
```


## Getting gene FPKM values from a StringTie GTF file

```python
from gtfparse import read_gtf

df = read_gtf(
    "Transcripts.gtf",
    column_converters={"FPKM": float})

gene_fpkms = {
    gene_name: fpkm
    for (gene_name, fpkm, feature)
    in zip(df["seqname"], df["FPKM"], df["feature"])
    if feature == "gene"
}
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jdcla/gtfparse",
    "name": "gtfparse-transcript-transformer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Alex Rubinsteyn",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/71/b6/d6ca447009323e4038a4691b97aaf66979df958357797c1e4d0393dc5478/gtfparse_transcript_transformer-2.0.3.tar.gz",
    "platform": null,
    "description": "Temporary fix for gtfparse to work with polars>0.16, based on https://github.com/y9c/gtfparse\n\ngtfparse\n========\nParsing tools for GTF (gene transfer format) files.\n\n# Example usage\n\n## Parsing all rows of a GTF file into a Pandas DataFrame\n\n```python\nfrom gtfparse import read_gtf\n\n# returns GTF with essential columns such as \"feature\", \"seqname\", \"start\", \"end\"\n# alongside the names of any optional keys which appeared in the attribute column\ndf = read_gtf(\"gene_annotations.gtf\")\n\n# filter DataFrame to gene entries on chrY\ndf_genes = df[df[\"feature\"] == \"gene\"]\ndf_genes_chrY = df_genes[df_genes[\"seqname\"] == \"Y\"]\n```\n\n\n## Getting gene FPKM values from a StringTie GTF file\n\n```python\nfrom gtfparse import read_gtf\n\ndf = read_gtf(\n    \"Transcripts.gtf\",\n    column_converters={\"FPKM\": float})\n\ngene_fpkms = {\n    gene_name: fpkm\n    for (gene_name, fpkm, feature)\n    in zip(df[\"seqname\"], df[\"FPKM\"], df[\"feature\"])\n    if feature == \"gene\"\n}\n```\n\n\n",
    "bugtrack_url": null,
    "license": "http://www.apache.org/licenses/LICENSE-2.0.html",
    "summary": "GTF Parsing",
    "version": "2.0.3",
    "project_urls": {
        "Homepage": "https://github.com/jdcla/gtfparse"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fef3f0a9f953ce8c8e7488a32db53243231d916e0bc75302e585f4d4e97b74b8",
                "md5": "b58a3fbafb8179f979ada00755472666",
                "sha256": "32e6e326b67d8f63a1ec4b1a3f0ab284ed5371cf22fd9328018110d74b443a8e"
            },
            "downloads": -1,
            "filename": "gtfparse_transcript_transformer-2.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b58a3fbafb8179f979ada00755472666",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 15158,
            "upload_time": "2023-12-15T19:49:31",
            "upload_time_iso_8601": "2023-12-15T19:49:31.740810Z",
            "url": "https://files.pythonhosted.org/packages/fe/f3/f0a9f953ce8c8e7488a32db53243231d916e0bc75302e585f4d4e97b74b8/gtfparse_transcript_transformer-2.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71b6d6ca447009323e4038a4691b97aaf66979df958357797c1e4d0393dc5478",
                "md5": "c63cad799b175f0330b7785388a1bd60",
                "sha256": "75784bee1be908fd077f3593dad34cde3d5bf1a59917d808114fbc919beb1a77"
            },
            "downloads": -1,
            "filename": "gtfparse_transcript_transformer-2.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c63cad799b175f0330b7785388a1bd60",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16569,
            "upload_time": "2023-12-15T19:49:32",
            "upload_time_iso_8601": "2023-12-15T19:49:32.845020Z",
            "url": "https://files.pythonhosted.org/packages/71/b6/d6ca447009323e4038a4691b97aaf66979df958357797c1e4d0393dc5478/gtfparse_transcript_transformer-2.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-15 19:49:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jdcla",
    "github_project": "gtfparse",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "gtfparse-transcript-transformer"
}
        
Elapsed time: 0.33844s