rnaglib.utils

General utilities for handling RNA structures and graphs.

Input/Output

Functions and writing and loading to/from disk.

load_graph(filename)

This is a utility function that supports loading from json or pickle.

download_graphs([redundancy, version, ...])

Based on the options, get the right data from the latest release and put it in download_dir.

dump_json(filename, graph)

Just a shortcut to dump a json graph more compactly.

load_json(filename)

Just a shortcut to load a json graph more compactly.

graph_from_pdbid(pdbid[, graph_dir, ...])

Fetch an annotated graph with a PDBID.

Wrappers

Wrappers for third-party executables.

Warning

Make sure the necessary executables are in your os PATH.

cdhit_wrapper(ids, sequences[, sim_thresh, ...])

Cluster sequences using CD-hit.

rna_align_wrapper(cif_path_1, cif_path_2[, ...])

Calls RNAalign on two mmCIF files and returns the output.

locarna_wrapper(seq_1, seq_2)

Calls LocaRNA on two RNA sequences to perform sequence-2d-structure aligment

PDB/mmCIF Utilities

cif_remove_residues(cif_path, keep_residues, ...)

Remove all residues from a cif file except for those in keep_residues list.