Skip to content

Using SQMtools (pre 1.6.2) in a Windows environment

Fernando Puente-Sánchez edited this page Mar 21, 2023 · 1 revision

NOTE: Since SqueezeMeta/SQMtools v1.6.2, SQMtools can now be installed in Windows/Mac computers using BiocManager, and projects can be easily transferred between computers using sqm2zip.py. Instructions for this can be found in the ReadMe and in the PDF manual. The info below can be useful if you are working with earlier versions of SQMtools.



This document shows the way to install SQMtools in a Windows environment. It was written by Robert Gruninger (@gruningerrj). Thanks a lot Rob!

How to analyze SqueezeMeta results in Rstudio on Windows

Purpose: The purpose of this document is to outline how one can use SQMtools in a Window environment to analyze the results of SqueezeMeta pipeline run on a remote server.

Getting SqueezeMeta data from a remote server to your local windows machine

  1. On the remote server, once the run has been completed, activate the SqueezeMeta environment and run the script sqm2tables.py to generate data tables that will be used by SQMtools
  2. After you run sqm2tables.py, there will be another directory in the ‘results’ called ‘tables’. You now need to transfer the data from the remote server to your local computer. This can be done using scp, rsync or simply copying over the files using windows file explorer
  3. However you get your files over to your local computer, you need to copy 1) the ‘results’ directory in the SqueezeMeta project directory, 2) the ‘intermeditate’ directory and 3) SqueezeMeta_conf.pl. These should all be written during the SqueezeMeta.pl run.
  4. Ensure that the directory structure and names on your local computer are the same as what is on the server. For example if your output directory was called SqueezeMeta_XXX and the ‘results’, ‘intermediate’, and conf file were in that directory you must also have this same structure on your own computer for SMQtools to locate all of the required files.

Installing SQMtools in Rstudio on windows:

  1. Download the file SQMtools - For instance, go to downgit and put the URL https://github.com/jtamames/SqueezeMeta/tree/master/lib/SQMtools to download the package as a zip file
  2. Install SQMtools in R studio by going to Tools>Install Packages > "Package Archive File" and select the location of the zip file
  3. You may also need to install some dependencies ggplot2, pathview, data.table,reshape2
  4. Once you have installed SQMtools and the required dependencies activate the libraries in Rstudio – ex. > library(“SQMtools”), etc
  5. Make sure that the installation was correct by trying to load the library into R. Otherwise, as an alternative you can do the following.
    • Decompress the zip file. You should now have a directory called SQMtools with a structure similar to this.
    • Inside R studio, try install.packages("C:/xxxx/yyy/zzz/SQMtools", repos = NULL, type = "source").
  6. Hopefully there are no errors and you can proceed to loading the SqueezeMeta data using the following your.dataname = loadSQM(“/path/to/your/SqueezeMeta_XXX”)
  7. Hopefully your SQM object will load into R. this should take a few minutes and print something like this to your screen:

Loading orfs

table...
abundances...
sequences
taxonomy...

Loading contigs

table...
abundances...
sequences...
taxonomy...
binning info...

Loading bins

table...
abundances...
taxonomy...

Loading taxonomies

Loading functions

Loading total reads

  1. You should now be able to follow the tutorial on the SqueezeMeta wiki to start examining the results: Using R to analyze your SQM results