Resources chevron_right Protocols chevron_right Barrnap
Protocol // rRNA Prediction

Barrnap

rRNA prediction in bacterial, archaeal, and fungal genomes using hidden Markov models.

rRNA Prediction codeGitHub scheduleMarch 31, 2026

Installation

Clone the repository of the program:

git clone https://github.com/tseemann/barrnap.git ~/software/barrnap

Go to the location of the file:

ls ~/software/barrnap

Add this location to your PATH so you can call the program from any location:

echo 'export PATH="$HOME/software/barrnap/bin:$PATH"' >> ~/.bashrc

Update your PATHs:

source ~/.bashrc

Update the available databases the program will use:

barrnap --updatedb

Run

for i in Directory/*.fna; do barrnap --kingdom arc --no-operon --no-mrna --threads 5 $i > $i-barrnap.gff; done

Other options — Kingdom database:

--kingdom bac
--kingdom fun

For using bacterial and fungal databases.

To skip some output:

--legacy
--no-rrna
--no-trna
--no-ncrna
--no-mrna
--no-operon

Legacy will only perform the rRNA prediction.

Process the Output

Check the information about the script compile_barrnap.py at the barrnap-rna-toolkit repository. This script will process your folder with the outputs and give you structured outputs.

python3 compile_barrnap.py <input_folder> [--output-prefix PREFIX] --trna --rrna

Extract rRNA Sequences

Check the information about the script extract_rrna_seqs.py at the barrnap-rna-toolkit repository. This script will create one fasta file per type of rRNA you identify in table containing all of those rRNA sequences present in the output <prefix>_rRNA_table.tsv generated by compile_barrnap.py.

python3 extract_rrna_seqs.py <table.tsv> <fna_folder> --output-dir rRNA-Seq