vSNP3 GUI · step-by-step training (SOP)

Find where two outbreaks came from

You will install the vSNP3 web tool, download 26 real samples, run them, and read the answer from a tree. Every step shows what to do and what you should see.

TIME

About 3 hours the first time. Most of it is waiting while the computer downloads and works. Slow internet makes it longer.

YOU NEED

A Mac, Linux or Windows computer, internet, and about 50 GB of free disk space.

TESTED

1 October 2026, vSNP GUI v0.4.127, vsnp3 3.36. Newer versions may look a little different.

To move: click Next → at the bottom, or press the → arrow key.

vSNP3 GUI training · Kapur Lab · Penn State

Workflow/Step 1 and Step 2

The vSNP3 workflow.

Step 1 runs once per sample and fills a database that only grows. Step 2 works from the VCF files those alignments produced: defining SNPs make the groups, and each group is read as a tree and a SNP table.

STEP 1 · once per sample · statistics checked before Step 2 01 FASTQ in R1 R2 one pair per sample 02 Step 1 · align to a reference FASTA reference genome SNP no coverage 03 one VCF each .vcf SNPs + gaps 04 VCF database it only grows · one database per reference type STEP 2 · re-run over any selection 05 Defining SNPs MTBC0:1263022 MTBC0:2096350 MTBC0:643174 a few absolute positions split the set 06 A tree and a SNP table per group Lineage4_group1 · n=18 A C G T A C G C G Lineage4_group2 · n=12 A G T A C T A Lineage2_group1 · n=9 A C G G T A T A C G each group its own SNP profile, and the tree that follows from it vSNP = validate SNP — every call is checkable
vSNP3 · Kapur Lab · Penn State · USDA

Start

How to use this guide

Each step has two parts.

▶ Do this

What you click or type. In the pictures, orange boxes with numbers show where, in order.

✔ You should see

What the screen shows after the step. In the pictures, green boxes show what to check.

  • Words in a grey box, like Download, are the exact words on your screen.
  • Click Copy next to a command, then paste it. On a Mac: ⌘ Command + V. On Linux and Windows: Ctrl + V in the browser, Ctrl + Shift + V in the terminal.
  • Click any picture to make it bigger. Click again to close it.
  • In Part C, the line On the vSNP3 page: … › Step 1 › … under each title shows which part of the long vSNP3 page the step uses.
  • At the bottom, My computer picks macOS, Linux or Windows. The install pages change to match your computer.
  • Use the Contents menu at the bottom to jump to any page.

TipPut this guide and the vSNP3 page side by side on your screen. Then you can read and click at the same time.

vSNP3 GUI training · Kapur Lab · Penn State

The story

Our “database”: samples from Pichigan and Dexas

A map of a made-up country, like the United States but not the same. Two states are shaded: Dexas and Pichigan, with seven made-up counties labelled countyQ, countyH, countyG, countyF, countyH, countyX and countyD.

Bovine tuberculosis (Mycobacterium bovis) was found in two states.

21 samples came from known places: 7 from Pichigan and 14 from Dexas. Each one has a county name.

In this training, these 21 samples are our database: samples we already know.

Made upThe DNA data is real and public. Everything else is made up for training: the country, the states, the counties and the outbreaks. Pichigan and Dexas look like real places, but they are not. Every sample name ends in _notReal.

vSNP3 GUI training · Kapur Lab · Penn State

The story

Then two outbreaks start. Where did they come from?

The made-up country again: Dexas and Pichigan with their counties, Bisconsin as OUTBREAK1 and New Rexico as OUTBREAK2 in purple, and dots for previous outbreaks elsewhere.

OUTBREAK1: 3 new samples from Bisconsin.

OUTBREAK2: 2 new samples from New Rexico.

We do not know where these 5 samples came from. They are our unknowns.

Your mission: compare the 5 unknowns with the 21 database samples. Which county is each outbreak closest to?

HowvSNP3 finds the small DNA differences (SNPs) between samples. Few differences = closely related.

In real lifeThis training's database has known samples from only two states, Pichigan and Dexas. A real database would hold many more: every dot on the map is a past outbreak, and its samples could be in the database too.

vSNP3 GUI training · Kapur Lab · Penn State

The story

Your 26 samples

All 26 are Mycobacterium bovis, the bacterium that causes bovine TB.

