Skip to content

Conda workshop teaching notes

Marisa Lim edited this page Nov 14, 2021 · 10 revisions

Teaching with the CFDE Intro to Conda workshop module

Hello! If you'd like to use our training materials to teach an Introduction to Conda workshop, read on!

If you have questions or suggestions for these Conda workshop resources, submit all training suggestions via our CFDE HelpDesk: [email protected].

Table of Contents

Before workshop

  • Prepare workshop notes in a shareable document (i.e., hackMD). Alternatively, teach from a GitHub wiki page (but it's not as easy to share links to specific sections, and lacks some of the nice aesthetic formatting that hackMD allows). More info below.
  • Prepare workshop binder with example code script; test that all commands run smoothly! The binder for this workshop lives here.
  • Prepare pre- and post-workshop surveys. Send pre-workshop survey with confirmation email at least 1 day before the workshop.
  • For online teaching, practice screen set up when sharing screen - make sure you can find the Zoom chat, teaching team communications (i.e., slack), and Zoom participants list (to keep an eye on raised hands), in addition to the windows you're sharing.
  • Determine team roles, i.e., Who is leading? If co-teaching, when do you switch? (we write "Instructor Switch!" in the notes for reminders) Who is the moderator? Who are the helpers? Make sure the moderator has the links to share and knows when to share them throughout the workshop.

Creating workshop notes

  • A template HackMD version of the workshop notes is available here - feel free to use it as a starting point for your own workshop!
  • These notes are written in Markdown format and we typically share them as a hackmd.io shareable document. HackMD docs can be interactively and collaboratively edited, making it possible for real-time editing during workshops as well.
  • Information that should be edited is highlighted in yellow in the template.
  • If you are co-teaching the material, look for the highlighted "Instructor switch!" placeholders in the notes - these are spots where we switched teaching between 2 instructors.
  • During the workshop, we use the Zoom raised hand reaction to gauge participation. In the workshop notes, we have placeholders for check-ins (e.g., "Did the binder load? Put up a ✋ on Zoom if you see Rstudio in your web browser.")
  • We share these notes with workshop attendees at least 1 day before the workshop.

Preparing to teach materials

  • The workshop notes are a streamlined version of the lesson on the CFDE training website. To prepare for teaching the material, it's helpful to review the lesson, as well as practice teaching with the binder and your computer screen arrangement.
  • Feel free to use our binder or fork the GitHub repo to create your own copy of the binder and/or workshop commands file. Our binder uses an RStudio interface and works just like a local installation of RStudio (in fact, we sometimes use a local installation as a back-up if the binder is slow to launch or times out while we're teaching).
  • During the introduction section of the workshop, we provide some background and motivation for using Conda and virtual software environments. Under the "Let's get started" section, we also briefly note why we teach with the binder/RStudio interface, as most users will probably not use this approach in their day-to-day interactions with Conda (reasons noted below, but essentially it is because binder/RStudio are excellent teaching tools!).
  • We recommend changing the RStudio panel arrangement to make it easier to view the workshop commands sheet and the terminal panels - this step is shown in the short video at the top of this lesson page. Prior to initializing Conda, it's helpful (especially if attendees are not familiar with RStudio) to take a few minutes to walk through how to use RStudio once the binder launches (e.g., orient them to the different panels and show how to execute code from the workshop commands file).
  • For the exercises, we typically give attendees 5-10 minutes total to work on them before starting to demo solutions. If there's extra time, we have a bonus activity about Mamba.

During workshop

Approximate schedule

These times are designed for a 2-hour workshop, e.g., 10am-noon:

Time Duration Section
10:00-10:20 20 mins Set up/Introductions
10:20-10:40 20 mins Initializing Conda/Conda channels
10:40-11:00 20 mins Install software with Conda
11:00-11:20 20 mins Running FastQC
11:20-11:40 20 mins Exercises
11:40-11:45 5 mins What else can we use Conda for?
11:45-12:00 15 mins Wrap up and Q&A

Reminders:

  • Ask participants to fill out pre-workshop survey if not already done!
  • If you're teaching, make sure you can see chat/slack notifications but that they are on silent mode. Try to reduce background sound distractions (i.e., Zoom has a setting to reduce noise).
  • Have a back-up plan if your binder times out (i.e., allow for time to re-launch, have someone else from the training team prepared to share their screen, use local RStudio)
  • Be sure to share the post-workshop survey link before the end of the workshop!

Some common confusions

  • Why are we using RStudio to teach Conda?
    • We tell participants that in practice, they will likely use Conda in a terminal interface rather than RStudio, but for teaching purposes, RStudio is very helpful. We use RStudio because the binder version conveniently has a terminal interface where we can do shell scripting, and also has panels that show the workshop command script, file directory, and output plots, all in one window. Screen real estate is limited, especially when teaching virtually, so we try to limit the number of windows participants need to have open - they will need to switch between looking at their binders and the Zoom window to follow along.
  • Why are we using a binder and not our local computers?
    • In a virtual 2-hour workshop, it is much harder to troubleshoot individual installation/set up problems. The binder provides a standardized computing environment that will 1) be the same for all participants and instructors, 2) launch from any modern web browser (i.e., Chrome, Firefox, Safari), and 3) launch regardless of participant's local computer operating system (i.e., Windows, Mac, Linux).
  • I ran conda init and re-started terminal, but there's a command not found error message. What's wrong?
    • You may still see a "CommandNotFoundError" message after re-starting the terminal. As long as you ran conda init and re-started the terminal, conda should still operate correctly (test this out by running some conda commands!). This seems to be a binder-related issue that's not specific to the conda workshop link.
  • I made an environment, but the software command is not found. What's wrong?
    • Remind participants that after they've created an environment, they still need to conda activate it!

