Riboswitches
Can two bacterial RNA switches that respond to sodium be described by one model? This was my directed-research project at Yale in spring 2023 (CPSC 290), working with the Breaker Lab. Here are its results, redrawn so you can poke at them, and how the work got there.
Advised by Dr. Smita Krishnaswamy, mentored by Dr. Ronald Breaker and Christopher King. Code and the original report: github.com/jpsank/breaker.
Background
A riboswitch is a stretch of messenger RNA that binds a small molecule and, in response, changes whether the gene next to it is translated. More than 55 classes were known in 2022, and a review that year projected that thousands more remain undiscovered. They are rare and hard to spot, so finding them is a search problem: take a model of a known RNA family, scan every sequenced genome for matches, and look at what turns up.
The question
Rfam lists two families that look alike and are both associated with sodium: nhaA-I (RF03057) and DUF1646 (RF03071). Each is two stem-loops, 95 and 77 nucleotides long. If they are really one family, a single model should find the hits of both. These are R2R drawings of each family's consensus structure; letters mark the conserved positions.


The experiment
-
Download the two alignments
From Rfam. They are the drawings above.
-
Search each one against the genomes
I used Infernal's
cmsearchto scan the representative bacterial genomes in GTDB release 207, on Yale's cluster. Every hit gets an E-value: roughly how many matches this good you would expect by chance in a database this size, so lower is better. Many hits are copies of the same sequence, so I also count unique hits, where identical aligned sequences collapse into one, and apply an E < 1 cutoff.How many hits survive each filter
The four searches in this experiment. Bars are scaled to the largest count.
The two single-family searches share no hits: not one hit from the nhaA-I search overlaps one from the DUF1646 search.
Where the hits fall by E-value
Unique hits per bin of the log of the E-value. Drag the cutoff; the bars you keep stay colored.
Table view

Consensus of the unique nhaA-I hits with E < 1 
Consensus of the unique DUF1646 hits with E < 1 -
Refold with CMfinder
CMfinder builds a new structural model from a set of hits. I ran it on the nhaA-I hits, on the DUF1646 hits, and on both together, which gave the combined model. Chris made a second merged model, LiNa, by merging the two original Rfam alignments directly with
esl-alimerge.
nhaA-I, refolded 
DUF1646, refolded 
Combined (CMfinder) 
LiNa (Chris's merge) -
Search with the merged models
Same tool, same genomes. The combined model reports 14,536 hits, 1,665 of them unique with E < 1. LiNa reports 2,354, 1,030 unique with E < 1.
-
Did a merged model find both?
For each cutoff I took the unique nhaA-I and DUF1646 hits with E < 1 (1,663 and 421) and asked how many fall on the same stretch of the same contig as a hit from the merged model. The right-hand column counts hits the merged model found that neither original search did.
- nhaA-I hits recovered
- DUF1646 hits recovered
Combined (CMfinder)
Table view
LiNa
Table view
So: no, neither merged model replaced both. The CMfinder model found none of the DUF1646 hits at any cutoff. Its input held four times as many nhaA-I hits as DUF1646 hits (1,663 to 421), and my guess was that it learned the bigger family and ignored the smaller; I never tested that. LiNa is less lopsided, but at strict cutoffs it gives up many of the nhaA-I hits to get a few DUF1646 ones. Both find some hits the single-family searches missed (110 and 14 at E < 1). Whether those are riboswitches or false positives needs more work than I did.
A correction to the original report. Its summary table gave LiNa 1,953 hits and 1,801 unique hits for E < 1. Those are the E < 100 counts, from the wrong file. At E < 1 LiNa has 1,129 hits, 1,030 unique (the report's comparison table has the right figure). That undoes the report's remark that LiNa found more well-matched hits than the combined model: at E < 1 it is 1,030 against 1,665. Every number on this page is recomputed from the search tables.How these numbers were made
Hits come from each search's
.out.tblfile. "Unique" uses the pipeline's own deduplicated table. A merged-model hit counts as recovering a single-family hit when both lie on the same contig and their coordinates overlap. This reproduces the comparison table in the original report exactly; the cutoffs between its four rows (300, 30, 3) are added here. -
An aside: tandem hits
The comparison script also flags hits within 100 base pairs of each other. It found 11 contigs with such pairs. That did not change the analysis, but it is the kind of question a pipeline like this should make cheap to ask.
The journey
The repository has 38 commits between February and May 2023, shown here one dot per commit.
- Parse and count. Feb 26 – Mar 6, . Read Infernal's tables, join hits to their alignments, drop duplicate sequences, first score plots.
- Tidy and document. Mar 9 – 13, . Reorganize the code and write the README.
- Automate on the cluster. Apr 6 – 9, . Scripts to submit searches to the cluster's job scheduler and copy results back, the refolding step, and the first full set of searches.
- Finalize the pipeline. Apr 23, . The searches behind this page, the final statistics, and a fix for the structure-drawing tool failing on the cluster.
- SQL and the report. May 2 – 4, . Moved from files to a SQL database and wrote the final report.
All commits
Where it stopped
The proposal had three parts: the pipeline above; a genetic algorithm for RNA folding, adapted from NEAT, to replace CMfinder; and a web interface with an RNA alignment editor. Only the pipeline got finished. The report says I planned to keep going over the summer, and the repository stops in May 2023. The original write-up, with the proposal and final report, is in the repository's cpsc290 folder.