This tutorial describes how to create a minimum spanning tree based on Mash distances between different plasmids from a Mash database. This is the way figure 2 from our publication "Real-time plasmid transmission detection pipeline" (PMID: 39470278) was produced. Please see Tutorial for Real-time Plasmid Transmission Detection and Alert from Long-read Sequencing Data to learn how to create a Mash plasmid database.

Please Note: Mash Plasmid Typing requires the Long-read Data Plasmid Transmission Analysis Module

Exporting metadata and distance matrix files

  • Step 1: Click Options -> Mash Plasmid Databases. Select the database that contains the plasmids you want to visualize and click View Mash Database. Wait until fetching the MOB-suite results is finished. This may take a few seconds, depending on the size of the database.
  • Step 2: Optionally, add further metadata columns by clicking AddColumnToTable.png Add Additional Database Fields as Columns. Then press Button16-Export.gif Export Table and save the table as an Excel file. Remember where you save it, you will need it in a later step.
  • Step 3: Select all rows using ctrl+A, then press the Distancematrix.png Mash Distance Matrix button. Decide whether you want to perform size compensation or not and press OK. Wait until Mash finished running.
  • Step 4: In the upcoming window, press Button16-Export.gif Export matrix, name the file and save it in MEGA (.meg) format. Close all windows except the software itself.

Import and open distance matrix as comparison table

  • Step 1: Go to File -> Open File(s), select the Excel file you created before, press Open and then Open in comparison table. Press OK.
  • Step 2: In the comparison table, go to File -> Import Distance Matrix, select the MEGA-file you created before and press Import Distance Matrix. Leave the Matching column field as Plasmid Name and press OK.

Draw and export the minimum spanning tree

From this table you can now create the minimum spanning tree by pressing Mst.png. The number on the lines represent the Mash distance scaled by 10,000. See Minimum Spanning Tree to learn how to modify the view. Press Export.gif Export MST and save the tree as .svg for further editing in graphic design tools, e.g. Inkscape.