Skip to content

Creating a sequence to structure file

Jay Hesselberth edited this page Mar 9, 2025 · 3 revisions

Clover requires a file that maps tRNA sequence to a common structure. We have found the easiest approach is to align a set of tRNAs to a common covariance model, and export that alignment into AFA ("aligned FASTA") format.

Eventually we plan to use the secondary structure specified in the Stockholm file.

Setup

Install infernal using source or conda.

tRNA covariance file

First, we need a covariance model. tRNAscan-SE provides pre-built covariance models for use with infernal. We'll start with the generic eukaryotic nuclear model:

wget https://raw.githubusercontent.com/UCSC-LoweLab/tRNAscan-SE/refs/heads/master/lib/models/TRNAinf-euk.cm

Align tRNA sequences to the model

Next, we use infernal to align a fasta file of tRNA sequences to the model. cmalign emits sequences in Stockholm format:

cmalign TRNAinf-euk.cm yeast/trna-ref.fa.gz > yeast/trna-ref.sto

Reformat the Stockholm file

Finally, we use esl-reformat (typically installed with infernal) to convert from Stockholm to AFA format:

esl-reformat afa yeast/trna-ref.sto > yeast/trna-ref.afa

TODO

  • Example using in plot_heatmap().