VirSorter2/en
VirSorter2 is a tool to identify new viral sequences.
This page discusses how to install and use VirSorter2 v2.2.4.
Source code and documentation for VirSorter2 can be found on their GitHub page.
Remember to cite VirSorter2 if you use it for your analyses.
Installing VirSorter2 in a Python virtual environment¶
These instructions install VirSorter2 in your $HOME directory using Alliance's prebuilt Python wheels. Custom Python wheels are stored in /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/. To install a VirSorter2 wheel, we will use the pip command and install it into a Python virtual environment.
- Load the necessary modules.
- Create and activate a Python virtual environment.
- Install VirSorter2 v2.2.4 in the virtual environment.
- Validate the installation.
- Freeze the environment and requirements set.
- Download the database in
$SCRATCHwith the--skip-deps-installoption to bypass conda installation and also because dependencies are already installed.
Testing VirSorter2¶
-
Deactivate your virtual environment
-
Download the test dataset in
$SCRATCH. - Create a submission script
test-virsorter.sh
#!/bin/bash #SBATCH --time=00:30:00 #SBATCH --mem-per-cpu=2G #SBATCH --cpus-per-task=2 # Load modules dependencies module load StdEnv/2020 python/3.8 hmmer/3.3.2 prodigal/2.6.3 # Generate your virtual environment in $SLURM_TMPDIR virtualenv --no-download $SLURM_TMPDIR/ENV source $SLURM_TMPDIR/ENV/bin/activate pip install --no-index --upgrade pip # Install VirSorter2 and its dependencies pip install --no-index -r ~/virsorter-2.2.4-requirements.txt # Run VirSorter2 with the test dataset, using at most $SLURM_CPUS_PER_TASK and ignore conda. # The database must already exist and you must specify its location. virsorter run -w $SCRATCH/test.out -i $SCRATCH/test.fa --min-length 1500 -j $SLURM_CPUS_PER_TASK --verbose --use-conda-off --db-dir $SCRATCH/db all - Start an interactive job.
Upon a successful test run, you can submit a non-interactive job with your own dataset using sbatch.