Abstract
Background: Small RNA libraries are being increasingly generated as RNA-sequencing technology gets more advanced and less expensive. These libraries are often generated to study miRNAs and piRNAs, but there is a population housed within the reads that is often neglected: endogenous short interfering RNA (endo-siRNA). Endo-siRNAs are small non-coding RNAs that regulate gene expression via gene silencing. They exist in both plants and animals, and while endo-siRNA biogenesis may be similar across species, the mechanism of action can be quite different.
Results: This methods paper introduces a user-friendly R package that will identify and characterize endo-siRNA sequences within any small RNA library. The software requires a fasta, fastq, or text file of processed small RNA library reads. Genomic, transcriptomic, and annotated non-coding RNA indexes for several different species are required and available for download. The result is an excel file that reports all identified endo-siRNA sequences and their genomic coordinates. Also included is a function that allows for visualization of the identified endo-siRNAs.
Conclusion: The endoSeqR software package is a tool that will be specifically useful for developmental biologists studying endo-siRNA. The software is open-source on github and available for customization and further development. This pipeline removes known RNA from small RNA libraries, enabling the accurate isolation of endo-siRNAs.
Keywords: endo-siRNA, R package, small RNA libraries
Background
New small RNA libraries are constantly being generated, most of them to study microRNAs (miRNAs) and piwi-interacting RNAs (piRNAs). Both miRNAs and piRNAs are small pieces of RNA about 20-30 nucleotides long that are involved in gene silencing, but they have different mechanisms for biogenesis and activity [1]. For example, miRNAs require the Drosha and Dicer proteins, while piRNAs do not [1]. piRNAs are derived from a single-stranded DNA precursor, while miRNAs come from a hairpin structure [2]. Other characteristics, such as piRNAs being derived from transposons, also segregate the two small RNA species [1].
Endogenous short interfering RNAs (endo-siRNAs) are a third type of small RNA involved in silencing protein-coding genes. They share properties with miRNAs, such as utilizing Dicer, but they are different in that they do not utilize Drosha and involve an RNA-dependent RNA polymerase in some species [1, 3, 4]. Unfortunately, endo-siRNAs are not universally annotated and are identified only by sequence, which impedes scientific progress. A January 9, 2019 PubMed search for the terms “miRNA” and “let-7” (a well-known example of miRNA) returned 1,435 abstracts. Because endo-siRNAs are not named, the only possible way to search for them is to input their nucleotide sequence, which will likely return nothing since abstracts do not link entities to their nucleic acid sequences. While an ambitious effort to provide a universal annotation for endo-siRNAs has been initiated by the endo-siRBase database [5, 6], it has only scratched the surface of all of the existing small-RNA libraries.
The lack of annotated endo-siRNAs poses a technical problem because genomic alignment will not identify or return endo-siRNAs. Thus, in order to effectively isolate endo-siRNAs from small RNA libraries, one has to implement a pipeline involving several different filters. Seasoned researchers who learned these alignment tools as they developed were in pace with technology and may not find a multi-tiered alignment strategy overly complicated. Scientists new to the field, however, require a substantial amount of technical and biological background to fully understand every facet of genomic analysis.
For example, referring to the genome to verify a sequence can be problematic because the reporting of the coordinates is different, depending on the file type [7].