You paste them in step C4. One per line, in this order.
SRA numberYearStateCounty / groupKind
SRR336851532019PichigancountyHDatabase
SRR339536412022PichigancountyDDatabase
SRR335610212022PichigancountyDDatabase
SRR336654342019PichigancountyDDatabase
SRR338290552021PichigancountyXDatabase
SRR337362482019PichigancountyXDatabase
SRR338186262021PichigancountyXDatabase
SRR336801852019DexascountyQDatabase
SRR336457472018DexascountyQDatabase
SRR336678182019DexascountyQDatabase
SRR337932132020DexascountyHDatabase
SRR338689192021DexascountyHDatabase
SRR338173332021DexascountyHDatabase
SRA numberYearStateCounty / groupKind
SRR338429872021DexascountyHDatabase
SRR338911982021DexascountyHDatabase
SRR338913412021DexascountyHDatabase
SRR339388482022DexascountyHDatabase
SRR339146542022DexascountyFDatabase
SRR337502582020DexascountyGDatabase
SRR339145272022DexascountyGDatabase
SRR335852142018DexascountyGDatabase
SRR337906572020BisconsinOUTBREAK1Unknown
SRR337150752019BisconsinOUTBREAK1Unknown
SRR337531312020BisconsinOUTBREAK1Unknown
SRR336721402019New RexicoOUTBREAK2Unknown
SRR336291832018New RexicoOUTBREAK2Unknown

An SRA number is the ID of one sample's DNA reads in a free public library (the NCBI Sequence Read Archive). Black = database (21). ● Red = unknown (5).

Made-up detailsThe SRA numbers and their DNA reads are real and public. The year, state and county in this table are made up for this training, to keep it easy to follow. They are not the real details that the SRA stores for these samples.

vSNP3 GUI training · Kapur Lab · Penn State

The story

The plan

Four parts: A, B, C and D. Part C has four stages. The times are for a normal laptop.

  1. AInstall

    45–90 minutes

    Only the first time. You copy a few terminal commands from this guide.

  2. BStart here next time

    5 min

    How to open, check and update the tools on another day. Keep these pages.

  3. CRun the analysis

    1–2 hours

    In the vSNP3 web page, in four stages:

    1. C1–C5
      Get the data. Make a project and download the 26 samples.10–30 min
    2. C6–C10
      Step 1: align. Line up each sample on the reference genome and check its quality.20–60 min
    3. C11–C14
      Step 2: compare. Add the sample names, then compare all 26 samples.5 min
    4. C15–C20
      Read the answer. Find the red samples in the tree and count the SNPs.15 min
  4. DFinish

    5 min

    Check yourself, fix problems, and stop for today.

Already installed?Go to Part B: Start here next time.

Slow internet?The times are for good internet. Parts A and C download several GB. On a slow connection they can take two or three times longer.

vSNP3 GUI training · Kapur Lab · Penn State

Part A

Install (first time only)

You type a few commands in a terminal: a window where you give the computer text commands. Copy each command from this guide. You do not need to know programming.

Check My computer at the bottom of the screen first. It must show your computer.

Already installed? Skip to Part B →
vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A1 · What you need

Check this list before you start.

  • A Mac with macOS 13 or newer (Apple chip or Intel chip).
  • Your Mac password. You need it once, to install Apple's command-line tools.
  • About 50 GB of free disk space, and a good internet connection.
  • A Linux computer, for example Ubuntu 22.04 or 24.04, with an Intel or AMD processor (some tools do not run on ARM).
  • Your password, for the sudo command (installing git).
  • About 50 GB of free disk space, and a good internet connection.
  • Windows 10 (version 22H2) or Windows 11, on a PC with an Intel or AMD processor (some tools do not run on Windows on ARM).
  • An administrator account. You use it once, to turn on WSL (Linux inside Windows).
  • About 50 GB of free disk space, and a good internet connection.
  • The tools run inside Ubuntu (Linux). You open the vSNP3 page in your normal Windows browser.

TimeAbout 45–90 minutes with good internet. Most of it is downloading: about 7 GB. On slow internet it takes longer, sometimes two or three times as long. That is normal: plan extra time, and keep the computer plugged in and awake.

Wrong computer?Look at My computer at the bottom of the screen. Click your type of computer.

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A2 · Open the Terminal macOS

The Terminal app is already on every Mac.

▶ Do this

  1. Press ⌘ Command + Space. A search box opens.
  2. Type Terminal.
  3. Press Return.

✔ You should see

A window with text and a blinking cursor. The last line ends with % or $.

TipKeep Terminal in the Dock: right-click its icon, then Options → Keep in Dock.

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A2 · Open a terminal Linux

Most Linux computers open a terminal with one key combination.

▶ Do this

  1. Press Ctrl + Alt + T.
  2. Or open the app menu and search for Terminal.

✔ You should see

A window with text and a blinking cursor. The last line ends with $.

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A2 · Turn on Linux for Windows (WSL) Windows

Windows runs the tools inside Ubuntu, a version of Linux. You do this once.

▶ Do this

  1. Click Start. Type PowerShell.
  2. Right-click Windows PowerShell. Click Run as administrator. Click Yes.
  3. Copy this command, paste it in the blue window, and press Enter:
    wsl --install
  4. When it says the changes need a restart, restart the computer.

