Metadata-Version: 2.1
Name: peptacular
Version: 0.2.0
Summary: Utility package for handling peptide and protein sequences
Author-email: Patrick Garrett <pgarrett@scripps.edu>
License: MIT License
        
        Copyright (c) 2023 Patrick Garrett
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: repository, https://github.com/pgarrett-scripps/peptacular.git
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# Peptacular

Peptacular is a Python library for simulating the enzymatic digestion of protein 
sequences. It allows users to define custom enzymes and cleavage rules using 
regular expressions and to generate peptide products with varying levels of 
missed cleavages. The library also supports semi-enzymatic and non-enzymatic digestion.

## Features
- Custom enzyme definition using regular expressions
- Control over the number of missed cleavages
- Supports semi-enzymatic and non-enzymatic digestion
- Filters peptides based on minimum and maximum length
- Converts peptide results to a pandas DataFrame for easy analysis

- ## Installation
To install Peptacular, run:

```bash
pip install peptacular
```

## Usage
Here is a basic example of using Peptacular to digest a protein sequence with a custom enzyme:

```python
from peptacular.protein import digest_protein, peptides_to_df

protein_sequence = 'PEPKTIDEPERPTIDE'

enzyme_regexes = (
    [('([KR])([^P])', 1)],

    [])

missed_cleavages = 1
min_len = 3
max_len = 20
non_enzymatic = False
semi_enzymatic = False

peptides = digest_protein(
    protein_sequence,
    enzyme_regexes,
    missed_cleavages,
    min_len,
    max_len,
    non_enzymatic,
    semi_enzymatic
)

peptide_df = peptides_to_df(peptides)
print(peptide_df)
```
