Skip to content

Commit f3729bf

Browse files
committed
docs: Add mermaid doc
1 parent f72e279 commit f3729bf

File tree

1 file changed

+37
-14
lines changed

1 file changed

+37
-14
lines changed

README.md

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
A Nextflow plugin for integrating [NVIDIA NIMs (NVIDIA Inference Microservices)](https://developer.nvidia.com/nim) as custom executors for bioinformatics workflows.
44

5+
```mmd
6+
graph TB
7+
A[NIM Service<br/>Docker: localhost:8080 | Cloud: health.api.nvidia.com]
8+
B[Nextflow Process<br/>task.ext.nim = rfdiffusion]
9+
C[RFDiffusion Processing<br/>15 diffusion steps on protein structure]
10+
D[Output Generation<br/>designed.pdb written to workflow]
11+
12+
A -.->|NVCF_RUN_KEY auth| B
13+
B -->|POST /v1/biology/ipd/rfdiffusion/generate<br/>PDB + contigs A20-60/0 50-100| C
14+
C -->|Structure optimization| C
15+
C -->|JSON: status + results| D
16+
17+
style A fill:#76b900,color:#fff
18+
style B fill:#667eea,color:#fff
19+
style C fill:#2196F3,color:#fff
20+
style D fill:#4CAF50,color:#fff
21+
```
22+
523
## Overview
624

725
This plugin provides a generic `nim` executor that can run NVIDIA NIM services for biological computing, specifically:
@@ -33,18 +51,21 @@ plugins {
3351
The plugin supports multiple authentication methods with flexible configuration options:
3452

3553
**Method 1: Environment Variable (Traditional)**
54+
3655
```bash
3756
export NVCF_RUN_KEY="your-nvidia-api-key-here"
3857
```
3958

4059
**Method 2: Global Configuration**
60+
4161
```groovy
4262
nim {
4363
apiKey = 'your-api-key-here'
4464
}
4565
```
4666

4767
**Method 3: Service-Specific Configuration**
68+
4869
```groovy
4970
nim {
5071
rfdiffusion {
@@ -83,16 +104,16 @@ Use the `nim` executor in your processes and specify which NIM service to use wi
83104
```groovy
84105
process myNIMProcess {
85106
executor 'nim'
86-
107+
87108
input:
88109
// your inputs
89-
110+
90111
output:
91112
// your outputs
92-
113+
93114
script:
94115
task.ext.nim = "rfdiffusion"
95-
116+
96117
"""
97118
# Your script here - the NIM executor handles the actual API calls
98119
echo "Running ${task.ext.nim} analysis"
@@ -105,16 +126,16 @@ process myNIMProcess {
105126
```groovy
106127
process rfdiffusionDesign {
107128
executor 'nim'
108-
129+
109130
input:
110131
path pdb_file
111-
132+
112133
output:
113134
path "output.pdb"
114135
115136
script:
116137
task.ext.nim = "rfdiffusion"
117-
138+
118139
"""
119140
echo "Designing protein structure using RFDiffusion"
120141
"""
@@ -125,7 +146,7 @@ Parameters for RFDiffusion can be set in `params`:
125146

126147
```groovy
127148
params.contigs = "A20-60/0 50-100"
128-
params.hotspot_res = ["A50","A51","A52","A53","A54"]
149+
params.hotspot_res = ["A50","A51","A52","A53","A54"]
129150
params.diffusion_steps = 15
130151
```
131152

@@ -145,10 +166,10 @@ workflow {
145166
146167
process designProtein {
147168
executor 'nim'
148-
169+
149170
input:
150171
path pdb_file
151-
172+
152173
output:
153174
path "designed.pdb"
154175
@@ -163,10 +184,11 @@ process designProtein {
163184
## Input Requirements
164185

165186
### RFDiffusion
187+
166188
- **Input**: PDB file containing protein structure
167-
- **Parameters**:
189+
- **Parameters**:
168190
- `params.contigs` - Contigs specification (default: "A20-60/0 50-100")
169-
- `params.hotspot_res` - Hotspot residues (default: ["A50","A51","A52","A53","A54"])
191+
- `params.hotspot_res` - Hotspot residues (default: ["A50","A51","A52","A53","A54"])
170192
- `params.diffusion_steps` - Number of diffusion steps (default: 15)
171193

172194
## Health Checks
@@ -240,6 +262,7 @@ The test suite follows a 3-step integration testing pattern:
240262
3. **Verify API completion** - Check response and result files
241263

242264
This separation allows for:
265+
243266
- **Unit testing** - Mock components independently
244267
- **Integration testing** - Test with real API endpoints
245268
- **Isolated testing** - Test individual components without external dependencies
@@ -301,7 +324,7 @@ This project is licensed under the Apache License 2.0 - see the [COPYING](COPYIN
301324
For detailed information, see the comprehensive documentation in the [`docs/`](docs/) directory:
302325

303326
- **[Installation Guide](docs/installation.md)** - Setup and installation instructions
304-
- **[Configuration Guide](docs/configuration.md)** - Configuration options and examples
327+
- **[Configuration Guide](docs/configuration.md)** - Configuration options and examples
305328
- **[Authentication Guide](docs/authentication.md)** - Authentication methods and security
306329
- **[Usage Guide](docs/usage.md)** - Usage patterns and best practices
307330
- **[Examples Guide](docs/examples.md)** - Comprehensive workflow examples
@@ -310,4 +333,4 @@ For detailed information, see the comprehensive documentation in the [`docs/`](d
310333

311334
## Contributing
312335

313-
Contributions are welcome! Please see the development guidelines in the source code for more information.
336+
Contributions are welcome! Please see the development guidelines in the source code for more information.

0 commit comments

Comments
 (0)