Conservation
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
Metadata
Release files for conservation 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| conservation-1.0.1.tar.gz | 11.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| conservation-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.4 kB
Release files / conservation-1.0.1.tar.gz
| Download URL | conservation-1.0.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fffe0f487c0343853783c67b79e3e9dba30247d4f5d4645698a82567b0f3d9b9
|
|
BLAKE2b-256 checksum How to use checksums |
9c66fc71b492609f9a432b3fe2ae9bd7ea7026649c70aa683b2e9864d1109719
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / conservation-1.0.1-py3-none-any.whl
| Download URL | conservation-1.0.1-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50578a8a287873d5562af2c4dc2ddacb555390ab37b79829b53cd4028f466bf7
|
|
BLAKE2b-256 checksum How to use checksums |
5fa4896e0689e4b7d76c6fa8eafa383d53a3b87c37d2ff75c6f0169fbaf7b519
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|