✔ You should see

After the restart, an Ubuntu window opens by itself. It asks you to make a user name and a password.

  • Type a short user name (small letters, no spaces). Press Enter.
  • Type a password. Press Enter. Type it again.

RememberYou do not see the password while you type it. This is normal. Write the password down: you need it in the next step.

Next timeOpen Ubuntu from the Start menu: click Start, type Ubuntu, press Enter. In this guide, “terminal” means this Ubuntu window.

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A3 · Get git and Rosetta 2 macOS

git downloads the tools for you. On a Mac it comes with Apple's free command-line tools.

▶ Do this

  1. Copy this command. Paste it in Terminal. Press Return.
    xcode-select --install
  2. A window asks to install the command line developer tools. Click Install, then Agree.
  3. Wait until it says the software was installed (5–15 minutes, longer on slow internet). Click Done.
  4. Check it:
    git --version
  5. Apple chip only (M1, M2, M3, M4 …): install Rosetta 2. If it asks for your password, type it and press Return.
    softwareupdate --install-rosetta --agree-to-license

✔ You should see

Step 4 shows a version number:

Any number is fine. After step 5, the prompt (%) comes back.

Which chip?Click the Apple menu (the apple at the top left of the screen), then About This Mac. Chip: Apple M… = Apple chip: do step 5. Processor: Intel = Intel chip: skip step 5.

Why Rosetta 2?Some programs that the tools use are made only for Intel chips. Rosetta 2 is Apple's free helper that runs them on an Apple chip.

Already installed?If Terminal says command line tools are already installed, that is good. Go on to step 4.

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A3 · Get git and curl LinuxWindows

git downloads the tools for you. curl downloads files.

▶ Do this

  1. Copy this command. Paste it in the terminal. Press Enter.
    sudo apt update && sudo apt install -y git curl
  2. Type your password and press Enter. (You do not see it while you type.)
  3. Wait until you see the prompt again (the line ending in $).
  4. Check it:
    git --version

✔ You should see

A version number:

Any number is fine.

Not Ubuntu?On Fedora use sudo dnf install -y git curl. Many computers already have git.

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A4 · Download Miniforge

The same command works on every computer. It picks the right file for you.

▶ Do this

  1. Go to your home folder:
    cd ~
  2. Download Miniforge (one long line; copy it with the button):
    curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"

✔ You should see

A progress table. It ends with 100 on the left. Then the prompt comes back. The file is about 125 MB: seconds on fast internet, a few minutes on slow internet.

What is Miniforge?A free installer for conda. Conda installs vSNP3 and all the programs it needs, in their own folder. It does not change other programs on your computer.

Is it safe?Yes. Miniforge is free, open-source software from conda-forge, a large community project that scientists all over the world use every day. The command downloads it straight from conda-forge's official page on GitHub (github.com, a website owned by Microsoft). This training's tools come from GitHub too.

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A5 · Run the Miniforge installer

Copy the command, paste it, press Enter.

bash Miniforge3-$(uname)-$(uname -m).sh

The installer asks 5 questions. Answer them like this:

When you seeDo this
Please, press ENTER to continuePress Enter
License text, and --More-- at the bottomPress Space until the next question comes
Do you accept the license terms? [yes|no]Type yes and press Enter
Press ENTER to confirm the locationPress Enter
Proceed with initialization? [yes|no]  [no] >>>Type yes and press Enter

ImportantThe last question says [no]. Do not just press Enter. Type yes.

✔ You should see

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A6 · Close the terminal and open a new one

Do not skip this step. The new window knows about conda. The old one does not.

▶ Do this

  1. Quit Terminal: press ⌘ Command + Q. Then open Terminal again (step A2).Close the terminal window. Open a new one (step A2).Close the Ubuntu window. Open Ubuntu again from the Start menu.
  2. Check conda:
    conda --version

✔ You should see

The prompt now starts with (base), and conda shows its version:

A newer number is fine.

Why this mattersThe installer has just changed your terminal's start-up settings, so that the terminal can find conda. A terminal that is already open still uses the old settings: only a new terminal reads the new ones. If you skip this step, the next steps fail with “conda: command not found”.

If it says “conda: command not found”You answered no to the last question in A5. Run this, then do A6 again: ~/miniforge3/bin/conda init

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A7 · Download the tools

This gets the installer and the dashboard. It also decides where your tools live.

▶ Do this

  1. Download the tool suite:
    git clone https://github.com/kapurlab/bioinformatic_diagnostic_tools.git
  2. Go into its folder:
    cd bioinformatic_diagnostic_tools
  3. Check where you are:
    pwd

✔ You should see

The last line is the full address of the tools folder, with your own user name instead of you:

