SortMeRNA
SortMeRNA is a local sequence alignment tool for filtering, mapping and clustering ribosomal RNA (rRNA) from metatranscriptomic and metagenomic data. It is commonly used to separate rRNA reads from the rest of an RNA-seq dataset.
License
Free to use and open source under GNU LGPLv3.
Available
- Roihu-CPU: 7.0.0, via the
bio-appsmodule.
Usage
SortMeRNA is part of the bio-apps collection on Roihu-CPU. Load the bio-apps module tree and then the SortMeRNA module:
Databases
SortMeRNA needs one or more rRNA reference databases (FASTA files). CSC provides the
SortMeRNA 4.3 reference databases on Roihu, and the sortmerna module sets the
SORTMERNA_DB environment variable to their location:
smr_v4.3_default_db.fasta(recommended)smr_v4.3_fast_db.fastasmr_v4.3_sensitive_db.fastasmr_v4.3_sensitive_db_rfam_seeds.fasta
Give a database with --ref, for example --ref $SORTMERNA_DB/smr_v4.3_default_db.fasta.
To use your own reference files, note that SortMeRNA cannot read gzipped reference
files (the reads can be gzipped).
Running SortMeRNA
#!/bin/bash
#SBATCH --job-name=sortmerna
#SBATCH --account=<project>
#SBATCH --output=output_%j.txt
#SBATCH --error=errors_%j.txt
#SBATCH --partition=small
#SBATCH --time=04:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --mem-per-cpu=4G
module load bio-apps/v202603
module load sortmerna/7.0.0
sortmerna --ref $SORTMERNA_DB/smr_v4.3_default_db.fasta --reads reads.fq.gz \
--workdir sortmerna_run --fastx --other --threads $SLURM_CPUS_PER_TASK
With --fastx, SortMeRNA writes the reads that match the rRNA database to a
FASTA/FASTQ file (aligned), and --other writes the remaining, non-rRNA reads to
a separate file (other). Both are written to sortmerna_run/out/ and are
compressed if the input reads are.
Replace <project> with your CSC project (for example project_2001234).
See creating a batch job script for Roihu for more information about running batch jobs.