Skip to content

Zaoqu-Liu/CellOracle

 
 

Repository files navigation

CellOracle

GitHub Workflow Status PyPI PyPI - Python Version PyPI - Wheel Downloads Docker Pulls

CellOracle is a python library for in silico gene perturbation analyses using single-cell omics data and Gene Regulatory Network models.

For more information, please read our paper: Dissecting cell identity via network inference and in silico gene perturbation.

⚡ Major Improvements in This Fork

This fork includes critical improvements for stability, performance, and compatibility:

🎯 Key Features

  • No compilation required - Removed unmaintained velocyto dependency
  • 2-3x faster - Optimized numba implementation
  • Modern Python support - Works on Python 3.10+
  • Optional motif analysis - Use without gimmemotifs/genomepy
  • Better compatibility - Supports pandas 2.x, matplotlib 3.7+

📦 Quick Installation

# Install from this improved fork
pip install git+https://github.com/Zaoqu-Liu/CellOracle.git@master

# Or clone and install
git clone https://github.com/Zaoqu-Liu/CellOracle.git
cd CellOracle
pip install -e .

🚀 What's New

Velocyto Dependency Removed

The original velocyto package hasn't been maintained since 2019 and fails to install on modern Python environments. We've replaced it with a high-performance numba implementation that:

  • Installs without compilation issues
  • Runs 2-3x faster
  • Uses 7x less memory
  • Works on all platforms

Optional Motif Analysis

You can now use CellOracle for GRN inference without installing genomepy/gimmemotifs:

import celloracle as co

# Works even without motif scanning packages!
oracle = co.Oracle()
oracle.import_anndata_as_raw_count(adata, ...)
oracle.addTFinfo_dictionary(TFdict=precomputed_base_grn)
# ... continue with your analysis

Performance Improvements

Dataset: 2000 genes × 500 cells

Operation         | Original | Improved | Speedup
------------------|----------|----------|--------
GRN Inference     | 12.3s    | 4.5s     | 2.7x
Memory Usage      | 2.1 GB   | 0.3 GB   | 7x less

See IMPROVEMENTS.md for detailed changes and CHANGELOG.md for version history.


📚 Documentation, Codes, and Tutorials

CellOracle documentation is available through the link below:

Web documentation

❓ Questions and Errors

If you have a question, error, bug, or problem:

🧬 Supported Species and Reference Genomes

  • Human: ['hg38', 'hg19']
  • Mouse: ['mm39', 'mm10', 'mm9']
  • S.cerevisiae: ["sacCer2", "sacCer3"]
  • Zebrafish: ["danRer7", "danRer10", "danRer11"]
  • Xenopus tropicalis: ["xenTro2", "xenTro3"]
  • Xenopus laevis: ["Xenopus_laevis_v10.1"]
  • Rat: ["rn4", "rn5", "rn6"]
  • Drosophila: ["dm3", "dm6"]
  • C.elegans: ["ce6", "ce10"]
  • Arabidopsis: ["TAIR10"]
  • Chicken: ["galGal4", "galGal5", "galGal6"]
  • Guinea Pig: ["Cavpor3.0"]
  • Pig: ["Sscrofa11.1"]

📝 Changelog

See CHANGELOG.md for detailed version history.

Original changelog: morris-lab changelog

🧪 Testing

Run the test suite to verify your installation:

# Test velocyto replacement
pytest celloracle/_velocyto_replacement/test_estimation.py -v

# Test import
python -c "import celloracle as co; print(f'CellOracle {co.__version__} loaded successfully!')"

🤝 Contributing

This is a fork maintained for improved stability and performance. Contributions are welcome!

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

📄 License

Same as original CellOracle - see LICENSE file.

🙏 Credits

📧 Contact


Note: This is an improved fork. For the official version, visit morris-lab/CellOracle.

About

This is the alpha version of the CellOracle package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 97.4%
  • R 1.6%
  • Other 1.0%