Remember this folderYour tools now live in bioinformatic_diagnostic_tools, in your home folder. Every bin/bdtools command works only from inside this folder. When you come back in a few weeks or months, always start with cd ~/bioinformatic_diagnostic_tools (Part B). Write the pwd line down, or keep this page.

To see these folders in Finder: press ⌘ Command + Shift + H (your home folder).

To see these folders: open the Files app and click Home.

To see these folders in Windows: open File Explorer, then Linux → Ubuntu → home → your user name.

bdtoolsbdtools is the control program for these tools. It installs them, checks them, updates them and opens them.

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A8 · Install the tools

One command installs vSNP3 and the other tools of the suite, with everything they need.

▶ Do this

  1. Install all the tools (vSNP3 and the others in the suite):
    bin/bdtools install all
  2. Wait while many lines go by: about 30–60 minutes (our test: 28 minutes). Keep the window open.
  3. Near the end it asks: Set up reference databases now (Kraken2, BLAST, vSNP)? [y/N]. Type N and press Enter.

✔ You should see

A check list for every tool. vsnp_gui must show only green ✓ marks. Then the dashboard opens (A9).

Slow internet?This step downloads about 7 GB. One tool, kSNP, fetches a large package (520 MB, or about 1 GB on a Mac) from SourceForge, which is often slow: in our test that part alone took 19 minutes. On slow internet the whole step can take an hour or more. That is normal.

Why N?vSNP3 already has the reference genome we need. y downloads more than 50 GB of databases for other tools. You can add them later with bin/bdtools setup-databases.

✗ for two tools? That is expectedAMRFinderPlus and Kraken ID-Parse need extra databases, so the last lines say 2 tool(s) need attention. This training uses only vSNP3, so you can leave them. To set them up later: bin/bdtools setup-databases amrfinder (small), or bin/bdtools setup-databases kraken blast (very large). Lines that start with – are only notes.

vSNP3 GUI training · Kapur Lab · Penn State

A. Install (first time only)

A9 · The dashboard opens

This is your home page for the tools.

▶ Do this

  1. Wait. Your web browser opens by itself.
  2. If no browser opens: find the line Open this in your web browser: in the terminal. Copy the address under it into your browser.
  3. Leave the terminal window open. The tools stop when it closes.

✔ You should see

The Bioinformatic Diagnostic Tools dashboard, with a card for each tool. vSNP3 (SNP analysis & phylogeny) is the first card, with a Launch button.

The dashboard: the vSNP3 card with its Launch button, and the AMRFinderPlus card, which says needs setup.

Needs setup?Two cards, AMRFinderPlus and Kraken ID-Parse, say needs setup: they need the databases you skipped in A8. Some cards also show a ⚠ note. This training does not use those tools, so you can ignore both.

Done!The install is finished. You never need to do Part A again on this computer.

vSNP3 GUI training · Kapur Lab · Penn State

Part B

Start here next time

Installed the tools some time ago? These three pages show how to open them again, check them, and update them. Most of it is done on the dashboard page.

If you just finished Part A, the dashboard is already open. Read Part B once, then go to Part C.

Go to Part C: run the analysis →
vSNP3 GUI training · Kapur Lab · Penn State

B. Start here next time

B1 · Open the dashboard again

Two commands. Do this every time you want to use the tools.

▶ Do this

  1. Open a terminal (step A2).
  2. Go to the tools folder:
    cd ~/bioinformatic_diagnostic_tools
  3. Start the dashboard:
    bin/bdtools dashboard

✔ You should see

The terminal prints the dashboard's address and stays busy. Leave it open.

Your browser opens the dashboard, the same page as in step A9. On Linux the address ends with ?t= and a key: if you copy it by hand, copy all of it.

The dashboard again: the tool cards, vSNP3 first.

Even easierMake a Desktop icon once: run bin/bdtools make-launcher. Then double-click Kapur Lab Dashboard on your Desktop to start the dashboard.

Even easierMake a menu icon once: run bin/bdtools make-launcher. Then open Kapur Lab Dashboard from your applications menu.

WindowsOpen Ubuntu first (Start → Ubuntu). The dashboard address works in your normal Windows browser.

vSNP3 GUI training · Kapur Lab · Penn State

B. Start here next time

B2 · The dashboard: check, update, restart, stop

Once the dashboard is open, its page does the rest. Keep this page.

I want to…On the dashboard pageOr in the terminal
Check that the tools are readyLook at the cards. A ready tool shows only its version. A tool with a problem says needs setup and lists the fix.bin/bdtools doctor
See if there is a newer versionAt the bottom: ✓ Up to date or ↑ Updates available. Click Re-check to look again.bin/bdtools check-updates
UpdateClick the numbered buttons at the bottom, in order. See B3.git pull
bin/bdtools update all
Restart the dashboardClick ↻ Restart dashboard at the bottom.bin/bdtools dashboard --restart
Stop everythingClick ⏻ Shut down at the bottom.Ctrl + C
The bottom of the dashboard: the update box with Re-check, and the Restart dashboard and Shut down buttons.
The bottom of the dashboard page: the update box (green), and the Restart dashboard and Shut down buttons (orange).