Workshop exercise solutions

There are many ways to solve the exercises from our workshop. Here is one approach!

Exercise 1

Input:

conda search blast
conda create -y -n exercise1 blast=2.9.0
conda activate exercise1
mkdir exercise1
cd exercise1
curl -o mouse.1.protein.faa.gz -L https://osf.io/v6j9x/download
curl -o zebrafish.1.protein.faa.gz -L https://osf.io/68mgf/download
gunzip *.faa.gz
head -n 11 mouse.1.protein.faa > mm-first.faa
makeblastdb -in zebrafish.1.protein.faa -dbtype prot
blastp -query mm-first.faa -db zebrafish.1.protein.faa -out mm-first.x.zebrafish.txt -outfmt 6

Output looks like this:

YP_220550.1	NP_059331.1	69.010	313	97	0	4	316	10	322	1.24e-150	426
YP_220551.1	NP_059332.1	44.509	346	188	3	1	344	1	344	8.62e-92	279
YP_220551.1	NP_059341.1	24.540	163	112	3	112	263	231	393	5.15e-06	49.7
YP_220551.1	NP_059340.1	26.804	97	65	2	98	188	200	296	0.10	35.8

The 3rd column has the percent of matching amino acids between the query mouse protein sequence file and the zebra fish reference database. Not surprisingly, 🐭 and 🐟 are not very similar! For this particular mouse sequence, it's only 69.01% similar to the zebra fish reference.

Exercise 2

conda activate fqc
conda list # check version
conda update trimmomatic # should now be 0.39
conda list --revisions
conda install --revision 1 # want to revert back to [rev 1] which had 0.36
conda list # now it's back to 0.36!

Note that conda told us that it was upgrading to 0.39 and downgrading to 0.36 - useful outputs!

After workshop

  • Collect questions from the Zoom chat and add them to a FAQ document, for example, we use the GitHub Discussions FAQ page to share with participants.
  • If applicable, archive the workshop notes. We post workshop notes to this wiki page, as it is easier to find long-term (Note: the GitHub markdown format does not retain admonition box or text highlight from hackMD).
  • Send an email with the post-workshop survey and any additional helpful links to participants 1-2 days after the workshop.
  • Summarize with your team what worked and what could be improved for the next time this workshop material is taught!
Clone this wiki locally