RNA 3D structure prediction

For each sequence chosen for folding, secondary structure predictions were generated based on the MSA. Two methods were used in this study: SimRNA and Rosetta. For Rosetta, a total of 10,000 decoys were generated for the target sequence and each homologous sequence using the Rosetta FARFAR protocol. For SimRNA prediction, SimRNAweb server was used using the default parameters.

Both modeling steps can be performed in a semi-automated way with rna-tools (M.M. et al., unpublished, software available for download at as well as the pipeline of tools facilitating modeling with Rosetta ( and SimRNA/SimRNAweb (


usage: [-h] [-a RNA_ALIGNMENT_FN] [-o OUTPUT_DIR]
                      [-i INPUT_DIR] [-m MAPPING_FN] [-x MATRIX_FN] [--inf]
                      [-v] [-s] [-f]

Named Arguments

-a, --rna_alignment_fn
 rna alignemnt with the extra guidance line, e.g. test_data/rp14sub.stk
-o, --output_dir

output folder where motifs and structures will be saved, e.g. test_out/rp14 (default: out -> out/structures and out/motifs will be created

Default: “out”

-i, --input_dir

input folder with structures, .e.g. test_data

Default: “.”

-m, --mapping_fn
 a file with mapping folders on the drive with sequence names in the alignment (<name in the alignment>:<folder name>), use multiple lines for multiple seqs
-x, --matrix_fn

output matrix with rmsds all-vs-all

Default: “”


Use INFs instead of RMSD

Default: False

-v, --verbose

be verbose

Default: False

-s, --save

save motifs and structures to output_dir, this slows down the program

Default: False

-f, --flat-dir

use flat directory structure, structures/<all pdbs here>, fetch pdbs based on leading part of names

Default: False

When RNA models are loaded, models ending with ‘template.pdb’ are ignore.

evoClustRNA.get_rna_models_from_dir(directory, residues, save, output_dir, flat_dir)[source]


This function goes folder by folder.

Ugly hack: it removes clust01-05X from the list.

  • directory
  • residues
  • save
  • output_dir

Return type:



Sort the given list in the way that humans expect.

usage: [-h] [--half] [-v] matrix

Positional Arguments

matrix A txt file with a similarity matrix with column headers, See test_data/matrix.txt for more . ! .txt is need to auto-removal system to work

Named Arguments


50% in 3 the biggest clusters

Default: False

-v, --verbose Default: False implements a simple interactive clustering. Technically, this script is a simple wrapper for

usage: [-h] [-o OUTPUT] [-c CUT_OFF] [-v] matrix

Positional Arguments

matrix A txt file with a similarity matrix with column headers, See test_data/matrix.txt for more

Named Arguments

-o See test_data/output.txt for more, don’t type extension of the file

Cut_off of RMSD for the formation of a cluster

Default: 5.0

-v, --verbose

be verbose

Default: False

Uses find in curr directory to find needed file.

This script creates: - reps for top 5 clusters representative structures - resp_motifs for top 5 clusters representative motifs

Add cutoff the name of reps, e.g. reps_c2.5

The script has the second mode right now:

[mm] rosetta-5x$ -i structures/ ade_plus_ade_cleanup_mapping_pkX_*.out -n adepk
['adepk_min.out.10.pdb', 'adepk_min.out.5.pdb', '', 'adepk_min.out.1.pdb', '']
= structures == out/structures/<files>===================
cp -v structures//adepk_min.out.10.pdb reps_ns/c1_adepk_min.out.10.pdb
structures//adepk_min.out.10.pdb -> reps_ns/c1_adepk_min.out.10.pdb
cp -v structures//adepk_min.out.5.pdb reps_ns/c2_adepk_min.out.5.pdb
structures//adepk_min.out.5.pdb -> reps_ns/c2_adepk_min.out.5.pdb
cp -v structures// reps_ns/c3_
cp: structures// is a directory (not copied).
cp -v structures//adepk_min.out.1.pdb reps_ns/c4_adepk_min.out.1.pdb
structures//adepk_min.out.1.pdb -> reps_ns/c4_adepk_min.out.1.pdb
cp -v structures// reps_ns/c5_
cp: structures// is a directory (not copied).

# -i structures/ ade_plus_ade_cleanup_mapping_pkX_*.out -n adepk

first, the input is parsed to get borders of lines of clusters. These borders are used to select structures that come to a given cluster. For each cluster, there is a search if within it there is a structure that starts with a given name - defined with –NATIVE_SEQ_ONLY. If there is none, then to the reps list ‘’ is appended.

OLD: It reads out folder created by in structure such as: - out/structures/<homologs>

usage: [-h] [-i INPUT_DIR] [-o OUTPUT_PREFIX] [-c] [-s]
                              [-u] [-n NATIVE_SEQ_ONLY]

Positional Arguments


Named Arguments

-i, --input_dir

input folder with structures, .e.g. test_data

Default: “out”

-o, --output_prefix

output folder where motifs and structures will be saved, e.g. test_out/rp14

Default: “”

-c, --use-cutoff-for-names
 Default: False
-s, --skip_motifs
 Default: False
-u, --skip_structures
 Default: False
-n, --native-seq-only

Python Classes used in the scripts


class RNAmodel.RNAmodel(fpath, residues, save=False, output_dir='')[source]
>>> rna = RNAmodel("test_data/rp14/rp14_5ddp_bound_clean_ligand.pdb", [1], False, None)
>>> rna.get_report()
"File:  rp14_5ddp_bound_clean_ligand.pdb  # of atoms: 1 \nresi:  1  atom:  <Atom C3'> \n"
  • fpath – file path, string
  • residues – list of residues to use (and since we take only 1 atom, C3’, this equals to number of atoms.
  • save – boolean, save to output_dir or not
  • output_dir – string, if save, save segments to this folder

Str a short report about rna model

get_rmsd_to(other_rnamodel, output='', dont_move=False)[source]

Calc rmsd P-atom based rmsd to other rna model

save(output_dir, verbose=True)[source]

Save structures and motifs




    # STOCKHOLM 1.0

AACY023581040                --CGUUGGACU------AAA--------AGUCGGAAGUAAGC-----AAU-C------GCUGAAGCAACGC---
    #=GC SS_cons                 ::(((((,<<<<<<<.._____..>>>>>>>,,,,,,,,<<<<...._____.....>>>>,,,,)))))::::
    x                            --xxxxxxxxx-----------------xxxxxxxx--xxx------------------xxxxxxxxxxx----
    #=GC RF                      AUCGUUCAuCucccc..uuuuu..ggggaGaCGGAAGUAGGca....auaaa.....ugCCGAAGGAACGCguu

x line is used to pick resides to calculate RMSD.

x line could be renamed to EvoClust

class RNAalignment.RNAalignment(fn)[source]


get_range(seqid, offset=0, verbose=True)[source]

Get a list of positions for selected residues based on the last line of the alignment!

If seqis not found in the alignment, raise an exception, like

Exception: Seq not found in the alignment: 'CP000879.1/21644622164546


EvoClust lines has to be -1 in the alignemnt.