Terminal commandsType them inside the tools folder: first cd ~/bioinformatic_diagnostic_tools. The dashboard must be running for its buttons to work (B1).

Your filesYour projects are in the projects folder in your home folder. Shut down and updates do not delete them.

vSNP3 GUI training · Kapur Lab · Penn State

B. Start here next time

B3 · Update the tools

New versions fix problems. The dashboard tells you when there is one.

▶ Do this

On the dashboard, scroll to the bottom. ✓ Up to date means there is nothing to do.

  1. If it says ↑ Updates available, click the button with the number 1 (here 1 Update bdtools). A box asks if you are sure: click OK.
  2. Wait until the log says Update finished and ✅ Finished. Then click ↻ Restart dashboard and OK.
  3. The box checks again. If a button is left (here 1 Install tool updates (1)), click it and OK. It rebuilds the tool: a few minutes.
  4. When it says ✅ Finished, click ↻ Restart dashboard again. Then click Launch on the vSNP3 card.
The update box: Updates available, with the numbered update buttons.

✔ You should see

Each update ends with Update finished and ✅ Finished under its log. After the last restart, the box says ✓ Up to date and the vSNP3 card shows the new version number. An old vSNP3 tab now says vsnp_gui is not running — launch it from the dashboard: close it and click Launch.

The update log after the update has finished.

Slow internet?An update downloads new files, and may rebuild a tool. It takes a few minutes, longer on slow internet. Do not close the terminal while it runs.

In the terminalThe same, typed in the tools folder: git pull, then bin/bdtools update all, then bin/bdtools dashboard --restart. Updates keep your projects.

vSNP3 GUI training · Kapur Lab · Penn State

Part C

Run the analysis

Now you work in the web browser. You create a project, download the 26 samples, run Step 1 and Step 2, and read the tree.

The vSNP3 page is long. You scroll down as you go: Projects → Step 1 → Step 2.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C1 · Open vSNP3

vSNP3 opens in its own tab. Keep the dashboard tab open too.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

On the dashboard, find the card SNP analysis & phylogeny.

  1. Click Launch. (When vSNP3 is already running, the button says Open.)
The vSNP3 card with the Launch button marked 1.

✔ You should see

A new browser tab: vSNP GUI and its version number (here v0.4.127; yours may be newer). At the top: PROJECT None.

The top of the vSNP GUI page with Settings.

WaitIf the tab says vsnp_gui is starting … Reload in a few seconds, wait 5 seconds and reload the page.

SettingsYou do not need to change anything in Settings. Your own name shows in the paths instead of “trainee”.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C2 · Create a project

A project is a folder that keeps one analysis together.

On the vSNP3 page: Settings › Projects & Inputs → Projects › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

Scroll down to Projects.

  1. Click the box New project name (e.g. LSDV_India) and type Outbreak_training.
  2. In the list -- reference (optional) --, choose Mycobacterium_AF2122.
  3. Click Create.
The Projects panel with the name typed (1), the reference chosen (2) and the Create button (3).

✔ You should see

A new card: Outbreak_training, with a green tag Mycobacterium_AF2122 and FASTQ: 0 | Step1: 0 | VCF DB: 0.

The new Outbreak_training project card.

Why this reference?A reference is a known, complete genome. Mycobacterium_AF2122 is the standard M. bovis genome. Our samples are M. bovis.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C3 · Open the project

Click the project before you do anything else.

On the vSNP3 page: Settings › Projects & Inputs → Projects › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

  1. Click the Outbreak_training card.
The project card marked 1.

✔ You should see

The card gets a red outline. At the top of the page: PROJECT Outbreak_training. The Download button is now dark green.

The selected project and the Inputs panel with the Download button ready.

ImportantA new project does not open by itself. Always click it first. If buttons are pale and do nothing, no project is open.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C4 · Download the 26 samples

vSNP3 downloads the DNA reads for you.

On the vSNP3 page: Settings › Projects & Inputs → Inputs › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

First copy the 26 SRA numbers:

  1. In SRA Download, click the box SRR/SRX/SRS accessions (one per line) and paste.
  2. Leave Optional subfolder empty. Click Download.
The SRA Download box with 26 numbers pasted (1) and the Download button (2).

✔ You should see

Under the button: Downloading 26 accessions… and a timer.

The SRA Download box while it downloads, with a timer.

Where from?vSNP3 downloads the reads from a free public library (NCBI SRA, through the European copy at ENA). It downloads about 5 GB, so on slow internet this step takes a long time (see C5).

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C5 · Wait for the download

