Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 2ff9d95

Browse files
committed
Add questions/objectives to remaining episodes
1 parent ac3f06e commit 2ff9d95

5 files changed

Lines changed: 82 additions & 10 deletions

File tree

episodes/04_setup_project.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ title: "Project Setup"
33
teaching: 1
44
exercises: 5
55
---
6+
:::::::::::::::::::::::::::::::::::::: questions
7+
8+
- How do I create a directory with the necessary files for this class?
9+
10+
::::::::::::::::::::::::::::::::::::::::::::::::
11+
::::::::::::::::::::::::::::::::::::: objectives
12+
13+
- Create a "SnakemakeWorkflow" directory with scripts and cached container images
14+
15+
::::::::::::::::::::::::::::::::::::::::::::::::
16+
617

718
## Log into OSC
819
- Visit https://ondemand.osc.edu/.

episodes/05_setup_env.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@ title: "Environment Setup"
33
teaching: 1
44
exercises: 4
55
---
6+
:::::::::::::::::::::::::::::::::::::: questions
7+
8+
- How do I activate the Snakemake for this class?
9+
- How do I start an interactive job to run snakemake on a worker node?
10+
11+
::::::::::::::::::::::::::::::::::::::::::::::::
12+
::::::::::::::::::::::::::::::::::::: objectives
13+
14+
- Setup the shell environment
15+
- Verify snakemake and R versions
16+
- Start an interactive session on a worker node
17+
18+
::::::::::::::::::::::::::::::::::::::::::::::::
619

720
## Software Environment Setup
821

episodes/10_reuse_workflow.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,28 @@ title: "Reuse another workflow"
33
teaching: 10
44
exercises: 2
55
---
6+
:::::::::::::::::::::::::::::::::::::: questions
67

8+
- What do I need to do to re-use another Snakemake workflow?
9+
10+
::::::::::::::::::::::::::::::::::::::::::::::::
11+
::::::::::::::::::::::::::::::::::::: objectives
12+
13+
- Add a module to our Snakefile to re-use parts of the BGNN_Core_Workflow workflow
14+
- Make changes so our workflow will be filename compatible
15+
16+
::::::::::::::::::::::::::::::::::::::::::::::::
17+
18+
## Reusing Another Workflow
719
To re-use a workflow you generally need:
820

9-
- where to find workflow - github "hdr-bgnn/BGNN_Core_Workflow"
10-
- what is the relative path to the Snakefile "workflow/Snakefile"
11-
- what tag or version to use "1.0.0"
12-
- what file naming convention is the workflow using
21+
- Where to find workflow? - github "hdr-bgnn/BGNN_Core_Workflow"
22+
- What is the relative path to the Snakefile? "workflow/Snakefile"
23+
- What tag or version to use? "1.0.0"
24+
- What file naming convention is the workflow using?
25+
- What dependencies must be manually installed?
1326

27+
See source code for the workflow
1428
https://github.com/hdr-bgnn/BGNN_Core_Workflow/blob/main/workflow/Snakefile#L19
1529

1630
```
@@ -70,3 +84,5 @@ use rule segment_image from bgnn_core
7084
```bash
7185
snakemake -c1 --use-singularity Segmented/bj373514_segmented.png
7286
```
87+
88+

episodes/11_summary_rule.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ teaching: 10
44
exercises: 2
55
---
66

7+
:::::::::::::::::::::::::::::::::::::: questions
8+
9+
- How can we specify a rule that has many dynamic input files?
10+
11+
::::::::::::::::::::::::::::::::::::::::::::::::
12+
::::::::::::::::::::::::::::::::::::: objectives
13+
14+
- Add a summary rule that requires Segmented images
15+
- Use expand function to simplify creating filenames
16+
17+
::::::::::::::::::::::::::::::::::::::::::::::::
18+
19+
720
Add summary_report to config.yaml:
821
```bash
922
cat Scripts/SummaryReport.R
@@ -43,10 +56,4 @@ rule summary:
4356
```
4457

4558

46-
Where did my logs go?
47-
```bash
48-
ls logs
49-
ls logs/
50-
```
51-
5259

episodes/12_run_on_slurm.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ teaching: 10
44
exercises: 2
55
---
66

7+
:::::::::::::::::::::::::::::::::::::: questions
8+
9+
- How can can I add memory, cpu, and gpu requirements to a rule?
10+
- How can can I scale up my workflow in a cluster?
11+
- What logs are created when running my workflow with a cluster?
12+
13+
::::::::::::::::::::::::::::::::::::::::::::::::
14+
::::::::::::::::::::::::::::::::::::: objectives
15+
16+
- Add a memory requirement to a rule
17+
- Create sbatch script to run a workflow at scale
18+
- Delete all outputs
19+
- Run the workflow at scale
20+
21+
::::::::::::::::::::::::::::::::::::::::::::::::
22+
723
## Problems with way we have been running snakemake
824
- Only using a single node so limited scaling
925
- Must keep our terminal window connected or the job might stop
@@ -53,6 +69,15 @@ Run snakemake in the background scaling up
5369
sbatch run-workflow.sh -c10
5470
```
5571

72+
## Monitor job
5673
```
5774
squeue -u $LOGNAME
5875
```
76+
77+
## Notice new job logs
78+
79+
Where did my logs go?
80+
```bash
81+
ls logs
82+
ls logs/
83+
```

0 commit comments

Comments
 (0)