| Figure 1. Coordinate system differences. One issue surrounding genomic analysis is that there are different file formats, and each one has a specific method of assigning coordinates. (A) There are four possible methods to report coordinates. (B) The top label shows 1-based coordinate positions while the bottom numbers indicate the 0-based coordinates. |
Genomic files have a specific format that is not consistent (Figure 1). For example, a “sam” genomic file is 1 based, meaning genomic numbering begins with a 1; alternatively, a “bed” genomic file is 0 based, meaning that numbering commences with a 0 [8]. This small detail can unintentionally influence analysis if not considered. For endo-siRNAs, often the length and the first nucleotide is an important characteristic. Caenorhabditis elegans is particularly interesting because endo-siRNAs are generated by an RNA dependent RNA polymerase (RdRP) in a two-step process: the first involves a 26 nucleotide double stranded RNA with a 5’ Guanine (26G) and the second involves a 22 nucleotide double stranded RNA with a 5’ Guanine (22G) [9]. If one were to refer to the coordinates in order to define the length and leading base of an endo-siRNA, there is a likely chance it would be incorrectly labelled if the analyzer was not familiar with the 0-based vs 1-based system. The endoSeqR package is useful because it eliminates any ambiguity: the output excel file is one-based inclusive.
An additional obstacle in genomic analysis is that different aligners have different results reported in their output [10]. The endoSeqR package reduces the burden of scientists so that they do not have to learn to use the variety of alignment tools, much less decipher the tool-specific genomic output.
The endoSeqR package is also useful in that it provides a consistent method for dealing with multi-mapped reads by excluding reads that have over four genomic alignments. A simple method would be to only include unique reads in any analysis; however, excluding multi-mappers can eliminate over 30% of data from small-RNA sequencing runs, resulting in a lack of robustness [11, 12].
Implementation:
The endoSeqR package has a few commands that ultimately produce a file of endo-siRNAs with genomic coordinate and sequence information. The supplementary file is a tutorial that models the process from beginning to end.
The endoSeqR package requires processed reads that, upon import, will be filtered to exclude those that are not 18-28 nucleotides in length. The software has Linux dependencies including bowtie [13], samtools [14], and bedtools (28). It also has R package requirements (openxlsx, plyr, and Biostrings). Several species bowtie indexes have already been generated. They are too large to host on the github repository and are available at https://drive.google.com/drive/folders/16xoPxbzVu9Zo9_gqF16umHO_swB91kxV. Index files include genome, non-coding RNA, and transcriptome indexes for the following species: Mus musculus, Homo sapiens, Drosophila melanogaster, Danio rerio, Caenorhabditis elegans, Arabidopsis thaliana, Sus scrofa, Gallus gallus, and Xenopus tropicalis.
After read import and the removal of reads outside of the 18-28 nucleotide range, a three-tiered alignment is implemented in order to isolate endo-siRNAs (Figure 2). Bowtie, STAR [22], and BWA [24] are tools often used for small RNA library alignment and have the same functionality and ability to customize. Though bowtie is the tool utilized by the package, users that prefer STAR or BWA may manipulate code in the endo_MAP executable found in the open-source version if desired. The fixed bowtie parameters are the following:
-v 1: This specifies global alignment over local alignment in order to exclude soft-clipping. It also allows for one mismatch. endo-siRNAs are perfectly reverse complementary to targets [15], although some studies suggest that this is not always the case [16]. Therefore, one mismatch was chosen to account for any non-canonical endo-siRNAs.
-m 4: This suppresses promiscuous reads that align to the genome more than four times. Genomes have many repetitive sequences such as transposons, and some reads may align hundreds to even thousands of times. Including such reads introduces substantial noise.
-a –best – strata: This reports all top alignments, not just a subset of them (which is the default parameter).
This alignment repeats three times, each time using a different bowtie index. In the first alignment, the reads are mapped to the entire genome and any that have more than four alignments are excluded. For the second alignment, reads are mapped to all annotated non-coding RNA (ncRNA) so that known small RNA can be removed. In the final alignment, remaining reads are then mapped to the transcriptome so that antisense reads can be identified. This is important because endo-siRNAs are reverse complementary to their targets [15]. Figure 2 outlines the multi-tiered alignment strategy.

| Figure 2. Software Pipeline. A summary of the endoSeqR alignment process and endo-siRNA identification. Reads from small RNA libraries include different categories of RNA including piRNA, miRNA, ribosomal RNA (rRNA), transfer RNA (tRNA), retrotransposons, contaminants from other organisms, degraded mRNA, and endo-siRNA. The first genomic alignment enables identification and removal of contaminants and repetitive elements. The second alignment is to annotated ncRNA; this enables the removal of any known small RNA such as piRNA and miRNA. The last alignment is to the transcriptome. Sense reads are likely degraded messages and are excluded. The end of the pipeline results in a pure endo-siRNA population. |
Eight parent and daughter R functions are found in the “endoSeqR/R/commands.R” document. The majority of the functionality is in the endo_MAP Linux executable, which contains code to implement the three bowtie alignments as well as the necessary samtools and bedtools file manipulations to extract the relevant data. There is an additional Linux executable called clean_up embedded in the Import_endosiRNA R function that removes extraneous files after analysis.
Results:
For an example of software functionality, the “endoSeqR/practice” folder contains the necessary input files, expected output files, and a pdf tutorial in addition to the dataset-associated publication. The tutorial analyzes a Caenorhabditis elegans small RNA dataset [17]. Only four functions are required for full utility, as shown in supplementary file 1.
The generate_fasta command names the libraries with custom identifiers to simplify analysis. The index files must also be specified, which must either be generated by the bowtie build command or downloaded.
The Import_endosiRNA command will prepare three files: an excel bed file, a more detailed excel file containing sequence and reverse complementary target sequence information in addition to genomic coordinates, and an RData storage file that can be loaded into future R environments with the load command. The file holds the information shown in Table 1.
Table 1. Output File

