fasta-reader


Namefasta-reader JSON
Version 3.0.2 PyPI version JSON
download
home_pagehttps://github.com/EBI-Metagenomics/fasta-reader
SummaryFASTA file reader/writer.
upload_time2023-07-07 23:23:05
maintainer
docs_urlNone
authorDanilo Horta
requires_python>=3.9,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Welcome to fasta-reader 👋

> Read and write FASTA file

### 🏠 [Homepage](https://github.com/EBI-Metagenomics/fasta-reader-py)

## ⚡️ Requirements

- Python >= 3.9

## Install

```sh
pip install fasta-reader
```

## Examples

The following example show that it can read a compressed file remotely seamlessly:

```python
from fasta_reader import read_fasta

ROOT = "https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/858/895"
REF = "GCF_009858895.2_ASM985889v3"
FILE = f"{ROOT}/{REF}/{REF}_genomic.fna.gz"

for item in read_fasta(FILE):
    print(item)
```

We can also write a FASTA file in a compressed format directly:

```python
from fasta_reader import write_fasta

with write_fasta("protein.faa.gz") as file:
    file.write_item("P01013 GENE X PROTEIN", "QIKDLLVSSSTDLDT...")
```

## 👤 Author

- [Danilo Horta](https://github.com/horta)

## Show your support

Give a ⭐️ if this project helped you!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/EBI-Metagenomics/fasta-reader",
    "name": "fasta-reader",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Danilo Horta",
    "author_email": "fdanilo.horta@pm.me",
    "download_url": "https://files.pythonhosted.org/packages/7a/02/cfc5e470938b59e4c842664ad49733d438cee5ac9f229e45a529c51524c3/fasta_reader-3.0.2.tar.gz",
    "platform": null,
    "description": "# Welcome to fasta-reader \ud83d\udc4b\n\n> Read and write FASTA file\n\n### \ud83c\udfe0 [Homepage](https://github.com/EBI-Metagenomics/fasta-reader-py)\n\n## \u26a1\ufe0f Requirements\n\n- Python >= 3.9\n\n## Install\n\n```sh\npip install fasta-reader\n```\n\n## Examples\n\nThe following example show that it can read a compressed file remotely seamlessly:\n\n```python\nfrom fasta_reader import read_fasta\n\nROOT = \"https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/858/895\"\nREF = \"GCF_009858895.2_ASM985889v3\"\nFILE = f\"{ROOT}/{REF}/{REF}_genomic.fna.gz\"\n\nfor item in read_fasta(FILE):\n    print(item)\n```\n\nWe can also write a FASTA file in a compressed format directly:\n\n```python\nfrom fasta_reader import write_fasta\n\nwith write_fasta(\"protein.faa.gz\") as file:\n    file.write_item(\"P01013 GENE X PROTEIN\", \"QIKDLLVSSSTDLDT...\")\n```\n\n## \ud83d\udc64 Author\n\n- [Danilo Horta](https://github.com/horta)\n\n## Show your support\n\nGive a \u2b50\ufe0f if this project helped you!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "FASTA file reader/writer.",
    "version": "3.0.2",
    "project_urls": {
        "Homepage": "https://github.com/EBI-Metagenomics/fasta-reader",
        "Repository": "https://github.com/EBI-Metagenomics/fasta-reader"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "012420c5113dc8da4e666f1623143955e59e5e76b309e5b6a5a6c8a1b04969c5",
                "md5": "5d14c13cd4f57e03c007439ec3f069dc",
                "sha256": "31514e8f263416bc28fd87a4d637974629bd2c9e796f27f9647a7d4248e916cc"
            },
            "downloads": -1,
            "filename": "fasta_reader-3.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5d14c13cd4f57e03c007439ec3f069dc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 6762,
            "upload_time": "2023-07-07T23:23:04",
            "upload_time_iso_8601": "2023-07-07T23:23:04.204307Z",
            "url": "https://files.pythonhosted.org/packages/01/24/20c5113dc8da4e666f1623143955e59e5e76b309e5b6a5a6c8a1b04969c5/fasta_reader-3.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a02cfc5e470938b59e4c842664ad49733d438cee5ac9f229e45a529c51524c3",
                "md5": "83b455a9f0dc589be73ccb17ed9332b8",
                "sha256": "71493559a791f355def4918612a3bbd44992f7e1227a61a7d815018aefde4d79"
            },
            "downloads": -1,
            "filename": "fasta_reader-3.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "83b455a9f0dc589be73ccb17ed9332b8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 4504,
            "upload_time": "2023-07-07T23:23:05",
            "upload_time_iso_8601": "2023-07-07T23:23:05.816115Z",
            "url": "https://files.pythonhosted.org/packages/7a/02/cfc5e470938b59e4c842664ad49733d438cee5ac9f229e45a529c51524c3/fasta_reader-3.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-07 23:23:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "EBI-Metagenomics",
    "github_project": "fasta-reader",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fasta-reader"
}
        
Elapsed time: 0.08685s