diff --git a/docs/wes_platform.md b/docs/wes_platform.md new file mode 100644 index 00000000..c3641834 --- /dev/null +++ b/docs/wes_platform.md @@ -0,0 +1,126 @@ +# GA4GH WES Platform Implementation + +This document describes the GA4GH Workflow Execution Service (WES) platform implementation for the PAML library. + +## Overview + +The GA4GH WES API provides a standard way to submit and manage workflows across different workflow execution systems. +This implementation allows you to use the PAML library to submit workflows to any WES-compatible service. + +The WES platform implementation (`GA4GHWESPlatform`) inherits from the `Platform` abstract base class and implements all the required methods to interact with a WES API endpoint. + +## Features + +- Connect to any WES API endpoint +- Submit CWL workflows +- Monitor workflow execution status +- Retrieve workflow outputs + +## Limitations + +Since the WES API is focused on workflow execution and doesn't include concepts like projects, folders, or file management, some features of the Platform API are not fully supported: + +- File operations (upload, download, copy) are limited +- Project management is simulated using virtual projects +- User management is not supported + +## Usage + +### Initialization and Connection + +```python +from src.cwl_platform import PlatformFactory + +# Initialize the platform factory +factory = PlatformFactory() + +# Get the WES platform +platform = factory.get_platform('GA4GHWESPlatform') + +# Connect to the WES API +platform.connect( + api_endpoint="https://wes.example.com/ga4gh/wes/v1", + auth_token="your_auth_token" # Optional +) +``` + +### Submitting a Workflow + +```python + +# Create a virtual project (not used by WES but required by the API) +project = { + project_name = 'GA4GH WES Example Project' +} +#project = platform.create_project('wes-example', 'WES Example Project') + +# Define workflow parameters +workflow_parameters = { + "input_file": { + "class": "File", + "path": "platform-specific id" + }, + "output_filename": "output.txt" +} + +# Submit the workflow +task = platform.submit_task( + name="My Workflow", + project=project, + workflow="platform://