There is a final command that will produce a data frame containing size and leading base distribution for the population of endo-siRNAs. A histogram can be displayed using the PlotNTLetter command, as shown in the Supplementary tutorial.
Conclusions:
This software is designed for developmental biologists studying endo-siRNA. It is a streamlined procedure that will effectively identify endo-siRNAs in any small RNA library and generate a histogram displaying their length and starting base pair distribution. It will be helpful because in just a few commands, it filters through small RNA libraries in a consistent manner and returns endo-siRNA reads as well as their coordinate and sequence information.
Availability and requirements:
Project home page: https://github.com/kjdaescu/endoSeqR (source code) and https://drive.google.com/drive/folders/16xoPxbzVu9Zo9_gqF16umHO_swB91kxV (indexes and practice dataset)
Programming language: R
Other requirements: Bowtie, samtools, bedtools and R packages plyr, openxlsx, and Biostrings
List of abbreviations:
endo-siRNA endogenous short interfering RNA
miRNA micro RNA
ncRNA non-coding RNA
piRNA piwi-interaction RNA
RdRP RNA dependent RNA polymerase
rRNA Ribosomal RNA
tRNA Transfer RNA
Declarations:
Availability of data and material: Software can be found at https://github.com/kjdaescu/endoSeqR and files can be found at https://drive.google.com/drive/folders/16xoPxbzVu9Zo9_gqF16umHO_swB91kxV. The genomes, non-coding RNA, and transcriptome annotations included were found at ensembl.org. The dataset analyzed is from the following paper:
Asikainen, S., et al., Functional characterization of endogenous siRNA target genes in Caenorhabditis elegans. BMC Genomics, 2008. 9: p. 270.
References:
- Kim, V.N., J. Han, and M.C. Siomi, Biogenesis of small RNAs in animals. Nat Rev Mol Cell Biol, 2009. 10(2): p. 126-39.
- Golden, D.E., V.R. Gerbasi, and E.J. Sontheimer, An inside job for siRNAs. Mol Cell, 2008. 31(3): p. 309-12.
- Chapman, E.J. and J.C. Carrington, Specialization and evolution of endogenous small RNA pathways. Nat Rev Genet, 2007. 8(11): p. 884-96.
- Piatek, M.J. and A. Werner, Endogenous siRNAs: regulators of internal affairs. Biochem Soc Trans, 2014. 42(4): p. 1174-9.
- Daescu, K., endo-siRBase: A multi-species developmental endo- siRNA repository and searchable database, in 8th International Conference on Computational Advances in Bio and medical Sciences (ICCABS). 2018, Institute of Electrical and Electronics Engineers: Las Vegas, NV.
- Daescu, K. A multi-species developmental endo-siRNA repository and searchable database. 2018 [cited 2019 January 16]; Available from: http://psirbase.pythonanywhere.com/resource/.
- Biostars. Tutorial: Cheat Sheet For One-Based Vs Zero-Based Coordinate Systems. 2018 [cited 2019 January 16]; Available from: https://www.biostars.org/p/84686/.
- Group., T.S.B.F.S.W. Sequence Alignment/Map Format Specification. 2018; Available from: https://samtools.github.io/hts-specs/SAMv1.pdf.
- Yigit, E., et al., Analysis of the C. elegans Argonaute family reveals that distinct Argonautes act sequentially during RNAi. Cell, 2006. 127(4): p. 747-57.
- Biostars. Question: BWA 0.7.12 and Unique reads, -r, -c options, XA: and SA: optional tags on SAM output. 2018 [cited 2019 January 16]; Available from: https://www.biostars.org/p/150063/.
- Pantano, L. Handling multi-mapped reads. 2018 [cited 2019 January 16]; Available from: https://seqcluster.readthedocs.io/multi_mapped.html.
- Johnson, N.R., et al., Improved Placement of Multi-mapping Small RNAs. G3 (Bethesda), 2016. 6(7): p. 2103-11.
- Langmead, B., et al., Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biol, 2009. 10(3): p. R25.
- Li, H., et al., The Sequence Alignment/Map format and SAMtools. Bioinformatics, 2009. 25(16): p. 2078-9.
- Lee, R.C., C.M. Hammell, and V. Ambros, Interacting endogenous and exogenous RNAi pathways in Caenorhabditis elegans. RNA, 2006. 12(4): p. 589-97.
- Fischer, S.E., et al., The ERI-6/7 helicase acts at the first stage of an siRNA amplification pathway that targets recent gene duplications. PLoS Genet, 2011. 7(11): p. e1002369.
- Asikainen, S., et al., Functional characterization of endogenous siRNA target genes in Caenorhabditis elegans. BMC Genomics, 2008. 9: p. 270.


