Tools and models for cancer research using LlamaAI components.
Project description
LlamaCancer
LlamaCancer is a comprehensive Python framework for analyzing biomarker associations in oncology clinical trials. It provides a streamlined workflow for biomarker analysis, including data loading, processing, statistical analysis, and visualization.
Features
- Flexible data loading: Support for various data formats and structures
- Automated biomarker dichotomization: Convert continuous biomarkers to categorical (high/low) groups using multiple methods
- Comprehensive statistical analysis: Log-rank tests, Cox proportional hazards models, Fisher's exact tests, and more
- Publication-quality visualizations: Kaplan-Meier plots, forest plots, volcano plots, and more
- Configuration-based workflow: Define analysis parameters in reusable configuration files
- Extensive documentation: Comprehensive user guide, API reference, and tutorials
Installation
# Install from PyPI
pip install llamacancer
# Install from source
git clone https://github.com/llamagroup/llamacancer.git
cd llamacancer
pip install -e .
Quick Start
import llamacancer as lc
from llamacancer.config import load_config
from llamacancer.io import load_clinical_data, load_biomarker_data, merge_clinical_biomarkers
from llamacancer.analysis import run_biomarker_associations
# Load configuration
config = load_config("configs/default_analysis_config.py")
# Load and merge data
clinical_df = load_clinical_data(config)
biomarker_df = load_biomarker_data(config)
merged_df = merge_clinical_biomarkers(clinical_df, biomarker_df)
# Run biomarker association analysis
results = run_biomarker_associations(merged_df, config)
# Display significant biomarkers
print(f"Significant biomarkers: {results['summary']['significant_biomarkers']}")
Example Workflow
-
Define your configuration:
# configs/my_analysis_config.py from ml_collections import config_dict def get_config(): config = config_dict.ConfigDict() config.project_name = "My Biomarker Analysis" config.data_dir = "data/" config.biomarkers_to_analyze = ["B_cell_GES", "CD19_Expression_Level"] # ... more configuration options return config
-
Prepare your data:
- Clinical data CSV with patient identifiers, treatment arms, endpoints
- Biomarker data CSV with patient identifiers and biomarker measurements
-
Run the analysis from command line:
llamacancer --config configs/my_analysis_config.py
-
Or run interactively in a notebook:
jupyter notebook notebooks/1_biomarker_association_workflow.ipynb
Documentation
For detailed documentation, visit our [Documentation Site](https://llamasearch.ai or check the docs/ directory.
- User Guide: Instructions for installation, configuration, and usage
- API Reference: Detailed documentation of modules, classes, and functions
- Examples: Jupyter notebooks demonstrating LlamaCancer workflows
- Tutorials: Step-by-step tutorials for common tasks
Example Results
Kaplan-Meier plot showing event-free survival stratified by B-cell gene expression signature.
Forest plot showing hazard ratios for multiple biomarkers.
Citation
If you use LlamaCancer in your research, please cite:
LlamaGroup. (2023). LlamaCancer: A framework for biomarker association analysis in oncology clinical trials.
GitHub repository: https://github.com/llamagroup/llamacancer
License
LlamaCancer is released under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_cancer_llamasearch-0.1.0.tar.gz.
File metadata
- Download URL: llama_cancer_llamasearch-0.1.0.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1172c9f6b1ac2da9cbe62cf73915ab1e57a59bb9742ce3d6974dfd6acce1dea
|
|
| MD5 |
0bb4af97caacdacccd72012f5af8dbda
|
|
| BLAKE2b-256 |
b8024144158ae65eb9c2be2c9b55c2de06f87ee147c7e545aa74dbb7ced356fe
|
File details
Details for the file llama_cancer_llamasearch-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llama_cancer_llamasearch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d8a66941c821adc998e05515740dd747d46017da6851a0bc6f8f1a5ae08f1e7
|
|
| MD5 |
55d1116805724299ec221270007cd28c
|
|
| BLAKE2b-256 |
babbc9750002eb3069590610002cc2a0c71bf6d5b320631346b6894fa1112420
|