Skip to main content

A Python toolkit for fetching and analyzing protein sequences.

Project description

ProteinPy

A Python toolkit for fetching and analyzing protein sequences.

Features

  • Sequence Retrieval
    Retrieve protein sequences directly from the UniProt Knowledgebase via accession IDs.

  • Biochemical Property Analysis
    Calculate key biochemical properties such as:

    • Molecular weight
    • Isoelectric point (pI)
    • GRAVY (Grand Average of Hydropathicity)
    • Aromaticity
    • Aliphatic index
  • Sequence Manipulation

    • Extract sub-sequences and generate sliding k-mers
    • Perform amino acid mutations (single or batch)
    • Identify sequence motifs using custom regular expressions
  • Data Export
    Export sequences in FASTA format and analytical results in JSON or CSV.

  • Visualization
    Create amino acid composition and distribution plots using Matplotlib.

  • Reporting
    Generate clear, user-friendly summary reports for quick interpretation.


Installation

pip install proteinpy

Example Usage

from proteinpy import Protein

# Initialize a protein object with a UniProt accession
p = Protein("P69905")  # Hemoglobin alpha subunit

# Fetch and print summary statistics
p.summary()

# Get amino acid counts and visualize them
p.aa_counts()
p.aa_distribution()

# Simulate a mutation at position 42
mutated_seq = p.mutate(42, "K")

# Find a motif using regex
positions = p.find_motif("N[^P][ST][^P]")

# Export as JSON or CSV
p.to_json()
p.to_csv("P69905.csv")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proteinpy-0.1.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

proteinpy-0.1.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file proteinpy-0.1.2.tar.gz.

File metadata

  • Download URL: proteinpy-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for proteinpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 729b485cdcdfea22e439412bf326c51b6560608b6e422161117450376c7a93e2
MD5 51a20ef6f8db99b22f524178a016e780
BLAKE2b-256 121efaebcd220021f19275e31a39ffe7a4751ffa519051662d53761512bb460c

See more details on using hashes here.

File details

Details for the file proteinpy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: proteinpy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for proteinpy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06aa2eac9ca94e4772a0cbdda496eea3d0ed6d3bf4239a50e73f0d77610467e4
MD5 9b8d048fa9d011f7a1bb90f7f7c76ac3
BLAKE2b-256 1f864f653ee9d9a233c2f4dc010684c0d3f3aeb8666ddf3778a14577329e48bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page