| Name | hamming_api JSON |
| Version |
0.1.0
JSON |
| download |
| home_page | https://github.com/kenibrewer/hamming-api |
| Summary | A pyspark deployment of an api for querying a sequence database for sequences within a certain hamming distance of a query |
| upload_time | 2023-10-22 19:06:59 |
| maintainer | |
| docs_url | None |
| author | Ken Brewer |
| requires_python | >=3.9,<3.13 |
| license | |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# hamming-api
[](https://img.shields.io/github/v/release/kenibrewer/hamming-api)
[](https://github.com/kenibrewer/hamming-api/actions/workflows/main.yml?query=branch%3Amain)
[](https://codecov.io/gh/kenibrewer/hamming-api)
[](https://img.shields.io/github/commit-activity/m/kenibrewer/hamming-api)
[](https://img.shields.io/github/license/kenibrewer/hamming-api)
[IN DEVELOPMENT] A pyspark deployment of an api for querying a sequence database for sequences within a certain hamming distance of a query
- **Github repository**: <https://github.com/kenibrewer/hamming-api/>
- **Documentation** <https://kenibrewer.github.io/hamming-api/>
## Purpose
Sequence hamming distance queries have wide applications in bioinformatics.
Some examples include:
- DNA-encoded chemical libraries
- High-throughput screening of protein variants
This project aims to provide a fast, scalable, and easy-to-use API for querying a sequence database for sequences within a certain hamming distance of a query.
## Development
This project includes a VSCode devcontainer for easy development and testing.
The easiest way to launch it is using [codespaces](https://github.com/features/codespaces) with the button below:
[](https://codespaces.new/kenibrewer/hamming-api)
To launch the devcontainer locally , you must have [Docker](https://www.docker.com/) installed and follow the instructions below:
- Clone the repo:
```bash
git clone https://github.com/kenibrewer/hamming-api.git
```
- Open the command palette (Ctrl+Shift+P) and select `Remote-Containers: Reopen in Container`.
- Wait for the devcontainer to build.
- Open a terminal in VSCode (Ctrl+Shift+`).
## Usage
Start the app with:
```bash
hamming-api run --debug
```
For more details on available flags see the documentation.
### Database Upload
When the app is started, it creates an upload endpoint at `http://localhost:8080/`.
Navigate to this endpoint in your browser to upload a database.
The database must be a fasta.gz file under 1 MB in size.
The fasta headers should contain the standard refseq header format, e.g.:
```
>lcl|NC_004828.1_cds_NP_852780.1_1 [gene=Rep] [locus_tag=AavAV865gp1] [db_xref=GeneID:1482924] [protein=rep protein] [protein_id=NP_852780.1] [location=244..2232] [gbkey=CDS]`
```
### Querying
Once the database is uploaded, you can query it at `http://localhost:8080/hamming-matches`.
The query should be a JSON object with the following format:
```json
{
"sequence": "ATCG",
"distance": 1 //Optional, defaults to 1
}
```
An example query using curl:
```bash
curl -X POST http://localhost:8080/hamming-matches \
-H 'Content-Type: application/json' \
-d '{"sequence":"ACGT"}'
```
---
Repository initiated with [fpgmaas/cookiecutter-poetry](https://github.com/fpgmaas/cookiecutter-poetry).
Raw data
{
"_id": null,
"home_page": "https://github.com/kenibrewer/hamming-api",
"name": "hamming_api",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<3.13",
"maintainer_email": "",
"keywords": "",
"author": "Ken Brewer",
"author_email": "fken@kenbrewer.com",
"download_url": "https://files.pythonhosted.org/packages/f6/5e/7153fcb18804c53521d9475bfc6430534545f53e551fd66e4271694e29b1/hamming_api-0.1.0.tar.gz",
"platform": null,
"description": "# hamming-api\n\n[](https://img.shields.io/github/v/release/kenibrewer/hamming-api)\n[](https://github.com/kenibrewer/hamming-api/actions/workflows/main.yml?query=branch%3Amain)\n[](https://codecov.io/gh/kenibrewer/hamming-api)\n[](https://img.shields.io/github/commit-activity/m/kenibrewer/hamming-api)\n[](https://img.shields.io/github/license/kenibrewer/hamming-api)\n\n[IN DEVELOPMENT] A pyspark deployment of an api for querying a sequence database for sequences within a certain hamming distance of a query\n\n- **Github repository**: <https://github.com/kenibrewer/hamming-api/>\n- **Documentation** <https://kenibrewer.github.io/hamming-api/>\n\n## Purpose\n\nSequence hamming distance queries have wide applications in bioinformatics.\nSome examples include:\n\n- DNA-encoded chemical libraries\n- High-throughput screening of protein variants\n\nThis project aims to provide a fast, scalable, and easy-to-use API for querying a sequence database for sequences within a certain hamming distance of a query.\n\n## Development\n\nThis project includes a VSCode devcontainer for easy development and testing.\nThe easiest way to launch it is using [codespaces](https://github.com/features/codespaces) with the button below:\n\n[](https://codespaces.new/kenibrewer/hamming-api)\n\nTo launch the devcontainer locally , you must have [Docker](https://www.docker.com/) installed and follow the instructions below:\n\n- Clone the repo:\n ```bash\n git clone https://github.com/kenibrewer/hamming-api.git\n ```\n- Open the command palette (Ctrl+Shift+P) and select `Remote-Containers: Reopen in Container`.\n- Wait for the devcontainer to build.\n- Open a terminal in VSCode (Ctrl+Shift+`).\n\n## Usage\n\nStart the app with:\n\n```bash\n hamming-api run --debug\n```\n\nFor more details on available flags see the documentation.\n\n### Database Upload\n\nWhen the app is started, it creates an upload endpoint at `http://localhost:8080/`.\nNavigate to this endpoint in your browser to upload a database.\nThe database must be a fasta.gz file under 1 MB in size.\nThe fasta headers should contain the standard refseq header format, e.g.:\n\n```\n>lcl|NC_004828.1_cds_NP_852780.1_1 [gene=Rep] [locus_tag=AavAV865gp1] [db_xref=GeneID:1482924] [protein=rep protein] [protein_id=NP_852780.1] [location=244..2232] [gbkey=CDS]`\n```\n\n### Querying\n\nOnce the database is uploaded, you can query it at `http://localhost:8080/hamming-matches`.\nThe query should be a JSON object with the following format:\n\n```json\n{\n \"sequence\": \"ATCG\",\n \"distance\": 1 //Optional, defaults to 1\n}\n```\n\nAn example query using curl:\n\n```bash\ncurl -X POST http://localhost:8080/hamming-matches \\\n -H 'Content-Type: application/json' \\\n -d '{\"sequence\":\"ACGT\"}'\n```\n\n---\n\nRepository initiated with [fpgmaas/cookiecutter-poetry](https://github.com/fpgmaas/cookiecutter-poetry).\n",
"bugtrack_url": null,
"license": "",
"summary": "A pyspark deployment of an api for querying a sequence database for sequences within a certain hamming distance of a query",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://kenibrewer.github.io/hamming-api/",
"Homepage": "https://github.com/kenibrewer/hamming-api",
"Repository": "https://github.com/kenibrewer/hamming-api"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "87bdc876cef9b79f2cac4509da36ab77a4a66acdabdefad6a82a158796debba3",
"md5": "0ee241f58189f5b6fc13e6703d54b4c9",
"sha256": "0b7460db17771768519c99b2c5139354989f8effd565e5dcb5801b93f5b0634f"
},
"downloads": -1,
"filename": "hamming_api-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0ee241f58189f5b6fc13e6703d54b4c9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<3.13",
"size": 8887,
"upload_time": "2023-10-22T19:06:56",
"upload_time_iso_8601": "2023-10-22T19:06:56.195692Z",
"url": "https://files.pythonhosted.org/packages/87/bd/c876cef9b79f2cac4509da36ab77a4a66acdabdefad6a82a158796debba3/hamming_api-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f65e7153fcb18804c53521d9475bfc6430534545f53e551fd66e4271694e29b1",
"md5": "8db6fa8169696714d979ac8d5e79c96b",
"sha256": "907b9dffa015a84cc3de8bd04ee1f45bc2677a48fd39501ab3119cf56346fb94"
},
"downloads": -1,
"filename": "hamming_api-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "8db6fa8169696714d979ac8d5e79c96b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<3.13",
"size": 8500,
"upload_time": "2023-10-22T19:06:59",
"upload_time_iso_8601": "2023-10-22T19:06:59.104413Z",
"url": "https://files.pythonhosted.org/packages/f6/5e/7153fcb18804c53521d9475bfc6430534545f53e551fd66e4271694e29b1/hamming_api-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-22 19:06:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kenibrewer",
"github_project": "hamming-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "hamming_api"
}