crabML

User Guide

  • Installation
    • Requirements
    • Install crabML
    • Alternative Installation
    • Verify Installation
    • Development Installation
    • Troubleshooting
  • Quick Start Guide
    • Command-Line Interface
    • Python Library
      • Your First Analysis
    • Testing for Positive Selection
      • Individual Tests
    • Working with Different Model Types
      • Site-Class Models
      • Branch Models
      • Branch-Site Models
    • File Formats
    • Exporting Results
    • What’s Next?
  • Command-Line Interface
    • Overview
    • Getting Help
    • crabml site-model
      • Basic Usage
      • Output Formats
      • Options
      • Example Output (Text Format)
      • Example Output (JSON Format)
    • crabml fit
      • Basic Usage
      • Supported Models
      • Options
      • Example Output
    • crabml branch-model
      • Basic Usage
      • Supported Tests
      • Options
      • Tree Format with Branch Labels
      • Example Output
    • crabml branch-site
      • Basic Usage
      • Tree Format with Branch Labels
      • Options
    • crabml simulate
      • Basic Usage
      • Available Models
      • Common Options
      • Multiple Replicates
      • Outputs
    • Integration with Pipelines
      • JSON Output for Parsing
      • TSV Output for Spreadsheets
      • Exit Codes
      • Batch Processing
    • Tips and Best Practices
  • Model Guide
    • Model Categories
    • Site-Class Models
      • M0: One-Ratio Model
      • M1a: Nearly Neutral
      • M2a: Positive Selection
      • M3: Discrete Model
      • M7: Beta Distribution
      • M8: Beta + Omega
      • M8a: Beta + Omega = 1
      • Additional Site Models
    • Branch Models
      • Free-Ratio Model
      • Multi-Ratio Model
    • Branch-Site Models
      • Branch-Site Model A
      • Branch-Site Model A Null
    • Model Selection
      • Choosing the Right Model
      • Computational Considerations
    • Model Comparison
      • Comparing Results
    • PAML Compatibility
  • Hypothesis Testing
    • Quick Testing for Positive Selection
    • Site-Class Model Tests
      • M1a vs M2a: Nearly Neutral vs Positive Selection
      • M7 vs M8: Beta vs Beta + Omega
      • M8a vs M8: Null Test with 50:50 Mixture
    • Branch-Site Tests
      • Branch-Site Model A Test
    • Branch Model Tests
      • Multi-Ratio vs One-Ratio
      • Free-Ratio Test
    • Understanding the Results
      • LRTResult Object
    • Statistical Considerations
      • Significance Thresholds
      • Degrees of Freedom
      • Multiple Testing
      • Power Considerations
    • Best Practices
    • Publication Checklist
      • Example for Methods Section
    • Common Pitfalls
  • Sequence Simulation
    • Overview
    • Command-Line Interface
      • Basic Usage
      • M0 Model (Single Omega)
      • M1a Model (Nearly Neutral)
      • M2a Model (Positive Selection)
      • M7 Model (Beta Distribution)
      • M8 Model (Beta + Positive Selection)
      • M8a Model (Beta + Neutral)
    • Python API
      • Basic Example
      • Positive Selection Model
      • Beta Distribution Models
    • Validation Workflow
    • Power Analysis
    • Tips and Best Practices
    • Algorithm Details
    • Performance
    • API Reference
  • Advanced Usage
    • Direct Optimizer Access
      • Using Optimizer Classes
      • Available Optimizers
    • Customizing Optimization
      • Optimization Parameters
      • M0-First Initialization
      • Codon Frequency Models
      • Branch Length Optimization
    • Working with I/O Classes
      • Alignment Class
      • Tree Class
      • Branch Labels for Branch-Site Models
    • Result Object Details
      • SiteModelResult
      • BranchModelResult
      • BranchSiteModelResult
    • Performance Optimization
      • Using Multiple Cores
      • Memory Considerations
    • Debugging and Troubleshooting
      • Convergence Issues
      • Checking Convergence
      • Comparing with PAML
    • Custom Analysis Workflows
      • Batch Processing Multiple Genes
      • Comparing Multiple Models
      • Parameter Scanning
    • Low-Level Likelihood Calculation
    • Tips and Best Practices

API Reference

  • High-Level API
    • Model Optimization Functions
      • optimize_model
      • optimize_branch_model
      • optimize_branch_site_model
    • Result Classes
      • SiteModelResult
      • BranchModelResult
      • BranchSiteModelResult
      • ModelResultBase
      • ModelResult (Deprecated)
        • ModelResult
  • Analysis & Hypothesis Testing
    • Comprehensive Testing
      • positive_selection
    • Site-Class Model Tests
      • m1a_vs_m2a
      • m7_vs_m8
      • m8a_vs_m8
    • Branch-Site Tests
      • branch_site_test
    • Branch Model Tests
      • branch_model_test
      • free_ratio_test
    • Result Classes
      • LRTResult
    • Utility Functions
      • compare_results
  • Input/Output
    • Sequence Alignment
      • Alignment
        • Alignment
    • Phylogenetic Trees
      • Tree
        • Tree
  • Optimization
    • Site-Class Model Optimizers
      • M0Optimizer
        • M0Optimizer
      • M1aOptimizer
        • M1aOptimizer
      • M2aOptimizer
        • M2aOptimizer
      • M3Optimizer
        • M3Optimizer
      • M7Optimizer
        • M7Optimizer
      • M8Optimizer
        • M8Optimizer
      • M8aOptimizer
        • M8aOptimizer
    • Branch Model Optimizers
      • BranchModelOptimizer
    • Branch-Site Model Optimizers
      • BranchSiteModelAOptimizer
  • Models
    • Codon Models
      • M0CodonModel
        • M0CodonModel
      • Site-Class Codon Models
  • Sequence Simulation
    • Base Classes
      • SequenceSimulator
    • Codon Simulators
      • M0CodonSimulator
      • SiteClassCodonSimulator
      • M1aSimulator
      • M2aSimulator
      • M7Simulator
      • M8Simulator
    • Output Utilities
      • SimulationOutput
  • Core Likelihood
    • Likelihood Calculator
      • LikelihoodCalculator
        • LikelihoodCalculator

Additional Resources

  • Changelog
    • Version 0.2.1 (2025-10-23)
      • Added
      • Changed
      • Fixed
    • Version 0.2.0 (2025-10-22)
      • Added
      • Changed
      • Fixed
    • Version 0.1.0 (2025-10-15)
      • Added
  • Contributing
    • Development Setup
    • Code Style
      • Python Code
      • Rust Code
    • Running Tests
    • Building Documentation
    • Contributing Guidelines
    • Pull Request Process
    • Code Review Checklist
    • Reporting Bugs
    • Feature Requests
    • Adding New Models
    • Testing Guidelines
    • Documentation Guidelines
    • Getting Help
    • License
  • License
    • Full License Text
    • What This Means
    • Why GPL?
    • Academic Use
    • Commercial Use
    • Third-Party Licenses
crabML
  • Search


© Copyright 2025, Andrew Kern.

Built with Sphinx using a theme provided by Read the Docs.