Open-CRAVAT

repository·master·Indexed 41 days ago

https://github.com/karchinlab/open-cravat

A modular Python-based framework for genomic variant interpretation, providing tools for annotation, impact assessment, and scoring. It includes a CLI, a web-based GUI, and an MCP server for AI integration. Key features include the `cravat.run()` and `cravat.run_reporter()` APIs, the `cravat-admin` management tool, and support for various genome builds like hg38.

Tokens
3.9K
Snippets
22
Records
27
Agent score
51%

What's inside Open-CRAVAT

  1. What is Open-CRAVAT?

    master
    Open-CRAVAT is a Python package designed for genomic variant interpretation. It provides capabilities for variant impact analysis, annotation, and scoring. The platform uses a modular architecture, allowing users to leverage a wide variety of analysis modules developed by the CRAVAT team and the broader scientific community.
  2. Overview of Open-CRAVAT

    master
    Open-CRAVAT is a Python package designed for genomic variant interpretation. It provides tools for variant impact assessment, annotation, and scoring. The platform uses a modular architecture, allowing users to leverage a wide variety of analysis modules developed by the CRAVAT team and the broader scientific community.
  3. Enable touch event support for jQuery UI with Touch Punch

    master

    jQuery UI Touch Punch is a small hack that enables touch event support (touchstart, touchmove, touchend) for sites using the jQuery UI library. Because jQuery UI natively listens for mouse events (mouseover, mousemove, mouseout), it often fails on mobile devices. Touch Punch works by using simulated events to map touch events to their corresponding mouse event analogs.

    Note: Touch Punch works by monkey-patching (duck punching) some of jQuery UI's core functionality. While it works with all basic implementations of jQuery UI interactions and widgets, complex cases may occasionally fail.

  4. Use the OpenCRAVAT MCP Server with AI systems

    master
    The OpenCRAVAT MCP (Model Context Protocol) server allows you to expose OpenCRAVAT's variant annotation capabilities to AI systems and Large Language Models (LLMs). This enables AI-driven genomic analysis by connecting the OpenCRAVAT engine to your preferred LLM interface via the Model Context Protocol.
  5. Configure and run Celery job workers

    master

    Open-CRAVAT uses Celery for background job processing.

    • Single-user mode: If the GUI is running in single-user mode, Celery workers are spawned automatically.
    • Multi-user mode: You must manually start Celery workers in a separate process. Use the dotted Python path cravat.gui.celery to point to the configured Celery App instance.

    You can use standard celery CLI flags (e.g., --help) to configure worker behavior, such as restricting specific queues.

    celery -A cravat.gui.celery worker
  6. Install and setup jQuery UI Touch Punch

    master

    To enable touch events in your jQuery UI application, follow these steps in order:

    1. Include jQuery and jQuery UI on your page.
    2. Include Touch Punch after jQuery UI and before its first use.
      • Critical: If you are using specific jQuery UI components, Touch Punch must be included after jquery.ui.mouse.js because it modifies that module's behavior.
    3. Use your jQuery UI widgets/interactions as normal.
    <!-- 1. Include jQuery and jQuery UI -->
    <script src="http://code.jquery.com/jquery.min.js"></script>
    <script src="http://code.jquery.com/ui/1.8.17/jquery-ui.min.js"></script>
    
    <!-- 2. Include Touch Punch after jQuery UI -->
    <script src="jquery.ui.touch-punch.min.js"></script>
    
    <!-- 3. Use jQuery UI as expected -->
    <script>$('#widget').draggable();</script>
  7. Run the Open-CRAVAT GUI

    master

    To launch the Open-CRAVAT graphical user interface using the default Flask server, first ensure the package is installed in editable mode, then use the oc gui command.

    If you specifically require the aiohttp server implementation, use the --aiohttp flag. Note that aiohttp support is considered experimental and may be deprecated in future versions.

    python -m pip install -e .
    oc gui
    
    # To use the aiohttp server instead:
    oc gui --aiohttp
  8. Run a test analysis with Open-CRAVAT

    master

    You can perform a test analysis by first generating an example input file and then running the cravat command. Running cravat on an input file produces several files, the primary output being an Excel file (<input_file>.xlsx).

    # Create an example input file in the current directory
    !cravat-admin make-example-input .
    
    # Run the analysis
    !cravat example_input