Skip to main content

Genomic data analysis utilities from Zavolan Lab

Project description

zavolab_pyutils

Genomic data analysis utilities from the Zavolan Lab. A collection of Python utilities for common bioinformatics tasks including library size normalization, annotation conversion, and other genomic data analysis operations.

Features

  • Library Size Normalization: Deseq2-like normalization
  • Annotation Conversion: Convert between GTF and GFF3 formats
  • Genomic Data Processing: Utilities for working with genomic annotation files

Installation

From source

git clone https://github.com/zavolab/zavolab_pyutils.git
cd zavolab_pyutils
pip install -e .

With conda environment

Create a conda environment from the provided environment.yml file:

conda env create -f environment.yml
conda activate zavolab_pyutils

The environment automatically installs the package and all dependencies including ipykernel for Jupyter notebook support.

From PyPI (TO DO)

pip install zavolab_pyutils

From bioconda (TO DO)

conda install -c bioconda zavolab_pyutils

Quick Start

Library Size Normalization

import pandas as pd
from zavolab_pyutils.read_count_data_analysis import deseq2_normalize

# Create sample count matrix (genes × samples) as a DataFrame
data = {
    "Sample_1": [100, 50, 200],
    "Sample_2": [200, 100, 400],
    "Sample_3": [150, 80, 300],
}
counts_df = pd.DataFrame(data, index=["Gene_1", "Gene_2", "Gene_3"])

# Normalize using DESeq2 method
norm_counts_df, size_factors_df = deseq2_normalize(
    counts_df, 
    sample_list=["Sample_1", "Sample_2", "Sample_3"]
)

print(norm_counts_df)
print(size_factors_df)

Documentation and examples of usage

For detailed documentation, see the docs directory. TO DO

For a working example, see test_module.ipynb which demonstrates the deseq2_normalize function with sample data.

Testing TO DO

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

Please ensure all tests pass and add new tests for new functionality.

Citation

If you use zavolab_pyutils in your research, please cite:

TODO: Add citation information

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues, questions, or suggestions, please open an issue on GitHub.

Acknowledgments

Developed by the Zavolan Lab at the University of Basel.

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

zavolab_pyutils-0.1.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

zavolab_pyutils-0.1.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zavolab_pyutils-0.1.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for zavolab_pyutils-0.1.2.tar.gz
Algorithm Hash digest
SHA256 081aec6cf8fe27d6be81f1e959867414998773c7eb0c380851140aa0a93c5103
MD5 39a717bb072a3390891b8cdb7b3ba134
BLAKE2b-256 66ceeac0933b6735b17f70600d6131242c2b597d0a98ccdece2ae3b5cc0fd12e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zavolab_pyutils-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7e4157a2f82ff3fb480b1af79371057c98b55e82e48ed8ab2a316c2cad3c159
MD5 c7e003b030932e3913933f4afe40c971
BLAKE2b-256 ec572fcaa2fbeba03efd484de9e58ffb5c9ddc89cc1910a77406b12e3d5a61ac

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