[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73HG78PWD1JPXQQZGPYZERX":3,"skill-same:01M73HG78PWD1JPXQQZGPYZERX":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M73HG78PWD1JPXQQZGPYZERX","nextflow-workflow-engine",null,"Dataflow workflow engine for scalable bioinformatics pipelines. Defines processes (containerized tasks) connected by channels; runs local, HPC (SLURM\u002FSGE), cloud (AWS\u002FGCP\u002FAzure), or Kubernetes via a single config change. Powers nf-core. Use Snakemake for rule-based Python workflows; use Nextflow for containerized, cloud-native, and nf-core pipelines.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fnextflow-workflow-engine\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: \"nextflow-workflow-engine\"\ndescription: \"Dataflow workflow engine for scalable bioinformatics pipelines. Defines processes (containerized tasks) connected by channels; runs local, HPC (SLURM\u002FSGE), cloud (AWS\u002FGCP\u002FAzure), or Kubernetes via a single config change. Powers nf-core. Use Snakemake for rule-based Python workflows; use Nextflow for containerized, cloud-native, and nf-core pipelines.\"\nlicense: \"Apache-2.0\"\n---\n\n# Nextflow — Scalable Scientific Workflow Engine\n\n## Overview\n\nNextflow implements a dataflow programming model where **processes** (containerized execution units) consume and emit data through **channels** (asynchronous queues). This design enables implicit parallelization — processes run as soon as their input channels have data, without manual dependency management. Nextflow handles process orchestration across local machines, HPC clusters (SLURM, SGE, PBS), and cloud platforms (AWS Batch, Google Cloud Life Sciences, Azure Batch) by swapping a single configuration profile. The nf-core community provides 100+ validated Nextflow pipelines (RNA-seq, WGS, ChIP-seq, scRNA-seq) following best practices with automated testing.\n\n## When to Use\n\n- Building containerized bioinformatics pipelines that must run on HPC, AWS, and local environments without code changes\n- Using nf-core community pipelines (nf-core\u002Frnaseq, nf-core\u002Fsarek, nf-core\u002Fchipseq) out of the box\n- Processing thousands of samples with implicit parallelization across a SLURM cluster\n- Writing pipelines where each step runs inside a Docker or Singularity container for reproducibility\n- Monitoring pipeline execution and resuming from checkpoints after failures with `-resume`\n- Use **Snakemake** instead for Python-native rule-based workflows where Python integration is prioritized\n- Use **WDL\u002FCromwell** instead for clinical genomics pipelines that require CWL\u002FWDL standards compliance\n\n## Prerequisites\n\n- **Software**: Java 11+, Nextflow (self-contained launcher)\n- **Containers**: Docker or Singularity for process isolation (recommended)\n- **Optional**: nf-core tools for community pipeline management\n\n> **Check before installing**: The tool may already be available in the current environment (e.g., inside a `pixi` \u002F `conda` env). Run `command -v nextflow` first and skip the install commands below if it returns a path. When running inside a pixi project, invoke the tool via `pixi run nextflow` rather than bare `nextflow`.\n\n```bash\n# Install Nextflow (self-contained JAR — no sudo required)\ncurl -s https:\u002F\u002Fget.nextflow.io | bash\nchmod +x nextflow\nexport PATH=\"$PWD:$PATH\"\n\n# Verify\nnextflow -version\n# Nextflow version 24.10.1\n\n# Install nf-core tools (Python)\npip install nf-core\n\n# Pull an nf-core pipeline\nnextflow pull nf-core\u002Frnaseq\n```\n\n## Quick Start\n\n```groovy\n\u002F\u002F hello.nf — minimal Nextflow pipeline\nnextflow.enable.dsl = 2\n\nprocess GREET {\n    input: val name\n    output: stdout\n    script: \"echo 'Hello, ${name}!'\"\n}\n\nworkflow {\n    Channel.of('World', 'Nextflow') | GREET | view\n}\n```\n\n```bash\n# Run the pipeline\nnextflow run hello.nf\n# Hello, World!\n# Hello, Nextflow!\n```\n\n## Core API\n\n### Module 1: Processes — Containerized Task Units\n\nDefine processes with inputs, outputs, and shell\u002Fscript directives.\n\n```groovy\n\u002F\u002F process_example.nf\nnextflow.enable.dsl = 2\n\nprocess ALIGN_READS {\n    \u002F\u002F Container for this process\n    container 'quay.io\u002Fbiocontainers\u002Fstar:2.7.11a--h0033a41_0'\n    \n    \u002F\u002F Resource directives\n    cpus 16\n    memory '32 GB'\n    \n    \u002F\u002F I\u002FO declarations\n    input:\n    tuple val(sample_id), path(reads_r1), path(reads_r2)\n    path genome_index\n    \n    output:\n    tuple val(sample_id), path(\"${sample_id}.Aligned.sortedByCoord.out.bam\")\n    path \"${sample_id}.Log.final.out\", emit: log\n    \n    \u002F\u002F Shell command\n    script:\n    \"\"\"\n    STAR --runThreadN ${task.cpus} \\\\\n         --genomeDir ${genome_index} \\\\\n         --readFilesIn ${reads_r1} ${reads_r2} \\\\\n         --readFilesCommand zcat \\\\\n         --outSAMtype BAM SortedByCoordinate \\\\\n         --outFileNamePrefix ${sample_id}.\n    \"\"\"\n}\n```\n\n### Module 2: Channels — Data Queues Between Processes\n\nCreate and transform channels for flexible data routing.\n\n```groovy\nnextflow.enable.dsl = 2\n\nworkflow {\n    \u002F\u002F Value channel (broadcast)\n    genome_ch = Channel.value(file(\"GRCh38.fa\"))\n    \n    \u002F\u002F List channel\n    samples_ch = Channel.of('ctrl_1', 'ctrl_2', 'treat_1', 'treat_2')\n    \n    \u002F\u002F File channel from glob pattern\n    reads_ch = Channel.fromFilePairs(\"data\u002F*_{R1,R2}.fastq.gz\")\n    \u002F\u002F Emits: [sample_id, [R1_file, R2_file]]\n    \n    \u002F\u002F From a CSV sample sheet\n    sample_sheet = Channel.fromPath(\"samplesheet.csv\")\n        .splitCsv(header: true)\n        .map { row -> tuple(row.sample, file(row.fastq_1), file(row.fastq_2)) }\n    \n    \u002F\u002F Channel operators\n    filtered = reads_ch\n        .filter { id, files -> id.startsWith(\"ctrl\") }\n        .view { id, files -> \"Processing: ${id}\" }\n}\n```\n\n### Module 3: Workflow Block — Pipeline DAG Definition\n\nConnect processes with channels to define the pipeline DAG.\n\n```groovy\nnextflow.enable.dsl = 2\n\ninclude { FASTP } from '.\u002Fmodules\u002Ffastp'\ninclude { STAR_ALIGN } from '.\u002Fmodules\u002Fstar'\ninclude { FEATURECOUNTS } from '.\u002Fmodules\u002Ffeaturecounts'\n\nworkflow RNA_SEQ {\n    take:\n    reads_ch     \u002F\u002F tuple: [sample_id, [R1, R2]]\n    genome_idx   \u002F\u002F path: STAR index directory\n    gtf          \u002F\u002F path: annotation GTF file\n    \n    main:\n    \u002F\u002F Trim reads\n    FASTP(reads_ch)\n    \n    \u002F\u002F Align trimmed reads\n    STAR_ALIGN(FASTP.out.reads, genome_idx)\n    \n    \u002F\u002F Count reads (join on sample_id)\n    FEATURECOUNTS(STAR_ALIGN.out.bam, gtf)\n    \n    emit:\n    counts = FEATURECOUNTS.out.counts\n    logs   = STAR_ALIGN.out.log.mix(FASTP.out.log)\n}\n\nworkflow {\n    reads = Channel.fromFilePairs(\"data\u002F*_{R1,R2}.fastq.gz\")\n    genome_idx = Channel.value(file(\"genome\u002Fstar_index\"))\n    gtf = Channel.value(file(\"genome\u002Fannotation.gtf\"))\n    \n    RNA_SEQ(reads, genome_idx, gtf)\n    RNA_SEQ.out.counts | view\n}\n```\n\n### Module 4: Configuration — Profiles for Different Environments\n\nConfigure execution profiles for local, HPC, and cloud environments.\n\n```groovy\n\u002F\u002F nextflow.config — profile-based configuration\nprofiles {\n    local {\n        process.executor = 'local'\n        process.cpus = 4\n        process.memory = '8 GB'\n        docker.enabled = true\n    }\n    \n    slurm {\n        process.executor = 'slurm'\n        process.queue = 'batch'\n        process.clusterOptions = '--account=myproject'\n        singularity.enabled = true\n        singularity.autoMounts = true\n        \n        \u002F\u002F Per-process resource configuration\n        process {\n            withName: STAR_ALIGN {\n                cpus = 16\n                memory = '32 GB'\n                time = '4h'\n            }\n            withName: FASTP {\n                cpus = 8\n                memory = '8 GB'\n            }\n        }\n    }\n    \n    aws {\n        process.executor = 'awsbatch'\n        process.queue = 'arn:aws:batch:us-east-1:123456789:job-queue\u002Fmy-queue'\n        aws.region = 'us-east-1'\n        aws.batch.cliPath = '\u002Fhome\u002Fec2-user\u002Fminiconda\u002Fbin\u002Faws'\n        docker.enabled = true\n    }\n}\n\n\u002F\u002F Global params\nparams {\n    outdir    = 'results'\n    genome    = 'GRCh38'\n    max_cpus  = 16\n    max_memory = '128 GB'\n    max_time   = '72h'\n}\n```\n\n### Module 5: Operators — Channel Transformations\n\nTransform channels using built-in operators.\n\n```groovy\nnextflow.enable.dsl = 2\n\nworkflow {\n    \u002F\u002F Map: transform each element\n    Channel.fromPath(\"data\u002F*.fastq.gz\")\n        .map { file -> tuple(file.baseName.replaceAll(\u002F_R[12]\u002F, ''), file) }\n        .groupTuple()   \u002F\u002F group by sample_id → [sample_id, [R1, R2]]\n        .view { id, files -> \"Sample: ${id} (${files.size()} files)\" }\n    \n    \u002F\u002F Filter by condition\n    Channel.of(1, 2, 3, 4, 5)\n        .filter { it > 3 }\n        .view()  \u002F\u002F emits: 4, 5\n    \n    \u002F\u002F Combine channels\n    samples = Channel.of('A', 'B', 'C')\n    refs = Channel.value(file(\"genome.fa\"))\n    samples.combine(refs).view()  \u002F\u002F [A, genome.fa], [B, genome.fa], [C, genome.fa]\n    \n    \u002F\u002F Collect all outputs into a list\n    Channel.of(1, 2, 3).collect().view()  \u002F\u002F [[1, 2, 3]]\n}\n```\n\n### Module 6: Error Handling and Resuming\n\nHandle failures, retry strategies, and pipeline resuming.\n\n```groovy\n\u002F\u002F nextflow.config — retry and error handling\nprocess {\n    \u002F\u002F Retry failed processes up to 3 times with increasing memory\n    errorStrategy = { task.exitStatus in [137, 140] ? 'retry' : 'finish' }\n    maxRetries = 3\n    memory = { 8.GB * task.attempt }   \u002F\u002F 8GB → 16GB → 24GB on retries\n    \n    \u002F\u002F Ignore errors for optional steps\n    withName: OPTIONAL_STEP {\n        errorStrategy = 'ignore'\n    }\n}\n```\n\n```bash\n# Resume a pipeline from the last successful checkpoint\nnextflow run pipeline.nf -resume\n\n# View process execution statistics\nnextflow log amazing_fermi  # use run name from .nextflow.log\n\n# Inspect work directories\nls work\u002Fab\u002Fcdef1234*\u002F\n```\n\n## Key Parameters\n\n| Parameter | Default | Range\u002FOptions | Effect |\n|-----------|---------|---------------|--------|\n| `-resume` | off | flag | Resume from last successful checkpoint using cached results |\n| `-profile` | — | `local`, `slurm`, `aws`, custom | Select execution profile from nextflow.config |\n| `-params-file` | — | JSON\u002FYAML path | Load pipeline parameters from a file |\n| `-w \u002F --work-dir` | `.\u002Fwork` | directory path | Work directory for intermediate files |\n| `process.cpus` | `1` | integer | Default CPUs per process; override with `withName` |\n| `process.memory` | `1 GB` | memory string | Default memory per process |\n| `process.executor` | `local` | `local`, `slurm`, `sge`, `awsbatch`, `k8s` | Job scheduler or cloud executor |\n| `process.errorStrategy` | `terminate` | `retry`, `ignore`, `finish` | How to handle process failures |\n| `process.maxRetries` | `0` | integer | Maximum automatic retries before failure |\n| `docker.enabled` | `false` | boolean | Enable Docker container runtime |\n\n## Common Workflows\n\n### Workflow 1: Complete RNA-seq Pipeline (nf-core\u002Frnaseq)\n\n```bash\n# Run nf-core\u002Frnaseq with a samplesheet\n# samplesheet.csv: sample,fastq_1,fastq_2,strandedness\ncat > samplesheet.csv \u003C\u003C 'EOF'\nsample,fastq_1,fastq_2,strandedness\nctrl_1,data\u002Fctrl_1_R1.fastq.gz,data\u002Fctrl_1_R2.fastq.gz,auto\nctrl_2,data\u002Fctrl_2_R1.fastq.gz,data\u002Fctrl_2_R2.fastq.gz,auto\ntreat_1,data\u002Ftreat_1_R1.fastq.gz,data\u002Ftreat_1_R2.fastq.gz,auto\nEOF\n\n# Run nf-core\u002Frnaseq (downloads pipeline and containers automatically)\nnextflow run nf-core\u002Frnaseq \\\n    -profile docker \\\n    --input samplesheet.csv \\\n    --genome GRCh38 \\\n    --outdir results\u002F \\\n    -resume\n\necho \"Results in: results\u002Fstar_salmon\u002F  results\u002Fmultiqc\u002F\"\n```\n\n### Workflow 2: Custom Modular Pipeline with Sub-workflows\n\n```groovy\n\u002F\u002F main.nf — modular pipeline structure\nnextflow.enable.dsl = 2\n\ninclude { QC_TRIM     } from '.\u002Fsubworkflows\u002Fqc_trim'\ninclude { ALIGN_COUNT } from '.\u002Fsubworkflows\u002Falign_count'\ninclude { MULTIQC     } from '.\u002Fmodules\u002Fmultiqc'\n\nworkflow {\n    \u002F\u002F Input: sample sheet CSV\n    ch_samples = Channel\n        .fromPath(params.samplesheet)\n        .splitCsv(header: true)\n        .map { row -> tuple(row.sample, file(row.fastq_1), file(row.fastq_2)) }\n    \n    \u002F\u002F QC and trimming\n    QC_TRIM(ch_samples)\n    \n    \u002F\u002F Alignment and counting\n    ALIGN_COUNT(\n        QC_TRIM.out.reads,\n        file(params.genome_index),\n        file(params.gtf)\n    )\n    \n    \u002F\u002F Aggregate QC\n    all_logs = QC_TRIM.out.logs.mix(ALIGN_COUNT.out.logs).collect()\n    MULTIQC(all_logs)\n    \n    \u002F\u002F Publish count matrix\n    ALIGN_COUNT.out.counts.view { id, file ->\n        \"Counts: ${id} → ${file}\"\n    }\n}\n```\n\n## Common Recipes\n\n### Recipe 1: Monitor Running Pipeline and View Logs\n\n```bash\n# View current pipeline run status\nnextflow log\n\n# Detailed log for a specific run\nnextflow log amazing_fermi -f name,status,exit,duration,realtime,rss\n\n# Watch pipeline progress in real-time\ntail -f .nextflow.log\n\n# Generate HTML execution report and timeline\nnextflow run pipeline.nf -with-report report.html -with-timeline timeline.html\nopen report.html\n```\n\n### Recipe 2: Run nf-core Pipeline with Custom Config\n\n```bash\n# Create custom config for institutional HPC\ncat > custom.config \u003C\u003C 'EOF'\nprocess {\n    executor = 'slurm'\n    queue = 'normal'\n    clusterOptions = '--account=myproject'\n    \n    withName: STAR_ALIGN {\n        cpus = 16\n        memory = '32 GB'\n        time = '4h'\n    }\n}\n\nsingularity {\n    enabled = true\n    autoMounts = true\n    cacheDir = '\u002Fscratch\u002Fsingularity_cache'\n}\nEOF\n\nnextflow run nf-core\u002Frnaseq \\\n    -profile singularity \\\n    -c custom.config \\\n    --input samplesheet.csv \\\n    --genome GRCh38 \\\n    --outdir results\u002F \\\n    -resume\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `Cannot find a matching process` | DSL2 module not included | Add `include { PROCESS_NAME } from '.\u002Fmodules\u002F...'` |\n| Work directory fills disk | Accumulated intermediate files | Run `nextflow clean -f` to remove old work directories |\n| Container pull fails | Registry authentication or network issue | Pre-pull: `docker pull quay.io\u002Fbiocontainers\u002Ftool:version`; use `--pull never` |\n| `resume` doesn't skip completed steps | Process inputs changed or cache invalidated | Check if input files or params changed; use `nextflow log` to inspect cache |\n| SLURM job pending indefinitely | Insufficient queue resources | Check with `squeue`; reduce `memory` and `cpus` in config |\n| `OutOfMemoryError` in Java | Nextflow JVM heap too small | `export NXF_JVM_ARGS=\"-Xms1g -Xmx8g\"` |\n| Process output not found | Wrong output path in `output:` block | Check work directory: `ls work\u002Fxx\u002Fyyyyyy*\u002F`; verify script creates expected files |\n| nf-core pipeline fails checksum | Stale cached pipeline | `nextflow pull nf-core\u002Frnaseq -r latest` to update |\n\n## References\n\n- [Nextflow documentation](https:\u002F\u002Fwww.nextflow.io\u002Fdocs\u002Flatest\u002F) — official language reference and executor guides\n- [Nextflow GitHub: nextflow-io\u002Fnextflow](https:\u002F\u002Fgithub.com\u002Fnextflow-io\u002Fnextflow) — source code and releases\n- Di Tommaso P et al. (2017) \"Nextflow enables reproducible computational workflows\" — *Nature Biotechnology* 35:316-319. [DOI:10.1038\u002Fnbt.3820](https:\u002F\u002Fdoi.org\u002F10.1038\u002Fnbt.3820)\n- [nf-core](https:\u002F\u002Fnf-co.re\u002F) — community curated Nextflow pipelines with automated testing and containers\n","# Nextflow — Scalable Scientific Workflow Engine\n\n## Overview\n\nNextflow implements a dataflow programming model where **processes** (containerized execution units) consume and emit data through **channels** (asynchronous queues). This design enables implicit parallelization — processes run as soon as their input channels have data, without manual dependency management. Nextflow handles process orchestration across local machines, HPC clusters (SLURM, SGE, PBS), and cloud platforms (AWS Batch, Google Cloud Life Sciences, Azure Batch) by swapping a single configuration profile. The nf-core community provides 100+ validated Nextflow pipelines (RNA-seq, WGS, ChIP-seq, scRNA-seq) following best practices with automated testing.\n\n## When to Use\n\n- Building containerized bioinformatics pipelines that must run on HPC, AWS, and local environments without code changes\n- Using nf-core community pipelines (nf-core\u002Frnaseq, nf-core\u002Fsarek, nf-core\u002Fchipseq) out of the box\n- Processing thousands of samples with implicit parallelization across a SLURM cluster\n- Writing pipelines where each step runs inside a Docker or Singularity container for reproducibility\n- Monitoring pipeline execution and resuming from checkpoints after failures with `-resume`\n- Use **Snakemake** instead for Python-native rule-based workflows where Python integration is prioritized\n- Use **WDL\u002FCromwell** instead for clinical genomics pipelines that require CWL\u002FWDL standards compliance\n\n## Prerequisites\n\n- **Software**: Java 11+, Nextflow (self-contained launcher)\n- **Containers**: Docker or Singularity for process isolation (recommended)\n- **Optional**: nf-core tools for community pipeline management\n\n> **Check before installing**: The tool may already be available in the current environment (e.g., inside a `pixi` \u002F `conda` env). Run `command -v nextflow` first and skip the install commands below if it returns a path. When running inside a pixi project, invoke the tool via `pixi run nextflow` rather than bare `nextflow`.\n\n```bash\n# Install Nextflow (self-contained JAR — no sudo required)\ncurl -s https:\u002F\u002Fget.nextflow.io | bash\nchmod +x nextflow\nexport PATH=\"$PWD:$PATH\"\n\n# Verify\nnextflow -version\n# Nextflow version 24.10.1\n\n# Install nf-core tools (Python)\npip install nf-core\n\n# Pull an nf-core pipeline\nnextflow pull nf-core\u002Frnaseq\n```\n\n## Quick Start\n\n```groovy\n\u002F\u002F hello.nf — minimal Nextflow pipeline\nnextflow.enable.dsl = 2\n\nprocess GREET {\n    input: val name\n    output: stdout\n    script: \"echo 'Hello, ${name}!'\"\n}\n\nworkflow {\n    Channel.of('World', 'Nextflow') | GREET | view\n}\n```\n\n```bash\n# Run the pipeline\nnextflow run hello.nf\n# Hello, World!\n# Hello, Nextflow!\n```\n\n## Core API\n\n### Module 1: Processes — Containerized Task Units\n\nDefine processes with inputs, outputs, and shell\u002Fscript directives.\n\n```groovy\n\u002F\u002F process_example.nf\nnextflow.enable.dsl = 2\n\nprocess ALIGN_READS {\n    \u002F\u002F Container for this process\n    container 'quay.io\u002Fbiocontainers\u002Fstar:2.7.11a--h0033a41_0'\n    \n    \u002F\u002F Resource directives\n    cpus 16\n    memory '32 GB'\n    \n    \u002F\u002F I\u002FO declarations\n    input:\n    tuple val(sample_id), path(reads_r1), path(reads_r2)\n    path genome_index\n    \n    output:\n    tuple val(sample_id), path(\"${sample_id}.Aligned.sortedByCoord.out.bam\")\n    path \"${sample_id}.Log.final.out\", emit: log\n    \n    \u002F\u002F Shell command\n    script:\n    \"\"\"\n    STAR --runThreadN ${task.cpus} \\\\\n         --genomeDir ${genome_index} \\\\\n         --readFilesIn ${reads_r1} ${reads_r2} \\\\\n         --readFilesCommand zcat \\\\\n         --outSAMtype BAM SortedByCoordinate \\\\\n         --outFileNamePrefix ${sample_id}.\n    \"\"\"\n}\n```\n\n### Module 2: Channels — Data Queues Between Processes\n\nCreate and transform channels for flexible data routing.\n\n```groovy\nnextflow.enable.dsl = 2\n\nworkflow {\n    \u002F\u002F Value channel (broadcast)\n    genome_ch = Channel.value(file(\"GRCh38.fa\"))\n    \n    \u002F\u002F List channel\n    samples_ch = Channel.of('ctrl_1', 'ctrl_2', 'treat_1', 'treat_2')\n    \n    \u002F\u002F File channel from glob pattern\n    reads_ch = Channel.fromFilePairs(\"data\u002F*_{R1,R2}.fastq.gz\")\n    \u002F\u002F Emits: [sample_id, [R1_file, R2_file]]\n    \n    \u002F\u002F From a CSV sample sheet\n    sample_sheet = Channel.fromPath(\"samplesheet.csv\")\n        .splitCsv(header: true)\n        .map { row -> tuple(row.sample, file(row.fastq_1), file(row.fastq_2)) }\n    \n    \u002F\u002F Channel operators\n    filtered = reads_ch\n        .filter { id, files -> id.startsWith(\"ctrl\") }\n        .view { id, files -> \"Processing: ${id}\" }\n}\n```\n\n### Module 3: Workflow Block — Pipeline DAG Definition\n\nConnect processes with channels to define the pipeline DAG.\n\n```groovy\nnextflow.enable.dsl = 2\n\ninclude { FASTP } from '.\u002Fmodules\u002Ffastp'\ninclude { STAR_ALIGN } from '.\u002Fmodules\u002Fstar'\ninclude { FEATURECOUNTS } from '.\u002Fmodules\u002Ffeaturecounts'\n\nworkflow RNA_SEQ {\n    take:\n    reads_ch     \u002F\u002F tuple: [sample_id, [R1, R2]]\n    genome_idx   \u002F\u002F path: STAR index directory\n    gtf          \u002F\u002F path: annotation GTF file\n    \n    main:\n    \u002F\u002F Trim reads\n    FASTP(reads_ch)\n    \n    \u002F\u002F Align trimmed reads\n    STAR_ALIGN(FASTP.out.reads, genome_idx)\n    \n    \u002F\u002F Count reads (join on sample_id)\n    FEATURECOUNTS(STAR_ALIGN.out.bam, gtf)\n    \n    emit:\n    counts = FEATURECOUNTS.out.counts\n    logs   = STAR_ALIGN.out.log.mix(FASTP.out.log)\n}\n\nworkflow {\n    reads = Channel.fromFilePairs(\"data\u002F*_{R1,R2}.fastq.gz\")\n    genome_idx = Channel.value(file(\"genome\u002Fstar_index\"))\n    gtf = Channel.value(file(\"genome\u002Fannotation.gtf\"))\n    \n    RNA_SEQ(reads, genome_idx, gtf)\n    RNA_SEQ.out.counts | view\n}\n```\n\n### Module 4: Configuration — Profiles for Different Environments\n\nConfigure execution profiles for local, HPC, and cloud environments.\n\n```groovy\n\u002F\u002F nextflow.config — profile-based configuration\nprofiles {\n    local {\n        process.executor = 'local'\n        process.cpus = 4\n        process.memory = '8 GB'\n        docker.enabled = true\n    }\n    \n    slurm {\n        process.executor = 'slurm'\n        process.queue = 'batch'\n        process.clusterOptions = '--account=myproject'\n        singularity.enabled = true\n        singularity.autoMounts = true\n        \n        \u002F\u002F Per-process resource configuration\n        process {\n            withName: STAR_ALIGN {\n                cpus = 16\n                memory = '32 GB'\n                time = '4h'\n            }\n            withName: FASTP {\n                cpus = 8\n                memory = '8 GB'\n            }\n        }\n    }\n    \n    aws {\n        process.executor = 'awsbatch'\n        process.queue = 'arn:aws:batch:us-east-1:123456789:job-queue\u002Fmy-queue'\n        aws.region = 'us-east-1'\n        aws.batch.cliPath = '\u002Fhome\u002Fec2-user\u002Fminiconda\u002Fbin\u002Faws'\n        docker.enabled = true\n    }\n}\n\n\u002F\u002F Global params\nparams {\n    outdir    = 'results'\n    genome    = 'GRCh38'\n    max_cpus  = 16\n    max_memory = '128 GB'\n    max_time   = '72h'\n}\n```\n\n### Module 5: Operators — Channel Transformations\n\nTransform channels using built-in operators.\n\n```groovy\nnextflow.enable.dsl = 2\n\nworkflow {\n    \u002F\u002F Map: transform each element\n    Channel.fromPath(\"data\u002F*.fastq.gz\")\n        .map { file -> tuple(file.baseName.replaceAll(\u002F_R[12]\u002F, ''), file) }\n        .groupTuple()   \u002F\u002F group by sample_id → [sample_id, [R1, R2]]\n        .view { id, files -> \"Sample: ${id} (${files.size()} files)\" }\n    \n    \u002F\u002F Filter by condition\n    Channel.of(1, 2, 3, 4, 5)\n        .filter { it > 3 }\n        .view()  \u002F\u002F emits: 4, 5\n    \n    \u002F\u002F Combine channels\n    samples = Channel.of('A', 'B', 'C')\n    refs = Channel.value(file(\"genome.fa\"))\n    samples.combine(refs).view()  \u002F\u002F [A, genome.fa], [B, genome.fa], [C, genome.fa]\n    \n    \u002F\u002F Collect all outputs into a list\n    Channel.of(1, 2, 3).collect().view()  \u002F\u002F [[1, 2, 3]]\n}\n```\n\n### Module 6: Error Handling and Resuming\n\nHandle failures, retry strategies, and pipeline resuming.\n\n```groovy\n\u002F\u002F nextflow.config — retry and error handling\nprocess {\n    \u002F\u002F Retry failed processes up to 3 times with increasing memory\n    errorStrategy = { task.exitStatus in [137, 140] ? 'retry' : 'finish' }\n    maxRetries = 3\n    memory = { 8.GB * task.attempt }   \u002F\u002F 8GB → 16GB → 24GB on retries\n    \n    \u002F\u002F Ignore errors for optional steps\n    withName: OPTIONAL_STEP {\n        errorStrategy = 'ignore'\n    }\n}\n```\n\n```bash\n# Resume a pipeline from the last successful checkpoint\nnextflow run pipeline.nf -resume\n\n# View process execution statistics\nnextflow log amazing_fermi  # use run name from .nextflow.log\n\n# Inspect work directories\nls work\u002Fab\u002Fcdef1234*\u002F\n```\n\n## Key Parameters\n\n| Parameter | Default | Range\u002FOptions | Effect |\n|-----------|---------|---------------|--------|\n| `-resume` | off | flag | Resume from last successful checkpoint using cached results |\n| `-profile` | — | `local`, `slurm`, `aws`, custom | Select execution profile from nextflow.config |\n| `-params-file` | — | JSON\u002FYAML path | Load pipeline parameters from a file |\n| `-w \u002F --work-dir` | `.\u002Fwork` | directory path | Work directory for intermediate files |\n| `process.cpus` | `1` | integer | Default CPUs per process; override with `withName` |\n| `process.memory` | `1 GB` | memory string | Default memory per process |\n| `process.executor` | `local` | `local`, `slurm`, `sge`, `awsbatch`, `k8s` | Job scheduler or cloud executor |\n| `process.errorStrategy` | `terminate` | `retry`, `ignore`, `finish` | How to handle process failures |\n| `process.maxRetries` | `0` | integer | Maximum automatic retries before failure |\n| `docker.enabled` | `false` | boolean | Enable Docker container runtime |\n\n## Common Workflows\n\n### Workflow 1: Complete RNA-seq Pipeline (nf-core\u002Frnaseq)\n\n```bash\n# Run nf-core\u002Frnaseq with a samplesheet\n# samplesheet.csv: sample,fastq_1,fastq_2,strandedness\ncat > samplesheet.csv \u003C\u003C 'EOF'\nsample,fastq_1,fastq_2,strandedness\nctrl_1,data\u002Fctrl_1_R1.fastq.gz,data\u002Fctrl_1_R2.fastq.gz,auto\nctrl_2,data\u002Fctrl_2_R1.fastq.gz,data\u002Fctrl_2_R2.fastq.gz,auto\ntreat_1,data\u002Ftreat_1_R1.fastq.gz,data\u002Ftreat_1_R2.fastq.gz,auto\nEOF\n\n# Run nf-core\u002Frnaseq (downloads pipeline and containers automatically)\nnextflow run nf-core\u002Frnaseq \\\n    -profile docker \\\n    --input samplesheet.csv \\\n    --genome GRCh38 \\\n    --outdir results\u002F \\\n    -resume\n\necho \"Results in: results\u002Fstar_salmon\u002F  results\u002Fmultiqc\u002F\"\n```\n\n### Workflow 2: Custom Modular Pipeline with Sub-workflows\n\n```groovy\n\u002F\u002F main.nf — modular pipeline structure\nnextflow.enable.dsl = 2\n\ninclude { QC_TRIM     } from '.\u002Fsubworkflows\u002Fqc_trim'\ninclude { ALIGN_COUNT } from '.\u002Fsubworkflows\u002Falign_count'\ninclude { MULTIQC     } from '.\u002Fmodules\u002Fmultiqc'\n\nworkflow {\n    \u002F\u002F Input: sample sheet CSV\n    ch_samples = Channel\n        .fromPath(params.samplesheet)\n        .splitCsv(header: true)\n        .map { row -> tuple(row.sample, file(row.fastq_1), file(row.fastq_2)) }\n    \n    \u002F\u002F QC and trimming\n    QC_TRIM(ch_samples)\n    \n    \u002F\u002F Alignment and counting\n    ALIGN_COUNT(\n        QC_TRIM.out.reads,\n        file(params.genome_index),\n        file(params.gtf)\n    )\n    \n    \u002F\u002F Aggregate QC\n    all_logs = QC_TRIM.out.logs.mix(ALIGN_COUNT.out.logs).collect()\n    MULTIQC(all_logs)\n    \n    \u002F\u002F Publish count matrix\n    ALIGN_COUNT.out.counts.view { id, file ->\n        \"Counts: ${id} → ${file}\"\n    }\n}\n```\n\n## Common Recipes\n\n### Recipe 1: Monitor Running Pipeline and View Logs\n\n```bash\n# View current pipeline run status\nnextflow log\n\n# Detailed log for a specific run\nnextflow log amazing_fermi -f name,status,exit,duration,realtime,rss\n\n# Watch pipeline progress in real-time\ntail -f .nextflow.log\n\n# Generate HTML execution report and timeline\nnextflow run pipeline.nf -with-report report.html -with-timeline timeline.html\nopen report.html\n```\n\n### Recipe 2: Run nf-core Pipeline with Custom Config\n\n```bash\n# Create custom config for institutional HPC\ncat > custom.config \u003C\u003C 'EOF'\nprocess {\n    executor = 'slurm'\n    queue = 'normal'\n    clusterOptions = '--account=myproject'\n    \n    withName: STAR_ALIGN {\n        cpus = 16\n        memory = '32 GB'\n        time = '4h'\n    }\n}\n\nsingularity {\n    enabled = true\n    autoMounts = true\n    cacheDir = '\u002Fscratch\u002Fsingularity_cache'\n}\nEOF\n\nnextflow run nf-core\u002Frnaseq \\\n    -profile singularity \\\n    -c custom.config \\\n    --input samplesheet.csv \\\n    --genome GRCh38 \\\n    --outdir results\u002F \\\n    -resume\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `Cannot find a matching process` | DSL2 module not included | Add `include { PROCESS_NAME } from '.\u002Fmodules\u002F...'` |\n| Work directory fills disk | Accumulated intermediate files | Run `nextflow clean -f` to remove old work directories |\n| Container pull fails | Registry authentication or network issue | Pre-pull: `docker pull quay.io\u002Fbiocontainers\u002Ftool:version`; use `--pull never` |\n| `resume` doesn't skip completed steps | Process inputs changed or cache invalidated | Check if input files or params changed; use `nextflow log` to inspect cache |\n| SLURM job pending indefinitely | Insufficient queue resources | Check with `squeue`; reduce `memory` and `cpus` in config |\n| `OutOfMemoryError` in Java | Nextflow JVM heap too small | `export NXF_JVM_ARGS=\"-Xms1g -Xmx8g\"` |\n| Process output not found | Wrong output path in `output:` block | Check work directory: `ls work\u002Fxx\u002Fyyyyyy*\u002F`; verify script creates expected files |\n| nf-core pipeline fails checksum | Stale cached pipeline | `nextflow pull nf-core\u002Frnaseq -r latest` to update |\n\n## References\n\n- [Nextflow documentation](https:\u002F\u002Fwww.nextflow.io\u002Fdocs\u002Flatest\u002F) — official language reference and executor guides\n- [Nextflow GitHub: nextflow-io\u002Fnextflow](https:\u002F\u002Fgithub.com\u002Fnextflow-io\u002Fnextflow) — source code and releases\n- Di Tommaso P et al. (2017) \"Nextflow enables reproducible computational workflows\" — *Nature Biotechnology* 35:316-319. [DOI:10.1038\u002Fnbt.3820](https:\u002F\u002Fdoi.org\u002F10.1038\u002Fnbt.3820)\n- [nf-core](https:\u002F\u002Fnf-co.re\u002F) — community curated Nextflow pipelines with automated testing and containers\n",{"name":5,"license":15,"description":7},"master","63f17866001c5ca854bf2fa0b678ce277133de5b","skills\u002Fawesome-skills\u002Fnextflow-workflow-engine",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill nextflow-workflow-engine",{"tool":40,"command":41},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill nextflow-workflow-engine",{"tool":43,"command":44},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill nextflow-workflow-engine","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fnextflow-workflow-engine\u002FSKILL.md",true,[],[49,58,65,72,79,86],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":57},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":57},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":57},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":57},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":57},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]