pypcrtool


Namepypcrtool JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/waziiri/pypcrtool
SummaryA Python package for In silico PCR and primer verification.
upload_time2024-06-12 10:34:26
maintainerNone
docs_urlNone
authorIbrahim Zubairu Waziri, Mustapha Ibrahim Usman, Zainab Ali Dandalma
requires_python>=3.6
licenseMIT
keywords in silico pcr primer specificity gel electrophoresis dna amplification bioinformatics computational biology
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyPCRtool

## 1. Introduction

### 1.1 About PyPCRtool
PyPCRtool is a Python package designed to perform in silico PCR simulations and visualize the results through gel electrophoresis. The program provides functionalities to specify forward and reverse primer sequences, load DNA sequences of genes or genomes from files, set mismatch tolerances, simulate PCR amplification, check primer specificity, and visualize PCR product bands on a simulated gel.

### 1.2 System Requirements
- Python 3.6 or higher
- Required Python libraries: `numpy`, `matplotlib`

### 1.3 Installation Instructions

To install PyPCRtool, use pip:
```bash
pip install pypcrtool
```

## Usage

## 2. Getting Started
### 2.1 Basic Concepts

- In Silico PCR: Computational technique to simulate PCR amplification.
- Primers: Short DNA sequences that initiate DNA synthesis.
- Gel Electrophoresis: Technique to visualize DNA fragments based on size.

### 2.2 Quick Start Guide
- Install PyPCRtool.
- Prepare your DNA sequence file in FASTA format.
- Define your forward and reverse primer sequences.
- Run the PyPCRtool to simulate PCR and visualize results.

##  3. Detailed Usage
### 3.1 Setting Up Primers
Primer sequences should be provided as plain text strings. Define forward and reverse primers in your script:

```python
forward_primer = "TCGAGAGGAACAGCCAAACT" 
reverse_primer = "TTCCTCATGTCCAGGTCCTC"
```
### 3.2 Sequence Files and Formats
DNA sequence file should be in FASTA format and should be in your current working directory or folder:

```python
sequence_file = "sequence.fasta"
```
### 3.3 Running In Silico PCR
Instantiate the PyPCRtool object and run the simulation:

```python
from pypcrtool.pcr import InSilicoPCR
pcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file)
products = pcr_tube.perform_pcr()
```

### 3.4 Printing PCR Products
Display sequence of PCR product on the screen:

```python
pcr_tube.print_products(products)
```

### 3.5 Visualizing Gel Electrophoresis
Generate and display the gel image:

```python
pcr_tube.visualize_gel(products)
```
### 3.6 Saving PCR Products and Gel Image
Save PCR products to a file:

```python
pcr_tube.save_products(products, "pcr_products.fasta")
```
Save Gel image to a file:
```python
pcr_tube.visualize_gel(products, save_path="gel_image.png")
```

### 3.7 Customizing Mismatch Tolerances
Set mismatch tolerances when creating the PyPCRtool object:

```python
pcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file, forward_mismatch_tolerance=1, reverse_mismatch_tolerance=1)
```

### 3.8 Primer Specificity Check
Check if primers bind to unique sites:

```python
pcr_tube.check_primer_specificity()
```

## 4. Practice Examples
### 4.1 Basic PCR Simulation

```python
from pypcrtool.pcr import InSilicoPCR
forward_primer = "TCGAGAGGAACAGCCAAACT"
reverse_primer = "TTCCTCATGTCCAGGTCCTC"
sequence_file = "sequence.fasta"
pcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file)
products = pcr_tube.perform_pcr()
pcr_tube.print_products(products)
pcr_tube.visualize_gel(products)
```

### 4.2 Custom Mismatch Tolerances

```python
from pypcrtool.pcr import InSilicoPCR
forward_primer = "TCGAGAGGAACAGCCAAACT"
reverse_primer = "TTCCTCATGTCCAGGTCCTC"
sequence_file = "sequence.fasta"
pcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file, forward_mismatch_tolerance=1, reverse_mismatch_tolerance=2)
products = pcr_tube.perform_pcr()
pcr_tube.print_products(products)
pcr_tube.visualize_gel(products)
```

### 4.3 Primer Specificity Analysis

```python
from pypcrtool.pcr import InSilicoPCR
forward_primer = "TCGAGAGGAACAGCCAAACT"
reverse_primer = "TTCCTCATGTCCAGGTCCTC"
sequence_file = "sequence.fasta"
pcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file)
pcr_tube.check_primer_specificity()
products = pcr_tube.perform_pcr()
pcr_tube.print_products(products)
pcr_tube.visualize_gel(products)
```

