BioSlurm Training Workshop

Hands-on Project

For this workshop, the AI agent will help you create and submit SLURM jobs, check their status, troubleshoot problems, and adjust computing resources.

About the prompts in this workshop

Throughout this workshop, we provide example prompts that you can copy and use with the AI agent. These are suggested prompts, not commands with fixed syntax.

You do not need to memorize or reproduce the exact wording. You can describe what you want in your own words, ask follow-up questions, change your request, or ask the agent to explain something you do not understand.

Think of the prompts as examples of what information to give the agent and what questions to ask, rather than syntax that must be followed literally.

As you become more comfortable working with AI agents, you will likely use shorter prompts and develop the analysis through conversation.

 

Connect to BioHPC and start an AI Agent

If this is your first time using Codex or Claude Code on BioHPC, follow the appropriate setup instructions:

Codex: Codex setup instructions

Claude Code: Claude Code setup instructions

You can also connect using VS Code Remote SSH.

For this workshop, you only have access to computing nodes in the training partition of BioSlurm.

 

Exercise 1. Explore BioSlurm

1.1 Do I have access to BioSlurm?

1.1.1 AI prompts
1.1.2 Equivalent BASH commands

Interpretation:

 

1.2 What is happening on BioSlurm?

1.2.1 AI prompts

 

1.2.2 Equivalent BASH commands

Interpretation:

 

1.3 Ask the agent about the cluster

1.3.1 AI prompts

The agent will explain the CPU/GPU nodes and short, long, gpu, and debug partitions from the provided instructions.

 

1.3.2 Some common BASH commands

 

Exercise 2. Submit your first BioSlurm job

2.1 Generate a scatter plot with R

2.1.1 AI Prompts

 

The AI agent should create a SLURM batch script, then use the sbatch command to submit the job to BioSlurm.

After the agent submits the job, look in your project directory. Can you identify the files it created? Ask the agent to explain the SLURM batch script and the resources requested for the job.

You can also ask:

 

Exercise 3. Parallelize a Bioinformatics Analysis

3.1 Align multiple samples to a reference genome

In this exercise, we have FASTQ files from three samples. Each sample can be aligned to the reference genome independently, making this analysis suitable for parallel execution.

3.1.1 AI Prompts

 

Then ask Agent:

The agent may create multiple independent SLURM jobs or use a SLURM job array. Ask it to explain the approach it selected.

Also examine the requested CPU, memory, scratch space, and runtime. For real analyses, these requirements are not always known precisely in advance. The AI agent can estimate them, but you may need to adjust the requests based on your knowledge of the data and previous jobs.

Then let the agent submit the jobs and monitor their progress.

 

Exercise 4. Request Specific Computing Resources

Some analyses require specific hardware or computing resources. For example, GPU software may require a particular type of GPU.

BioSlurm currently has P100 and A40 GPUs, and a GPU job must explicitly request a GPU resource.

4.1 Run a GPU job

4.1.1 AI prompts

After the agent submits the job, ask:

Then perhaps:

 

Exercise 5. Run a Nextflow Workflow on BioSlurm

Nextflow is a workflow management system that can run multi-step analyses and submit individual tasks to a SLURM cluster.

In this exercise, we will use the sequencing data from Exercise 3 for variant calling.

The variant-calling workflow should:

It is OK if you do not remember the technical details of how to perform variant calling. The Bioinformatics Facility is working on curating and developing commonly used data-analysis workflows as AI skills. Once these skills are available, you will be able to load the appropriate skill and ask the AI agent to perform the analysis following the curated workflow.

For this exercise, the variant-calling skill is not provided. Instead, we will give the AI agent the necessary workflow instructions directly in the prompt. In other words, you will provide the "skill" through the prompt..

 

5.1 Ask the AI agent to set up the workflow

5.1.1 AI prompt

Then ask

Review the proposed workflow with the AI agent. Ask questions about any steps, parameters, or resource requests that you do not understand. You can also ask the agent to modify the plan if necessary.

Once you are satisfied with the plan, tell the agent: