circall

A fast and accurate methodology for discovery of circular RNAs from paired-end RNA-sequencing data

Contents

1. Introduction
2. Download and installation
3. Prepare BSJ reference database and annotation files
4. Indexing transcriptome and BSJ reference database
5. Run Circall pipeline
6. A practical copy-paste example of running Circall
7. Circall simulator

Update news

19 June 2020: version 0.1.0

  • First submission

1. Introduction

Circall is a novel method for fast and accurate discovery of circular RNAs from paired-end RNA-sequencing data. The method controls false positives by two-dimensional local false discovery method and employs quasi-mapping for fast and accurate alignments. The details of Circall are described in its manuscript. In this page, we present the Circall tool and how to use it.

Software requirements:

Circall is implemented in R and C++. We acknowledge for materials from Sailfish, Rapmap and other tools used in this software.

  • A C++-11 compliant compiler version of GCC (g++ >= 4.8.2)
  • R packages version 3.6.0 or later with the following installed packages: GenomicFeatures, Biostrings, foreach, and doParallel.

Annotation reference

Circall requires

  1. a fasta file of transcript sequences and a gtf file of transcript annotation: can be downloaded from public repositories such as Ensembl (ensembl.org)
  2. a genome file of transcript sequences and a gtf file of transcript annotation: can be downloaded from public repositories such as Ensembl (ensembl.org)
  3. an RData file of supporting annotation: A description of how to create the RData file for new annotation versions or species is available in the following Section.

The current Circall version was tested on the human genome, transcriptome with ensembl annotation version GRCh37.75. Specifically, the following files are required:

Versions

The latest version and information of Circall is updated at: https://www.meb.ki.se/sites/biostatwiki/circall/

2. Download and installation

If you use the binary verion of Circall:

  • Download the latest binary version from Circall website
wget --no-check-certificate -O Circall_v0.1.0_linux_x86-64.tar.gz https://www.meb.ki.se/sites/biostatwiki/wp-content/uploads/sites/4/2021/04/Circall_v0.1.0_linux_x86-64.tar_.gz
  • Uncompress to folder
tar -xzvf Circall_v0.1.0_linux_x86-64.tar.gz
  • Move to the Circall_home directory and do configuration for Circall
cd Circall_v0.1.0_linux_x86-64
bash config.sh
cd ..
  • Add paths of lib folder and bin folder to LD_LIBRARY_PATH and PATH
export LD_LIBRARY_PATH=/path/to/Circall_v0.1.0_linux_x86-64/linux/lib:$LD_LIBRARY_PATH
export PATH=/path/to/Circall_v0.1.0_linux_x86-64/linux/bin:$PATH
  • Do not forget to replace “/path/to/” with your local path or use this command to automatically replace your path:
export LD_LIBRARY_PATH=$PWD/Circall_v0.1.0_linux_x86-64/linux/lib:$LD_LIBRARY_PATH
export PATH=$PWD/Circall_v0.1.0_linux_x86-64/linux/bin:$PATH

If you want to build Circall from sources:

  • Download Circall from Circall website and move to Circall_home directory
wget --no-check-certificate -O Circall_v0.1.0.tar.gz https://www.meb.ki.se/sites/biostatwiki/wp-content/uploads/sites/4/2021/04/Circall_v0.1.0.tar_.gz
tar -xzvf Circall_v0.1.0.tar.gz
cd Circall_v0.1.0
bash config.sh
  • Circall requires information of flags from Sailfish including DFETCH_BOOST, DBOOST_ROOT, DTBB_INSTALL_DIR and DCMAKE_INSTALL_PREFIX. Please refer to the Sailfish website for more details of these flags.
  • Do installation by the following command:
DBOOST_ROOT=/path/to/boostDir/ DTBB_INSTALL_DIR=/path/to/tbbDir/ DCMAKE_INSTALL_PREFIX=/path/to/Circall_home bash install.sh

-After the installation is finished, remember to add the paths of lib folder and bin folder to LD_LIBRARY_PATH and PATH

export LD_LIBRARY_PATH=/path/to/Circall_home/lib:$LD_LIBRARY_PATH
export PATH=/path/to/Circall_home/bin:$PATH

Install Circall from sources in Ubuntu

##########################
### This contain scripts in the copy-and-paste manner (line-by-line) to install Circall from source codes
### The scripts have been successfully tested in Ubuntu 16, 19 and 20.

##########################
### download Circall
wget wget --no-check-certificate -O Circall_v0.1.0.tar.gz https://www.meb.ki.se/sites/biostatwiki/wp-content/uploads/sites/4/2021/04/Circall_v0.1.0.tar_.gz
tar -xzvf Circall_v0.1.0.tar.gz
cd Circall_v0.1.0

#config to run Circall
bash config.sh

### install boost_1_55_0
wget http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz
tar -xvzf boost_1_58_0.tar.gz
cd boost_1_58_0

sudo apt-get update
sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev
sudo apt-get install aptitude
aptitude search boost

./bootstrap.sh --prefix=boost_1_58_0_build
./b2
./b2 install

#The Boost C++ Libraries were successfully built!
#add the lib and folder to paths
export LD_LIBRARY_PATH=$PWD/boost_1_58_0_build/stage/lib:$LD_LIBRARY_PATH
export PATH=$PWD/boost_1_58_0_build:$PATH


### install tbb44_20160526oss
cd ..
wget https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160526oss_src_0.tgz
tar xvf tbb44_20160526oss_src_0.tgz
sudo apt-get install libtbb-dev

### install cmake for ubuntu: cmake 3.5.1
sudo apt install cmake
### install curl
sudo apt install curl
### install autoconf
sudo apt-get install autoconf
### install zlib
sudo apt install zlib1g-dev
sudo apt install zlib1g
### update all installations
sudo apt-get update

### install Circall
DBOOST_ROOT=$PWD/boost_1_58_0/boost_1_58_0_build/ DTBB_INSTALL_DIR=$PWD/tbb44_20160526oss/ DCMAKE_INSTALL_PREFIX=Circall_0.1.0_build bash install.sh

#The Circall_0.1.0 was successfully built!
###########

#add lib and bin folders to paths
export LD_LIBRARY_PATH=$PWD/Circall_0.1.0_build/lib:$LD_LIBRARY_PATH
export PATH=$PWD/Circall_0.1.0_build/bin:$PATH

#done
###########

3. Prepare BSJ reference database and annotation files

Download genome fasta, transcript fasta and gtf annotation files.

wget http://ftp.ensembl.org/pub/release-75/fasta/homo_sapiens/dna/Homo_sapiens.GRCh37.75.dna.primary_assembly.fa.gz
gunzip Homo_sapiens.GRCh37.75.dna.primary_assembly.fa.gz
wget http://ftp.ensembl.org/pub/release-75/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh37.75.cdna.all.fa.gz
gunzip Homo_sapiens.GRCh37.75.cdna.all.fa.gz
wget http://ftp.ensembl.org/pub/release-75/gtf/homo_sapiens/Homo_sapiens.GRCh37.75.gtf.gz
gunzip Homo_sapiens.GRCh37.75.gtf.gz

Create sqlite

Rscript Circall_v0.1.0_linux_x86-64/R/createSqlite.R Homo_sapiens.GRCh37.75.gtf Homo_sapiens.GRCh37.75.sqlite

Create BSJ reference database

The BSJ reference database for Homo_sapiens.GRCh37.75 was generated and able to download from Homo_sapiens.GRCh37.75_BSJ_sequences.fa. This file was generated by the following command:

Rscript Circall_v0.1.0_linux_x86-64/R/buildBSJdb.R gtfSqlite=Homo_sapiens.GRCh37.75.sqlite genomeFastaFile=Homo_sapiens.GRCh37.75.dna.primary_assembly.fa bsjDist=250 maxReadLen=150 output=Homo_sapiens.GRCh37.75_BSJ_sequences.fa

4. Indexing transcriptome and BSJ reference database

Index transcriptome

Circall_v0.1.0_linux_x86-64/linux/bin/TxIndexer -t Homo_sapiens.GRCh37.75.cdna.all.fa -o IndexTranscriptome

Index BSJ reference database

Circall_v0.1.0_linux_x86-64/linux/bin/TxIndexer -t Homo_sapiens.GRCh37.75_BSJ_sequences.fa -o IndexBSJ

Now, all annotation data are generated and ready to run Circall.

5. Run Circall pipeline

Suppose sample_01_1.fasta and sample_01_2.fasta are the input fastq files. For convenience, we prepared a toy example to test the pipeline, which can be downloaded here:

wget https://www.meb.ki.se/sites/biostatwiki/wp-content/uploads/sites/4/2021/07/sample_01_1.fasta_.gz
wget https://www.meb.ki.se/sites/biostatwiki/wp-content/uploads/sites/4/2021/07/sample_01_2.fasta_.gz

Circall can be run in one command wrapped in a bash script:

bash Circall_v0.1.0_linux_x86-64/Circall.sh -genome Homo_sapiens.GRCh37.75.dna.primary_assembly.fa -gtfSqlite Homo_sapiens.GRCh37.75.sqlite -txFasta Homo_sapiens.GRCh37.75.cdna.all.fa -txIdx IndexTranscriptome -bsjIdx IndexBSJ -dep Circall_v0.1.0_linux_x86-64/Data/Circall_depdata_human.RData -read1 sample_01_1.fasta.gz -read2 sample_01_2.fasta.gz -p 4 -tag testing_sample -c FALSE -o Testing_out

Inputs and parameters

Annotation data:

  • genome — genome in fasta format
  • gtfSqlite — genome annotation in Sqlite format
  • txFasta — transcripts (cDNA) in fasta format
  • txIdx — quasi-index of txFasta
  • bsjIdx — quasi-index of BSJ reference fasta file

Input data:

  • read1 — input read1: should be in gz format
  • read2 — input read2: should be in gz format

Other parameters:

  • dep — data contain depleted circRNAs: to specify the null data (depleted circRNA) for the two-dimensional local false discovery rate method. For convenience, we collect the null data from three human cell lines datasets Hela, Hs68, and Hek293 and provided in the tool: Circall_v0.1.0_linux_x86-64/Data/Circall_depdata_human.RData
  • p — the number of threads: Default is 4
  • tag — tag name of results: Default is “Sample”
  • td — generation of tandem sequences: TRUE/FALSE value, default is TRUE
  • c — clean intermediate data: TRUE/FALSE value, default is TRUE
  • o — output folder: Default is the current directory

Output

The main output of Circall is provided in *_Circall_final.txt. In this file, each row indicates one circular RNA, and the information of one circular RNA is presented in 8 columns:

  • chr: chromosome
  • start: start position
  • end: end position
  • geneID: gene name that the circRNA belongs to
  • circID: the ID of circRNA in the format “chr__start__end”
  • junction_fragment_count: the number of fragment counts supporting the back-splicing-junction (BSJ)
  • median_circlen: the median length of the circular RNA
  • fdr: the false discovery rate computed from the two-dimensional local false discovery method

6. A practical copy-paste example of running Circall

In this section, we provide a practical example of using Circall in a copy-paste manner for a Hs68 cell line dataset.

Download and install Circall

wget --no-check-certificate -O Circall_v0.1.0_linux_x86-64.tar.gz https://www.meb.ki.se/sites/biostatwiki/wp-content/uploads/sites/4/2021/04/Circall_v0.1.0_linux_x86-64.tar_.gz
  • Uncompress to folder
tar -xzvf Circall_v0.1.0_linux_x86-64.tar.gz
  • Move to the Circall_home directory and do configuration for Circall
cd Circall_v0.1.0_linux_x86-64
bash config.sh
cd ..
  • Add paths of lib folder and bin folder to LD_LIBRARY_PATH and PATH
export LD_LIBRARY_PATH=$PWD/Circall_v0.1.0_linux_x86-64/linux/lib:$LD_LIBRARY_PATH
export PATH=$PWD/Circall_v0.1.0_linux_x86-64/linux/bin:$PATH

Download genome fasta, transcript fasta and BSJ databases and annotation file.

# genome from ENSEMBL website
wget http://ftp.ensembl.org/pub/release-75/fasta/homo_sapiens/dna/Homo_sapiens.GRCh37.75.dna.primary_assembly.fa.gz
gunzip Homo_sapiens.GRCh37.75.dna.primary_assembly.fa.gz

# cDNA (transcript) and Gene annotation (gft) from ENSEMBL website
wget http://ftp.ensembl.org/pub/release-75/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh37.75.cdna.all.fa.gz
gunzip Homo_sapiens.GRCh37.75.cdna.all.fa.gz
wget http://ftp.ensembl.org/pub/release-75/gtf/homo_sapiens/Homo_sapiens.GRCh37.75.gtf.gz
gunzip Homo_sapiens.GRCh37.75.gtf.gz

# pre-built BSJ databases from Circall website
wget https://www.meb.ki.se/sites/biostatwiki/wp-content/uploads/sites/4/files/circall/Homo_sapiens.GRCh37.75_BSJ_sequences.fa.gz
gunzip Homo_sapiens.GRCh37.75_BSJ_sequences.fa.gz

# Genarate Sqlite annotation
Rscript Circall_v0.1.0_linux_x86-64/R/createSqlite.R Homo_sapiens.GRCh37.75.gtf Homo_sapiens.GRCh37.75.sqlite

Index transcriptome

Circall_v0.1.0_linux_x86-64/linux/bin/TxIndexer -t Homo_sapiens.GRCh37.75.cdna.all.fa -o IndexTranscriptome

Index BSJ reference database

Circall_v0.1.0_linux_x86-64/linux/bin/TxIndexer -t Homo_sapiens.GRCh37.75_BSJ_sequences.fa -o IndexBSJ

Download Hs68 cell line RNA-seq data

wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/SRR444975/SRR444975_1.fastq.gz
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/SRR444975/SRR444975_2.fastq.gz

Run Circall

bash Circall_v0.1.0_linux_x86-64/Circall.sh -genome Homo_sapiens.GRCh37.75.dna.primary_assembly.fa -gtfSqlite Homo_sapiens.GRCh37.75.sqlite -txFasta Homo_sapiens.GRCh37.75.cdna.all.fa -txIdx IndexTranscriptome -bsjIdx IndexBSJ -dep Circall_v0.1.0_linux_x86-64/Data/Circall_depdata_human.RData -read1 SRR444975_1.fastq.gz -read2 SRR444975_2.fastq.gz -p 4 -tag testing_sample -o SRR444975

In our experience, it takes around 8 CPU hours with a single CPU in total to complete.

7.  Circall simulator

Introduction

Circall simulator is a tool integrated in Circall to generate RNA-seq data of both circRNA and tandem RNA. The source codes are provided in R/Circall_simulator.R of the Circall tool. The main function of the simulator is Circall_simulator() which is able to be run in R console. This function requires the following parameters:

Parameter setting:

  • circInfo: a data frame that contains 6 columns which are: Chr, start_EXONSTART, end_EXONEND, GENEID, cCount and FPKM. Chr is chromosome name with formated as 1:22, X, Y, Mt. start_EXONSTART is starting position starting exon of circRNA, end_EXONEND is ending position ending exon of circRNA, GENEID is gene ID contains circRNA (used to get gene model), cCount are number of read pair want to generate for the target circRNA and FPKM are Fragments Per Kilobase of transcript per Million of target circRNAs. This is used to simulate circular RNAs
  • tandemInfo: a data frame similar to circInfo to simulate tandem RNAs. tandemInfo=NULL (the default value) to not simulate tandem RNAs
  • error_rate: sequencing error rate, the default value is 0.005
  • set.seed: set seed for reproducibility, the default value is 2018
  • gtfSqlite: path to your annotation file, Sqlite formated (generated by GenomicFeatures)
  • genomeFastaFile: path to your genome fasta file
  • txFastaFile: path to your transcript fasta file (cDNA)
  • out_name: prefix output folders, the default value is “Circall_simuation”
  • out_dir: the directory contains output, the default value is the current directory
  • lib_size: expected library size used when useFPKM=TRUE, the default value is NULL
  • useFPKM boolean value to use FPKM or not, the default value is FALSE. When this useFPKM=TRUE, users need to set value for lib_size, and the simulator will use the abundance in column FPKM of circInfo/tandemInfo for simulation

A toy example for using Circall simulator

For an illustration of using Circall simulator, we provide in this section a toy example. Suppose your current working directory contains the installed Circall and the annotation data. First, we need to load the functions of the simulator into your R console:

source("Circall_v0.1.0_linux_x86-64/R/Circall_simulator.R")

Then we create objects circInfo and tandemInfo containing the information of CircRNAs and tandem RNAs

Chr = c(7,7,3,5,17,4,7,1,3,1,17,12,14,10,18,17,5,20,16,17)

start_EXONSTART = c(131113792,99795401,172363413,179296769,36918664,151509200,2188787,51906019,57832924,225239153,76187051,111923075,104490906,101556854,196637,21075331,74981032,60712420,56903641,80730328)

end_EXONEND = c(131128461,99796580,172365904,179315312,36918758,151509336,2270359,51913807,57882659,225528403,76201599,111924628,104493276,101572901,199316,21087123,74998635,60716000,56904648,80772810)

GENEID = c("ENSG00000128585","ENSG00000066923","ENSG00000144959","ENSG00000197226","ENSG00000108294","ENSG00000198589","ENSG00000002822","ENSG00000085832","ENSG00000163681","ENSG00000185842","ENSG00000183077","ENSG00000204842","ENSG00000156414","ENSG00000023839","ENSG00000101557","ENSG00000109016","ENSG00000152359","ENSG00000101182","ENSG00000070915","ENSG00000141556")

set.seed(2021)
cCount = sample(2:2000,20)
FPKM = rep(0,20)

BSJ_info = data.frame(Chr = Chr, start_EXONSTART = start_EXONSTART, end_EXONEND = end_EXONEND, GENEID = GENEID, cCount = cCount, FPKM = FPKM)

circSet=c(1:15)
circInfo = BSJ_info[circSet,]
tandemInfo = BSJ_info[-circSet,]

Finally, we run the simulator:

simulation = Circall_simulator(circInfo = circInfo, tandemInfo = tandemInfo, useFPKM=FALSE, out_name = "Tutorial", gtfSqlite = "Homo_sapiens.GRCh37.75.sqlite", genomeFastaFile = "Homo_sapiens.GRCh37.75.dna.primary_assembly.fa", txFastaFile = "Homo_sapiens.GRCh37.75.cdna.all.fa", out_dir= "./simulation_test")

You can find in the “./simulation_test” that contains the outputs including:

  • simulation_setting: setting information of simulation of both circRNAs and tandem RNAs.
  • circRNA_data: RNA seq data of CircRNAs
  • tandem_data: RNA seq data of tandem RNA
  • fasta sequences of tandem RNAs
  • fasta sequences of circular RNAs

8. License

Circall uses GNU General Public License GPL-3.

9. References

Nguyen, Dat Thanh, Quang Thinh Trac, Thi-Hau Nguyen, Ha-Nam Nguyen, Nir Ohad, Yudi Pawitan, and Trung Nghia Vu. 2021. “Circall: Fast and Accurate Methodology for Discovery of Circular RNAs from Paired-End RNA-Sequencing Data.” BMC Bioinformatics 22 (1): 495. https://doi.org/10.1186/s12859-021-04418-8.

Leave a Reply

Your email address will not be published. Required fields are marked *