Each sample has two files: R1 and R2 (the two ends of each DNA piece).

On the vSNP3 page: Settings › Projects & Inputs → Inputs › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

  1. Wait. Do not close the tab or the terminal.
  2. You can follow the progress in Live Logs at the bottom of the page.

✔ You should see

Download complete and Last download: 26 downloaded. On the right, Ready to run (26 samples) lists every sample as paired · R1+R2.

Download complete, 26 downloaded, and the Ready to run list with 26 samples.

TimeAbout 10–30 minutes with good internet (5.1 GB). On slow internet it can take 1–2 hours. Our test took 16 minutes.

If some failedSometimes the download server refuses a file. Then the box says Failed — 1 and names the sample. Copy all 26 again, paste them, and click Download again. Samples you already have are skipped, so only the missing ones download.

Last download: 25 downloaded, 1 failed. Failed — 1: SRR33667818.
vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C6 · Step 1: grab the samples

Step 1 needs the reads in its own folder. One button does it.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

Scroll down to Step 1. Reference already says Mycobacterium_AF2122.

  1. Do not tick any boxes. Click Grab ready-to-run samples.
The Step 1 panel with the Grab ready-to-run samples button marked 1.

✔ You should see

52 file(s) staged. The Samples list shows 26 samples, each Not Started.

52 files staged and the sample list with Not Started badges.

Why 52?26 samples × 2 files (R1 and R2) = 52 files.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C7 · Step 1: run

This is the slow part. You can take a break.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

  1. Click Run (under Grab ready-to-run samples).
The Step 1 Run button marked 1.

✔ You should see

The button says Running… with a timer, and a Stop button appears. Samples change from Not Started to Running to Complete. Three run at the same time.

Step 1 running: the Running timer, the Stop button, and Complete samples.

TimeAbout 20–60 minutes on a laptop. Our test computer (a 64-core workstation) took 6 minutes.

What happensFor each sample, vSNP3 lines up millions of short reads on the reference genome and lists every place where the sample is different (a VCF file).

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C8 · Step 1: finished

When the last sample is done, vSNP3 collects the 26 results.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

  1. Wait until all 26 samples say Complete.
  2. Scroll the Samples list to check them all.

✔ You should see

All samples Complete. The button says Run again. At the bottom of the panel: vcf_database: 26 VCFs.

Step 1 finished: all samples Complete and vcf_database 26 VCFs.

New project nameThe project now shows as Outbreak_training_Mycobacterium_AF2122. vSNP3 adds the reference name. This is normal.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C9 · Check the quality

Before Step 2, check that every sample is good enough.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 → Step 1 Results › Step 2 › Live Logs

✔ You should see

Step 1 Results fills in by itself: Loaded 26 sample(s). 25 PASS and 1 REVIEW: SRR33585214, “mapping rate 89.8%”.

Step 1 Results: 25 samples PASS and one sample REVIEW, mapping rate 89.8 percent.

▶ Do this

  1. Scroll the table to the right to see Avg Depth and Mapping %. Check them with the table below.
  2. Do not tick Exclude. We keep all 26 samples.
The same table scrolled right: Avg Depth and Mapping % columns; the REVIEW sample has depth 38.1 and mapping 89.8%.
ColumnGoodOursMeaning
Avg Depth20 or more38 to 116How many reads cover each letter of the genome, on average.
Mapping %90% or more90% to 100% (one 89.8%)How many reads match the reference.
Genome Covnear 100%about 99.5%How much of the genome has reads.

Why keep SRR33585214?Its mapping rate is just under 90%, so vSNP3 asks you to look. Its depth (38) is good, so the SNP calls are still reliable.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C10 · A first clue: the Groups column

Use the SRR numbers and the sample table (page “Your 26 samples”) to see which group each state is in.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 → Step 1 Results › Step 2 › Live Logs

The Step 1 Results table scrolled to the Groups column.

Look at the Groups column. vSNP3 already sorted every sample into a group, using a few defining SNPs:

  • The Pichigan samples and the New Rexico samples are in Mbovis-04B6.
  • The Dexas samples and the Bisconsin samples are in Mbovis-04C7.

ExampleIn the picture, SRR33629183 is a New Rexico sample (red, unknown). Its group is Mbovis-04B6, the same as the Pichigan samples SRR33561021 and SRR33665434.

So farThis tells us the state. Step 2 will tell us the county.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C11 · Give the samples their names

Do this before Step 2. Then the tree shows the state and county, not only numbers.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor → Sample Metadata › Step 1 › Step 2 › Live Logs

▶ Do this

  1. Scroll up to Reference Editor. Under Reference Type, choose Mycobacterium_AF2122.
  2. On the right, find the card Sample Metadata. Click Bulk paste (tab-delimited).
  3. Copy the names: . Paste them in the box.
  4. Click Add 26 rows.