## 5. Troubleshooting
### 5.1 Common Issues and Solutions

- Error: Sequence file not found: Ensure the file path is correct.
- No PCR products found: Check primer sequences and mismatch tolerances.

### 5.2 Frequently Asked Questions (FAQ)

- What formats are supported for DNA sequences? FASTA format is supported.
- Can I set different mismatch tolerances for forward and reverse primers? Yes, they can be set individually


### Authors
- Ibrahim Zubairu Waziri, Department of Microbiology and Biotechnology, Federal University Dutse, Jigawa State, Nigeria.
- Mustapha Ibrahim Usman, Department of Biological Sciences, Nigeria Police Academy Wudil, Kano State, Nigeria
- Zainab Ali Dandalma, Department of Microbiology and Biotechnology, Federal University Dutse, Jigawa State, Nigeria












            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/waziiri/pypcrtool",
    "name": "pypcrtool",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "in silico PCR, primer specificity, gel electrophoresis, DNA amplification, bioinformatics, computational biology",
    "author": "Ibrahim Zubairu Waziri, Mustapha Ibrahim Usman, Zainab Ali Dandalma",
    "author_email": "biotechizwaziri@gmail.com, musteengumel@polac.edu.ng, zainabalidandalma92@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c2/9f/b6d963e1b8d405cc3cd3827bb8d8a2e3fe05c057070d45b1dcf9fe88561b/pypcrtool-1.1.1.tar.gz",
    "platform": null,
    "description": "# PyPCRtool\n\n## 1. Introduction\n\n### 1.1 About PyPCRtool\nPyPCRtool is a Python package designed to perform in silico PCR simulations and visualize the results through gel electrophoresis. The program provides functionalities to specify forward and reverse primer sequences, load DNA sequences of genes or genomes from files, set mismatch tolerances, simulate PCR amplification, check primer specificity, and visualize PCR product bands on a simulated gel.\n\n### 1.2 System Requirements\n- Python 3.6 or higher\n- Required Python libraries: `numpy`, `matplotlib`\n\n### 1.3 Installation Instructions\n\nTo install PyPCRtool, use pip:\n```bash\npip install pypcrtool\n```\n\n## Usage\n\n## 2. Getting Started\n### 2.1 Basic Concepts\n\n- In Silico PCR: Computational technique to simulate PCR amplification.\n- Primers: Short DNA sequences that initiate DNA synthesis.\n- Gel Electrophoresis: Technique to visualize DNA fragments based on size.\n\n### 2.2 Quick Start Guide\n- Install PyPCRtool.\n- Prepare your DNA sequence file in FASTA format.\n- Define your forward and reverse primer sequences.\n- Run the PyPCRtool to simulate PCR and visualize results.\n\n##  3. Detailed Usage\n### 3.1 Setting Up Primers\nPrimer sequences should be provided as plain text strings. Define forward and reverse primers in your script:\n\n```python\nforward_primer = \"TCGAGAGGAACAGCCAAACT\" \nreverse_primer = \"TTCCTCATGTCCAGGTCCTC\"\n```\n### 3.2 Sequence Files and Formats\nDNA sequence file should be in FASTA format and should be in your current working directory or folder:\n\n```python\nsequence_file = \"sequence.fasta\"\n```\n### 3.3 Running In Silico PCR\nInstantiate the PyPCRtool object and run the simulation:\n\n```python\nfrom pypcrtool.pcr import InSilicoPCR\npcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file)\nproducts = pcr_tube.perform_pcr()\n```\n\n### 3.4 Printing PCR Products\nDisplay sequence of PCR product on the screen:\n\n```python\npcr_tube.print_products(products)\n```\n\n### 3.5 Visualizing Gel Electrophoresis\nGenerate and display the gel image:\n\n```python\npcr_tube.visualize_gel(products)\n```\n### 3.6 Saving PCR Products and Gel Image\nSave PCR products to a file:\n\n```python\npcr_tube.save_products(products, \"pcr_products.fasta\")\n```\nSave Gel image to a file:\n```python\npcr_tube.visualize_gel(products, save_path=\"gel_image.png\")\n```\n\n### 3.7 Customizing Mismatch Tolerances\nSet mismatch tolerances when creating the PyPCRtool object:\n\n```python\npcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file, forward_mismatch_tolerance=1, reverse_mismatch_tolerance=1)\n```\n\n### 3.8 Primer Specificity Check\nCheck if primers bind to unique sites:\n\n```python\npcr_tube.check_primer_specificity()\n```\n\n## 4. Practice Examples\n### 4.1 Basic PCR Simulation\n\n```python\nfrom pypcrtool.pcr import InSilicoPCR\nforward_primer = \"TCGAGAGGAACAGCCAAACT\"\nreverse_primer = \"TTCCTCATGTCCAGGTCCTC\"\nsequence_file = \"sequence.fasta\"\npcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file)\nproducts = pcr_tube.perform_pcr()\npcr_tube.print_products(products)\npcr_tube.visualize_gel(products)\n```\n\n### 4.2 Custom Mismatch Tolerances\n\n```python\nfrom pypcrtool.pcr import InSilicoPCR\nforward_primer = \"TCGAGAGGAACAGCCAAACT\"\nreverse_primer = \"TTCCTCATGTCCAGGTCCTC\"\nsequence_file = \"sequence.fasta\"\npcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file, forward_mismatch_tolerance=1, reverse_mismatch_tolerance=2)\nproducts = pcr_tube.perform_pcr()\npcr_tube.print_products(products)\npcr_tube.visualize_gel(products)\n```\n\n### 4.3 Primer Specificity Analysis\n\n```python\nfrom pypcrtool.pcr import InSilicoPCR\nforward_primer = \"TCGAGAGGAACAGCCAAACT\"\nreverse_primer = \"TTCCTCATGTCCAGGTCCTC\"\nsequence_file = \"sequence.fasta\"\npcr_tube = InSilicoPCR(forward_primer, reverse_primer, sequence_file)\npcr_tube.check_primer_specificity()\nproducts = pcr_tube.perform_pcr()\npcr_tube.print_products(products)\npcr_tube.visualize_gel(products)\n```\n\n## 5. Troubleshooting\n### 5.1 Common Issues and Solutions\n\n- Error: Sequence file not found: Ensure the file path is correct.\n- No PCR products found: Check primer sequences and mismatch tolerances.\n\n### 5.2 Frequently Asked Questions (FAQ)\n\n- What formats are supported for DNA sequences? FASTA format is supported.\n- Can I set different mismatch tolerances for forward and reverse primers? Yes, they can be set individually\n\n\n### Authors\n- Ibrahim Zubairu Waziri, Department of Microbiology and Biotechnology, Federal University Dutse, Jigawa State, Nigeria.\n- Mustapha Ibrahim Usman, Department of Biological Sciences, Nigeria Police Academy Wudil, Kano State, Nigeria\n- Zainab Ali Dandalma, Department of Microbiology and Biotechnology, Federal University Dutse, Jigawa State, Nigeria\n\n\n\n\n\n\n\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package for In silico PCR and primer verification.",
    "version": "1.1.1",
    "project_urls": {
        "Homepage": "https://github.com/waziiri/pypcrtool",
        "Source": "https://github.com/waziiri/pypcrtool"
    },
    "split_keywords": [
        "in silico pcr",
        " primer specificity",
        " gel electrophoresis",
        " dna amplification",
        " bioinformatics",
        " computational biology"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e2f127ba7d68457f12daf61649c6f9f6332916b1038d910bf90e65fb023631f",
                "md5": "bb5c5eb7680c41c5dd2ff3d1ee3aaea9",
                "sha256": "685e1cf29ce9f68a14d5107f2879677f5c68466f6fb2f25e2c0e5d36e73f364a"
            },
            "downloads": -1,
            "filename": "pypcrtool-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bb5c5eb7680c41c5dd2ff3d1ee3aaea9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 8837,
            "upload_time": "2024-06-12T10:34:24",
            "upload_time_iso_8601": "2024-06-12T10:34:24.999897Z",
            "url": "https://files.pythonhosted.org/packages/6e/2f/127ba7d68457f12daf61649c6f9f6332916b1038d910bf90e65fb023631f/pypcrtool-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c29fb6d963e1b8d405cc3cd3827bb8d8a2e3fe05c057070d45b1dcf9fe88561b",
                "md5": "e08a13286537d5af5966ec59edde9da6",
                "sha256": "fe80a659d45e57adb57afa86fb7c9c6ed1ec2768a8849d1d748aa9dd8e68d483"
            },
            "downloads": -1,
            "filename": "pypcrtool-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e08a13286537d5af5966ec59edde9da6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8158,
            "upload_time": "2024-06-12T10:34:26",
            "upload_time_iso_8601": "2024-06-12T10:34:26.946190Z",
            "url": "https://files.pythonhosted.org/packages/c2/9f/b6d963e1b8d405cc3cd3827bb8d8a2e3fe05c057070d45b1dcf9fe88561b/pypcrtool-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-12 10:34:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "waziiri",
    "github_project": "pypcrtool",
    "github_not_found": true,
    "lcname": "pypcrtool"
}
        
Elapsed time: 0.53628s