Skip to content

Usage (Cluster / HPC)

For large-scale, batch inference across hundreds or thousands of protein pairs, ProMaya provides a robust, parallelized Nextflow pipeline.

Overview

The Nextflow pipeline orchestrates the ProMaya prediction script (predict.py) and optional disorder analysis (iupred_analysis.py), executing them in parallel across your available computing resources. It handles job submission, error recovery, caching (-resume), and aggregates all results into a single, comprehensive table.

Sample Command

To launch a batch screen, provide a samplesheet and a trained checkpoint:

nextflow run main.nf \
  --repo_dir /path/to/ProMaya \
  --checkpoint /path/to/best_model.pt \
  --samplesheet assets/samplesheet.csv \
  --outdir results/promaya_nf \
  -profile slurm,singularity \
  --slurm_account myallocation

[!TIP] Use -resume: Add the -resume flag to your command. Nextflow caches intermediate results, allowing the pipeline to restart from the last successful point without re-running completed protein pairs if the pipeline is interrupted or if you add new pairs to the samplesheet.

Execution Profiles

Nextflow decouples the pipeline logic from the execution environment. Use the -profile argument to adapt to your cluster's infrastructure (you can combine profiles with commas, e.g., -profile slurm,conda,gpu):

  • conda: Automatically builds and uses the promaya conda environment.
  • docker: Executes processes inside the promaya:latest Docker container.
  • singularity: Executes processes inside the promaya.sif Singularity image (Standard for HPC).
  • slurm: Submits each task as an independent job to a SLURM workload manager.
  • gpu: Requests GPU resources and applies --gpu 0 to the inference script.
  • test_stub: Performs a rapid, no-operation run through the DAG to verify wiring without actually loading models.

Parameter Reference

You can pass these as command-line flags (e.g., --gradcam false) or define them in a parameters file (-params-file conf/params.yaml).

Parameter Default Description
--repo_dir (required) Path to the ProMaya repository root
--checkpoint (required) Path to the trained checkpoint (.pt)
--samplesheet (required) Path to the CSV samplesheet
--config <repo_dir>/config/config.yaml Path to the model config file
--outdir results/promaya_nf Output directory for the pipeline
--gpu -1 CUDA device ID (-1 for CPU)
--threshold 0.5 Threshold for classifying interaction
--gradcam true Compute Grad-CAM attributions
--run_disorder true Run IUPred/MetaPredict disorder scan per unique protein
--publish_mode copy Strategy for publishing output files (copy, symlink, move)

Resource Allocation

The pipeline requests resources per-task based on labels defined in nextflow.config. You can override these defaults in your own config or parameters file if your cluster requires specific limits:

  • Predict Tasks: 4 CPUs, 24 GB Memory, 4h Time Limit
  • Disorder Tasks: 2 CPUs, 8 GB Memory, 1h Time Limit