Reference Selection: Mycobacterium_AF2122 chosen under Reference Type.
The Sample Metadata card with 26 lines pasted and the Add 26 rows button.

✔ You should see

Saved — 26 added, 0 updated (26 total), a table of Original name → Display label, and vcf_database coverage: 26 / 26 samples have metadata · All samples covered.

Saved, 26 added, with the table of names.

WhyWithout names, the tree shows only SRR numbers. With names, it shows the year, state and county of each sample.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C12 · Step 2: build the comparison set

Step 2 compares a set of VCF files. First you choose and collect the set.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

Scroll down to Step 2. Box 2 says No reference databases are configured: nothing to do there.

  1. Check box 1: it is ticked and says vcf_database (26 of this project's 26 Step 1 samples collected). Leave it.
  2. In box 3, click Build comparison set.
The Step 2 panel: box 1 ticked and the Build comparison set button.

✔ You should see

Comparison set by source: vcf_database: 26 and This run compares 26 of the 26 VCFs in the set — ready to Run.

Comparison set built: 26 VCFs, ready to Run.
vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C13 · Step 2: run

Step 2 builds a SNP table and a tree for each group.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 › Step 2 › Live Logs

▶ Do this

  1. Click Run (under Step 2 Options). Do not change the options.
The Step 2 Run button marked 1.

✔ You should see

Running…, then Last Build — Step 2 complete.

Last Build: Step 2 complete.

On the right, Step 2 Results shows the new comparison with 6 groups:

Step 2 Results: Comparison 2026-10-01 · 6 groups, and its folder.

TimeAbout 1–3 minutes. Our test took 22 seconds.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C14 · Step 2 Results

Each group has its own tree and SNP tables.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 › Step 2 → Step 2 Results › Live Logs

Step 2 Results: the groups Mbovis-All, Mbovis-04, Mbovis-04B, Mbovis-04B6, Mbovis-04C and Mbovis-04C7.
GroupSamplesWhat it is
Mbovis-All 26×23026All samples in one tree. We use this one.
Mbovis-04B6 9×829Pichigan + New Rexico
Mbovis-04C7 17×7417Dexas + Bisconsin

26×230means 26 samples and 230 SNP positions. Mbovis-04, -04B and -04C are bigger family groups that contain the smaller ones.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C15 · Open the tree

A tree shows which samples are most alike.

On the vSNP3 page: Settings › Projects & Inputs › Reference Editor › Step 1 › Step 2 → Step 2 Results › Live Logs

▶ Do this

  1. Click the ▶ next to Mbovis-All. Its files open.
  2. Click View tree.
The Mbovis-All group opened, with the View tree button marked.

✔ You should see

A new tab: Tree viewer, 27 leaves. Each name is one sample. The names have the year, state and county.

The tree viewer with all 26 sample names.
vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C16 · Find the outbreak samples

The tree can colour the samples you search for.

Where: the Tree viewer tab (it opened in C15). The vSNP3 page stays open in its own tab.

▶ Do this

  1. In Scale, choose SNPs. The ruler at the top now counts SNPs.
  2. Click the box Find tip… and type OUTBREAK.
The tree viewer bar: Scale set to SNPs and OUTBREAK typed in Find tip.

✔ You should see

The 5 outbreak samples turn red: 3 Bisconsin (top) and 2 New Rexico (bottom). It says 1 of 5.

The tree with the five OUTBREAK samples in red.
vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C17 · Read the tree

Look at the black name that joins each red group.

Where: the Tree viewer tab (it opened in C15). The vSNP3 page stays open in its own tab.

The tree: the Bisconsin samples sit next to DEXAS countyF, the New Rexico samples next to PICHIGAN countyX.
  • Samples that join with short lines have few SNPs between them. They are closely related.
  • The 3 Bisconsin samples join with SRR33914654 … DEXAS_countyF.
  • The 2 New Rexico samples join with SRR33818626 … PICHIGAN_countyX.
  • The top part of the tree is Dexas (+ Bisconsin). The bottom part is Pichigan (+ New Rexico).
vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C18 · Count the SNPs: Bisconsin

A clade is a branch of the tree with everything on it.

Where: the Tree viewer tab (it opened in C15). The vSNP3 page stays open in its own tab.

▶ Do this

  1. Click the small dot where DEXAS_countyF joins the 3 Bisconsin samples. The bar says Clade: 4 samples.
  2. Click Open SNP table for clade. A table opens in a new tab.
  3. Tick Hide identical positions.
The tree with the countyF plus Bisconsin clade selected and the Open SNP table for clade button.

✔ You should see

hiding 53 of 57 positions. Only 4 columns are left. Each coloured box is a difference.

The clade SNP table: 4 samples and only 4 positions with differences.

Read itDEXAS_countyF and each Bisconsin sample differ at only 2 or 3 places out of 4.4 million letters.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C19 · Count the SNPs: New Rexico

Do the same for the other outbreak.

Where: the Tree viewer tab (it opened in C15). The vSNP3 page stays open in its own tab.

▶ Do this

Go back to the Tree viewer tab.

  1. Click the dot where PICHIGAN_countyX (SRR33818626) joins the 2 New Rexico samples. The bar says Clade: 3 samples.
  2. Click Open SNP table for clade. In the new tab, tick Hide identical positions.
The tree with the countyX plus New Rexico clade selected.

✔ You should see

hiding 53 of 56 positions. Only 3 columns are left.

The clade SNP table: 3 samples and only 3 positions with differences.

Read itPICHIGAN_countyX and each New Rexico sample differ at only 2 places. N means “no data here”: it is not a difference.

vSNP3 GUI training · Kapur Lab · Penn State

C. Run the analysis

C20 · The answer

You found it. Here is what vSNP3 shows.

The finished tree: OUTBREAK1 (Bisconsin) sits with Dexas countyF, OUTBREAK2 (New Rexico) with Pichigan countyX.

OUTBREAK1 · Bisconsin

is closest to

Dexas · countyF

2–3 SNPs from sample SRR33914654 (2022). The next closest, Dexas countyG, is 9–10 SNPs away.

OUTBREAK2 · New Rexico

is closest to

Pichigan · countyX

2 SNPs from sample SRR33818626 (2021). Every other Pichigan sample is 11 or more SNPs away.

How close is close?For TB, samples within about 5–12 SNPs may be part of the same chain of infection. The tree and the SNP table are two views of the same answer. Always look at both.

RememberThe places and outbreaks in this exercise are made up. The method is real.

vSNP3 GUI training · Kapur Lab · Penn State

D. Finish

D1 · Check yourself

Click a question to see the answer.

1. Why did we choose the reference Mycobacterium_AF2122?

Our samples are M. bovis. AF2122 is a complete M. bovis genome, so the reads match it well.

2. What does Step 1 make for each sample?

A VCF file: the list of places where the sample is different from the reference.

3. One sample said REVIEW. Why did we keep it?

Its mapping rate (89.8%) was just under 90%, but its depth (38) was good. The SNP calls are still reliable.

4. What does a short line between two samples in the tree mean?

Few SNPs between them. They are closely related.

5. Which county is OUTBREAK2 (New Rexico) closest to?

Pichigan countyX, 2 SNPs away.

vSNP3 GUI training · Kapur Lab · Penn State

D. Finish

D2 · If something goes wrong

Most problems have a simple fix.

ProblemFix
conda: command not foundClose the terminal and open a new one (A6). Still there? Run ~/miniforge3/bin/conda init, then open a new terminal.
bin/bdtools: No such file or directoryYou are in the wrong folder. Run cd ~/bioinformatic_diagnostic_tools first.
The browser says it can't connect to 127.0.0.1:8080The dashboard is not running. Start it (B1). Keep the terminal open.
Buttons are pale and do nothingNo project is open. Click the project card (C3).
The download says Failed for some samplesPaste all 26 again and click Download. Only the missing samples download.
A sample in Step 1 says ErrorClick View log next to it to see why. To try again, tick Force re-run and click Run. (This runs all 26 samples again, so it takes the same time as the first run.)
The tree shows only SRR numbersThe names were not added before Step 2. Do C11, then run Step 2 again (C13).
Anything elseLook at the dashboard: a card that says needs setup lists the fix. Or, in the tools folder, run bin/bdtools doctor: it lists what is wrong and the command that fixes it.
vSNP3 GUI training · Kapur Lab · Penn State

D. Finish

D3 · Stop for today

Your project and results stay on your computer.

▶ Do this

  1. Go to the dashboard tab. Click ⏻ Shut down at the bottom.
  2. A box asks Shut the dashboard completely down? Click OK.

✔ You should see

Dashboard shut down. You can close the tabs and the terminal.

Dashboard shut down. Everything has stopped.

Your work is savedEverything is in projects/Outbreak_training in your home folder. Next time, open the dashboard (B1) and click your project.

vSNP3 GUI training · Kapur Lab · Penn State

D. Finish

D4 · More training

Keep learning.

Try it againMake a new project with mtbc0_v1.1 as the reference. It needs bin/bdtools setup-databases --home vsnp-refs vsnp-deps first, then a restart of the dashboard. In Step 2, untick the four reference databases in box 2, so that only your 26 samples are compared. The groups get different names (La1_bovis04B6 and La1_bovis04C3-e), but the answer is the same.

vSNP3 GUI training · Kapur Lab · Penn State