Skip to main content

Evolutionary Conservation of Amino Acids and Codons

Project description

Conservation

PyPI version

Conservation is a Python package for evolutionary conservation analysis at the codon and amino acid level. It supports comparative analysis using Pfam domain sequences and CDS datasets across multiple species.

๐Ÿ”ง Features

  • Codon substitution matrix computation
  • Fisher's exact test for conservation significance
  • Automated visualization of alignment and substitution matrices
  • Supports BLOSUM62 alignment, multi-threading, and multiple species

๐Ÿ“ฆ Installation

You can install the package from PyPI:

pip install conservation

Or from Bioconda:

conda install -c bioconda conservation

Or install from source:

git clone https://github.com/hanjunlee21/conservation.git
cd conservation
pip install .

๐Ÿš€ Usage

conservation codon \
  --domain domain.fasta \
  --cds species1.fasta,species2.fasta \
  --output results_dir \
  --threads 4

Command-line Arguments

  • --domain, -d: Pfam or domain FASTA file
  • --cds, -c: Comma-separated list of CDS FASTA files (one per species)
  • --output, -o: Output directory
  • --threads, -t: Number of parallel threads
  • --fdr, -q: FDR cutoff (optional)
  • --conservedness, -s: Identity ratio threshold (optional)
  • --dpi, -r: DPI for PDF plots

๐Ÿ“Š Outputs

  • Codon substitution matrix .tsv
  • Statistical analysis .statistics.tsv
  • PDF visualizations of alignments and substitution matrices

๐Ÿงฌ Example

Example command for 3 species:

conservation codon \
  -d pfam_domain.fasta \
  -c human.fasta,mouse.fasta,yeast.fasta \
  -o conservation_output

๐Ÿ“ Project Structure

conservation/
โ”œโ”€โ”€ conservation/
โ”œโ”€โ”€ โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ โ””โ”€โ”€ N34_modifications.tsv
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ commands.py
โ”‚   โ”œโ”€โ”€ conservation_codon.py
โ”‚   โ””โ”€โ”€ version.py
โ”œโ”€โ”€ bin/
โ”‚   โ””โ”€โ”€ conservation
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ ...

๐Ÿ“œ License

MIT License

๐Ÿ‘ค Author

Hanjun Lee
hanjun_lee@hms.harvard.edu

Project URL: https://github.com/hanjunlee21/conservation

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

conservation-1.0.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

conservation-1.0.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file conservation-1.0.1.tar.gz.

File metadata

  • Download URL: conservation-1.0.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.28.2 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.67.1 CPython/3.8.10

File hashes

Hashes for conservation-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fffe0f487c0343853783c67b79e3e9dba30247d4f5d4645698a82567b0f3d9b9
MD5 74bf83fe3bba4c6f5dba732c4ae28b8f
BLAKE2b-256 9c66fc71b492609f9a432b3fe2ae9bd7ea7026649c70aa683b2e9864d1109719

See more details on using hashes here.

File details

Details for the file conservation-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: conservation-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.28.2 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.67.1 CPython/3.8.10

File hashes

Hashes for conservation-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50578a8a287873d5562af2c4dc2ddacb555390ab37b79829b53cd4028f466bf7
MD5 f4783257fda46174b9c643b4f7d6e138
BLAKE2b-256 5fa4896e0689e4b7d76c6fa8eafa383d53a3b87c37d2ff75c6f0169fbaf7b519

See more details on using hashes here.

Supported by

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