Skip to content

Commit 9885c8e

Browse files
committed
feat: Add real pipeline execution and documentation structure
- Create sample FASTA input data for basic pipeline example - Generate actual pipeline execution output in _nextflow_run_output.log - Update index.mdx to import real terminal output instead of hardcoded - Add comprehensive _README.md explaining examples directory structure and conventions
1 parent f8bb134 commit 9885c8e

File tree

13 files changed

+63
-17
lines changed

13 files changed

+63
-17
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ pnpm-debug.log*
2929

3030
# macOS-specific files
3131
.DS_Store
32+
33+
# Nextflow execution artifacts
34+
src/pages/examples/*/work/
35+
src/pages/examples/*/.nextflow*

src/pages/examples/_README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Nextflow Examples
2+
3+
This directory contains example Nextflow pipelines with their documentation pages.
4+
5+
## Structure
6+
7+
Each example follows a consistent structure:
8+
9+
```
10+
example-name/
11+
├── index.mdx # Documentation page with explanation
12+
├── _main.nf # Nextflow pipeline script
13+
├── _nextflow_run_output.log # Captured pipeline execution output
14+
└── data/ # Input data files (if needed)
15+
└── sample.fa # Sample input file
16+
```
17+
18+
## File Naming Convention
19+
20+
- **`_main.nf`**: Pipeline script (prefixed with `_` to avoid conflicts with actual `main.nf`)
21+
- **`_nextflow_run_output.log`**: Raw terminal output from running the pipeline
22+
- **`index.mdx`**: Documentation page that imports and displays both the pipeline code and execution output
23+
24+
## Adding New Examples
25+
26+
1. Create a new directory with a descriptive name
27+
2. Add the pipeline script as `_main.nf`
28+
3. Create any necessary input data in a `data/` subdirectory
29+
4. Run the pipeline and capture output:
30+
```bash
31+
nextflow run _main.nf > _nextflow_run_output.log 2>&1
32+
```
33+
5. Create an `index.mdx` file that imports both files:
34+
```javascript
35+
import pipelineCode from "./_main.nf?raw";
36+
import terminalOutput from "./_nextflow_run_output.log?raw";
37+
```
38+
39+
## Documentation Pages
40+
41+
Each `index.mdx` file should include:
42+
43+
- Clear explanation of what the pipeline does
44+
- Key concepts demonstrated
45+
- Code blocks showing both the pipeline and execution output
46+
- Usage instructions
47+
48+
The pages use Expressive Code for syntax highlighting and the `ExampleLayout` for consistent styling.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"lineage/v1beta1","kind":"TaskOutput","taskRun":"lid://353fef4d82cbc905aa582366ec9fe84d","workflowRun":"lid://d47025256f47dd1e4fd84d78cd12c7ca","createdAt":"2025-09-22T14:08:37.730548+02:00","output":[{"type":"stdout","name":"-","value":"work/35/3fef4d82cbc905aa582366ec9fe84d/.command.out"}],"labels":null}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"lineage/v1beta1","kind":"TaskRun","sessionId":"7fb62998-8140-42e2-9251-d7a1af41fde5","name":"reverse","codeChecksum":{"value":"c7ee38b6fdd902df643aebe1437889cf","algorithm":"nextflow","mode":"standard"},"script":"\n cat seq_1 seq_2 | rev\n ","input":[{"type":"path","name":"x","value":["lid://ad0cf5df695d37a927d1a350f993d41b/seq_1","lid://ad0cf5df695d37a927d1a350f993d41b/seq_2"]}],"container":null,"conda":null,"spack":null,"architecture":null,"globalVars":{},"binEntries":[],"workflowRun":"lid://d47025256f47dd1e4fd84d78cd12c7ca"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"lineage/v1beta1","kind":"WorkflowRun","workflow":{"scriptFiles":[{"path":"file:///Users/edmundmiller/src/nextflow/website/src/pages/examples/basic-pipeline/_main.nf","checksum":{"value":"a40093cb6f1a707631bdb2cc638f063b","algorithm":"nextflow","mode":"standard"}}],"repository":null,"commitId":null},"sessionId":"5b4e4c92-2182-4ba4-8726-eae8b5964764","name":"distraught_volhard","params":[{"type":"String","name":"in","value":"file:///Users/edmundmiller/src/nextflow/website/src/pages/examples/basic-pipeline/data/sample.fa"}],"config":{"lineage":{"enabled":true},"plugins":["[email protected]"],"notify":{"enabled":true},"env":{},"session":{},"params":{},"process":{},"executor":{},"runName":"distraught_volhard","workDir":"work","poolSize":11}}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"lineage/v1beta1","kind":"TaskOutput","taskRun":"lid://809a9010a53762cea68c40b48298b571","workflowRun":"lid://5b90121520ef574e2f422b42e9fb9ead","createdAt":"2025-09-22T14:07:58.826041+02:00","output":[{"type":"path","name":null,"value":null}],"labels":null}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"lineage/v1beta1","kind":"TaskRun","sessionId":"5b4e4c92-2182-4ba4-8726-eae8b5964764","name":"splitSequences","codeChecksum":{"value":"196efff40b1dca3b894e5ef10fad7272","algorithm":"nextflow","mode":"standard"},"script":"\n awk \u0027/^\u003e/{f\u003d\"seq_\"++d} {print \u003e f}\u0027 \u003c input.fa\n ","input":[{"type":"path","name":"input.fa","value":[{"path":"file:///Users/edmundmiller/src/nextflow/website/src/pages/examples/basic-pipeline/data/sample.fa","checksum":{"value":"179b114eed46ac32f86b37b28dc76523","algorithm":"nextflow","mode":"standard"}}]}],"container":null,"conda":null,"spack":null,"architecture":null,"globalVars":{},"binEntries":[],"workflowRun":"lid://5b90121520ef574e2f422b42e9fb9ead"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"lineage/v1beta1","kind":"TaskOutput","taskRun":"lid://ad0cf5df695d37a927d1a350f993d41b","workflowRun":"lid://d47025256f47dd1e4fd84d78cd12c7ca","createdAt":"2025-09-22T14:08:37.591403+02:00","output":[{"type":"path","name":null,"value":["lid://ad0cf5df695d37a927d1a350f993d41b/seq_1","lid://ad0cf5df695d37a927d1a350f993d41b/seq_2"]}],"labels":null}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"lineage/v1beta1","kind":"TaskRun","sessionId":"7fb62998-8140-42e2-9251-d7a1af41fde5","name":"splitSequences","codeChecksum":{"value":"196efff40b1dca3b894e5ef10fad7272","algorithm":"nextflow","mode":"standard"},"script":"\n awk \u0027/^\u003e/{f\u003d\"seq_\"++d} {print \u003e f}\u0027 \u003c input.fa\n ","input":[{"type":"path","name":"input.fa","value":[{"path":"file:///Users/edmundmiller/src/nextflow/website/src/pages/examples/basic-pipeline/data/sample.fa","checksum":{"value":"8cd42ac5563c15da91c7d7f6cf146817","algorithm":"nextflow","mode":"standard"}}]}],"container":null,"conda":null,"spack":null,"architecture":null,"globalVars":{},"binEntries":[],"workflowRun":"lid://d47025256f47dd1e4fd84d78cd12c7ca"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"lineage/v1beta1","kind":"FileOutput","path":"/Users/edmundmiller/src/nextflow/website/src/pages/examples/basic-pipeline/work/ad/0cf5df695d37a927d1a350f993d41b/seq_1","checksum":{"value":"a8191c573d3614d662df8fe0de70c411","algorithm":"nextflow","mode":"standard"},"source":"lid://ad0cf5df695d37a927d1a350f993d41b","workflowRun":"lid://d47025256f47dd1e4fd84d78cd12c7ca","taskRun":"lid://ad0cf5df695d37a927d1a350f993d41b","size":19,"createdAt":"2025-09-22T14:08:37+02:00","modifiedAt":"2025-09-22T14:08:37.513506231+02:00","labels":null}

0 commit comments

Comments
 (0)