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.
Metadata
Release files for llama-cancer-llamasearch 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_cancer_llamasearch-0.1.0.tar.gz | 34.7 kB | Without provenance | Details for llama_cancer_llamasearch-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_cancer_llamasearch-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llama_cancer_llamasearch-0.1.0-py3-none-any.whl |
Total release size: 63.9 kB
Release files / llama_cancer_llamasearch-0.1.0.tar.gz
| Download URL | llama_cancer_llamasearch-0.1.0.tar.gz |
|---|---|
| Size | 34.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1172c9f6b1ac2da9cbe62cf73915ab1e57a59bb9742ce3d6974dfd6acce1dea
|
|
BLAKE2b-256 checksum How to use checksums |
b8024144158ae65eb9c2be2c9b55c2de06f87ee147c7e545aa74dbb7ced356fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / llama_cancer_llamasearch-0.1.0-py3-none-any.whl
| Download URL | llama_cancer_llamasearch-0.1.0-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d8a66941c821adc998e05515740dd747d46017da6851a0bc6f8f1a5ae08f1e7
|
|
BLAKE2b-256 checksum How to use checksums |
babbc9750002eb3069590610002cc2a0c71bf6d5b320631346b6894fa1112420
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for llama-cancer-llamasearch 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.