Skip to content

Dependencies and installation

Ángeles Arzalluz-Luque edited this page Oct 4, 2023 · 29 revisions

Table of contents:


Dependencies

Non-comprehensive list of the main dependencies for SQANTI3:

General

  • Perl
  • Minimap2
  • Python (3.7)
  • R (>= 3.4.0)
  • kallisto
  • samtools
  • STAR
  • uLTRA
  • deSALT
  • pip

Python-related libraries

  • bx-python
  • BioPython
  • BCBioGFF
  • cDNA_Cupcake
  • cython
  • NumPy
  • pysam
  • pybedtools
  • psutil
  • pandas
  • scipy

R-related libraries

  • R packages for sqanti3_qc.py and sqanti3_filter.py (installed when creating the conda environment):

External scripts

  • We have downloaded gtfToGenePred from UCSC utilities and gave execution permissions, so it is no longer necessary to do it after downloading SQANTI3.

Getting ready to use SQANTI3

We recommend using Anaconda to substantially facilitate installation of all Python dependencies. Probably you already have Anaconda installed because you use BioConda IsoSeq(3) or cDNA_Cupcake. Please, follow the steps here to ensure an error-free installation. All the dependencies will be installed automatically in a conda environment, except for cDNA_Cupcake (more details in step 5). The installation will be done just once. When the environment has been entirely built, you just need to activate the conda environment of SQANTI3 and run it!

0. Installing and updating Anaconda

Make sure you have installed Anaconda. If so, you may add it to your PATH variable and update it -if necessary- as follows:

export PATH=$HOME/anacondaPy37/bin:$PATH
conda -V
conda update conda

If you have not installed Anaconda, the generic installer for Linux OS can be found here. Note that only Linux and Mac machines are currently supported.

1. Downloading SQANTI3

Next, download the latest stable SQANTI3 release. As of October 4th 2023, the current version is v5.2.

For general users, we recommend downloading the SQANTI3 repository as follows:

wget https://github.com/ConesaLab/SQANTI3/archive/refs/tags/v5.2.tar.gz
tar -xvf v5.2.tar.gz

If you have intentions of contributing to the development of SQANTI3, please clone the developer version. This option will set up a git repository within your SQANTI folder and is NOT recommended for general users. Contributers outside the main development team are welcome submit a pull-request after performing the changes in their forked repositories.

 git clone https://github.com/ConesaLab/SQANTI3.git

If you are interested in a previous version of SQANTI3, see the version history in our wiki site, which contains a detailed account of all changes introduced for versions >=5.0.

2. Creating the conda environment

To use SQANTI3, you will need to move into the SQANTI3 folder that you just downloaded and create a virtual environment including all required packages. All you need to do is run the SQANTI3.conda_env.yml script that you can find in the main SQANTI folder:

cd SQANTI3
conda env create -f SQANTI3.conda_env.yml
source activate SQANTI3.env

This script contains all the information required to install the SQANTI3 dependencies. As the environment creation progresses, you will need to type y when prompted to proceed with the installation. Note that you may change the name of the environment using the -n argument to the conda env create command. By default, the name of the environment will be SQANTI3.env.

Once you have activated the virtual environment, you should see your prompt changing to something like this:

(SQANTI3.env)$

Environment management after SQANTI3 updates

If you had already installed SQANTI3 and have updated to a new version, creating a fresh environment may be required in major and minor releases (i.e. version bumps from 5.1.x to 5.2.x), but not in the case of patches (i.e. version bumps from 5.1.x to 5.1.y). However, if you experience errors running SQANTI3 after downloading a new version, we advise creating the conda environment again to discard dependency version issues.

3. Installing gtfToGenePred

SQANTI requires manual installation of gtfToGenePred. This tool seems to have some issues with Python 3.7 (or openssl) when installed via conda. At this point, the easiest solution is to download it from the UCSC website and add it to the SQANTI3/utilities folder you will need to make the file executable) or to your PATH variable.

wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/gtfToGenePred -P <path_to>/SQANTI3/utilities/
chmod +x <path_to>/SQANTI3/utilities/gtfToGenePred 

For Linux users, the right version of gtfToGenePred is already in the utilities folder. However, if you are running SQANTI3 on MacOS, you must remove the utilities/gtfToGenePred file and download the Mac version here.

4. Installing cDNA_Cupcake

Finally, users need to install cDNA_Cupcake. Check that you have activated the SQANTI3.env environment and then proceed with the following commands:

(SQANTI3.env)$ git clone https://github.com/Magdoll/cDNA_Cupcake.git
(SQANTI3.env)$ cd cDNA_Cupcake
(SQANTI3.env)$ python setup.py build
(SQANTI3.env)$ python setup.py install

Now you are all set up! No further installation of SQANTI3 is required, and the scripts can be run directly using python.

See detailed instructions to run SQANTI3 quality control and the SQANTI3 filter in the dedicated wiki pages.

4.1. cDNA_Cupcake installation troubleshooting

Some users have encountered the following Cython compiler error during python setup.py build:

Error compiling Cython file:
------------------------------------------------------------
                exon_tree.insert_interval(Interval(e_start+offset, i+offset, index))
                index += 1
                tag = False
            elif baseC[i] > 0 and (altC_pos[i] > threshSplit or altC_neg[i+1] < -threshSplit): # alt. junction found!
                # end the current exon at i and start a new one at i + 1
                print "alt. junction found at", i
                      ^

If this happens, you should use the solution in issue #208 to proceed with the installation.