# pLannotate-python
[](https://www.gnu.org/licenses/gpl-3.0)

[](https://doi.org/10.1093/nar/gkab374)
<img width="400" alt="pLannotate_logo" src="plannotate/data/images/pLannotate.png">
**Automated annotation of engineered plasmids**
`pLannotate-python` is a Python package for automatically annotating engineered plasmids using sequence similarity searches against curated databases. Fast, parallel processing with automatic database setup.
## Features
- **Fast, parallel annotation**: Uses Diamond, BLAST, and Infernal concurrently
- **Multiple databases**: Protein (fpbase, swissprot), nucleotide (snapgene), RNA (Rfam)
- **Circular plasmid support**: Handles origin-crossing features
- **Automatic database setup**: Downloads and configures databases (~900MB)
- **Flexible output**: GenBank files, CSV reports, or pandas DataFrames
## Installation
```bash
# Install with uv (recommended)
uv add plannotate-python
# Or with pip
pip install plannotate-python
```
### External Tools Required
```bash
# macOS (Homebrew)
brew install diamond blast infernal ripgrep
# Linux (conda/mamba)
conda install -c bioconda diamond blast infernal ripgrep
# Ubuntu/Debian
sudo apt install diamond-aligner ncbi-blast+ infernal ripgrep
```
### SSL Certificate Fix (macOS)
If you encounter SSL certificate errors during database download:
```bash
# Replace X.Y with your Python version (e.g., 3.11)
open "/Applications/Python X.Y/Install Certificates.command"
```
## Quick Start
**Automatic Database Setup:**
```python
import os
os.environ["PLANNOTATE_AUTO_DOWNLOAD"] = "1" # Enable auto-download
from plannotate.annotate import annotate
# First run will download databases (~900MB with progress bars)
sequence = "ATGGTGAGCAAGGGCGAGGAGCTG" # Your plasmid sequence
result = annotate(sequence, linear=False) # False for circular plasmids
print(f"Found {len(result)} annotations")
print(result[['Feature', 'Type', 'qstart', 'qend', 'pident']].head())
```
**Manual Database Setup:**
```python
from plannotate.resources import download_db
download_db() # Downloads with progress bars and SSL error handling
```
**Generate GenBank Files:**
```python
from plannotate.resources import get_gbk
gbk_content = get_gbk(result, sequence, is_linear=False)
with open("my_plasmid.gbk", "w") as f:
f.write(gbk_content)
```
## Configuration
**Environment Variables:**
- `PLANNOTATE_AUTO_DOWNLOAD=1` - Auto-download databases without prompting
- `PLANNOTATE_DB_DIR=/path` - Custom database directory
- `PLANNOTATE_SKIP_DB_DOWNLOAD=1` - Skip database downloads entirely
**Core Functions:**
- `annotate(sequence, linear=False)` - Annotate DNA sequence
- `get_gbk(annotations, sequence)` - Generate GenBank file
- `download_db()` - Download databases with progress bars
## Troubleshooting
**SSL Certificate Errors:** Run the SSL certificate fix command above
**Empty Results:** Sequence may not match database features
**Tool Errors:** Ensure external tools are installed and in PATH
## Citation
If you use `pLannotate-python` in your research, please cite the original pLannotate paper:
> McGuffin, M.J., Thiel, M.C., Pineda, D.L. et al. pLannotate: automated annotation of engineered plasmids. *Nucleic Acids Research* (2021).
## License
This project is licensed under the GPL v3 License - see the `LICENSE` file for details.
## Links
- **Original pLannotate**: https://github.com/mmcguffi/pLannotate
- **Web server**: http://plannotate.barricklab.org/
- **This Fork**: https://github.com/McClain-Thiel/pLannotate
- **Issues**: https://github.com/McClain-Thiel/pLannotate/issues
Raw data
{
"_id": null,
"home_page": null,
"name": "plannotate-python",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "annotation, bioinformatics, molecular-biology, plasmid, sequence-analysis",
"author": null,
"author_email": "McClain Thiel <mcclain.thiel@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/4c/9c/5d4416b64f2f46312c77baa1564054c4e621e7b7dcbad2f04fff6eaf0266/plannotate_python-1.2.7.tar.gz",
"platform": null,
"description": "# pLannotate-python\n\n[](https://www.gnu.org/licenses/gpl-3.0)\n\n[](https://doi.org/10.1093/nar/gkab374)\n\n<img width=\"400\" alt=\"pLannotate_logo\" src=\"plannotate/data/images/pLannotate.png\">\n\n**Automated annotation of engineered plasmids**\n\n`pLannotate-python` is a Python package for automatically annotating engineered plasmids using sequence similarity searches against curated databases. Fast, parallel processing with automatic database setup.\n\n## Features\n\n- **Fast, parallel annotation**: Uses Diamond, BLAST, and Infernal concurrently\n- **Multiple databases**: Protein (fpbase, swissprot), nucleotide (snapgene), RNA (Rfam)\n- **Circular plasmid support**: Handles origin-crossing features\n- **Automatic database setup**: Downloads and configures databases (~900MB)\n- **Flexible output**: GenBank files, CSV reports, or pandas DataFrames\n\n## Installation\n\n```bash\n# Install with uv (recommended)\nuv add plannotate-python\n\n# Or with pip\npip install plannotate-python\n```\n\n### External Tools Required\n\n```bash\n# macOS (Homebrew)\nbrew install diamond blast infernal ripgrep\n\n# Linux (conda/mamba)\nconda install -c bioconda diamond blast infernal ripgrep\n\n# Ubuntu/Debian\nsudo apt install diamond-aligner ncbi-blast+ infernal ripgrep\n```\n\n### SSL Certificate Fix (macOS)\nIf you encounter SSL certificate errors during database download:\n```bash\n# Replace X.Y with your Python version (e.g., 3.11)\nopen \"/Applications/Python X.Y/Install Certificates.command\"\n```\n\n## Quick Start\n\n**Automatic Database Setup:**\n```python\nimport os\nos.environ[\"PLANNOTATE_AUTO_DOWNLOAD\"] = \"1\" # Enable auto-download\nfrom plannotate.annotate import annotate\n\n# First run will download databases (~900MB with progress bars)\nsequence = \"ATGGTGAGCAAGGGCGAGGAGCTG\" # Your plasmid sequence\nresult = annotate(sequence, linear=False) # False for circular plasmids\n\nprint(f\"Found {len(result)} annotations\")\nprint(result[['Feature', 'Type', 'qstart', 'qend', 'pident']].head())\n```\n\n**Manual Database Setup:**\n```python\nfrom plannotate.resources import download_db\ndownload_db() # Downloads with progress bars and SSL error handling\n```\n\n**Generate GenBank Files:**\n```python\nfrom plannotate.resources import get_gbk\ngbk_content = get_gbk(result, sequence, is_linear=False)\nwith open(\"my_plasmid.gbk\", \"w\") as f:\n f.write(gbk_content)\n```\n\n## Configuration\n\n**Environment Variables:**\n- `PLANNOTATE_AUTO_DOWNLOAD=1` - Auto-download databases without prompting\n- `PLANNOTATE_DB_DIR=/path` - Custom database directory\n- `PLANNOTATE_SKIP_DB_DOWNLOAD=1` - Skip database downloads entirely\n\n**Core Functions:**\n- `annotate(sequence, linear=False)` - Annotate DNA sequence\n- `get_gbk(annotations, sequence)` - Generate GenBank file\n- `download_db()` - Download databases with progress bars\n\n## Troubleshooting\n\n**SSL Certificate Errors:** Run the SSL certificate fix command above\n**Empty Results:** Sequence may not match database features \n**Tool Errors:** Ensure external tools are installed and in PATH\n\n## Citation\n\nIf you use `pLannotate-python` in your research, please cite the original pLannotate paper:\n\n> McGuffin, M.J., Thiel, M.C., Pineda, D.L. et al. pLannotate: automated annotation of engineered plasmids. *Nucleic Acids Research* (2021).\n\n## License\n\nThis project is licensed under the GPL v3 License - see the `LICENSE` file for details.\n\n## Links\n\n- **Original pLannotate**: https://github.com/mmcguffi/pLannotate\n- **Web server**: http://plannotate.barricklab.org/\n- **This Fork**: https://github.com/McClain-Thiel/pLannotate\n- **Issues**: https://github.com/McClain-Thiel/pLannotate/issues",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Automated annotation of engineered plasmids using sequence similarity searches",
"version": "1.2.7",
"project_urls": {
"Bug Tracker": "https://github.com/McClain-Thiel/pLannotate/issues",
"Documentation": "https://github.com/McClain-Thiel/pLannotate#readme",
"Homepage": "https://github.com/McClain-Thiel/pLannotate",
"Original Project": "https://github.com/mmcguffi/pLannotate",
"Repository": "https://github.com/McClain-Thiel/pLannotate"
},
"split_keywords": [
"annotation",
" bioinformatics",
" molecular-biology",
" plasmid",
" sequence-analysis"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "12c7f8596efb14d4fed1ccd3323d7117112da1f5b6de9b1912b9416b4da49e23",
"md5": "0d8ae91d8b5c7326ef3854c321ab1e60",
"sha256": "280a971080738606cdf60afdf6d6432d554471ab1be68e6aa4cc4b9dfedd743d"
},
"downloads": -1,
"filename": "plannotate_python-1.2.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0d8ae91d8b5c7326ef3854c321ab1e60",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 27227426,
"upload_time": "2025-09-06T14:37:56",
"upload_time_iso_8601": "2025-09-06T14:37:56.082645Z",
"url": "https://files.pythonhosted.org/packages/12/c7/f8596efb14d4fed1ccd3323d7117112da1f5b6de9b1912b9416b4da49e23/plannotate_python-1.2.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4c9c5d4416b64f2f46312c77baa1564054c4e621e7b7dcbad2f04fff6eaf0266",
"md5": "6dfd5c31a8e982b44f7f4d793d162d60",
"sha256": "bec1c1c249b08e1a964d64b07dcc6fb012c05fd3e61b11ab113824f116033503"
},
"downloads": -1,
"filename": "plannotate_python-1.2.7.tar.gz",
"has_sig": false,
"md5_digest": "6dfd5c31a8e982b44f7f4d793d162d60",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 27300953,
"upload_time": "2025-09-06T14:38:11",
"upload_time_iso_8601": "2025-09-06T14:38:11.112736Z",
"url": "https://files.pythonhosted.org/packages/4c/9c/5d4416b64f2f46312c77baa1564054c4e621e7b7dcbad2f04fff6eaf0266/plannotate_python-1.2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-06 14:38:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "McClain-Thiel",
"github_project": "pLannotate",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "plannotate-python"
}