RNA Structure

class rnamake.rna_structure.RNAStructure(struct=None, basepairs=None, ends=None, name='assembled', path='assembled', mtype=99, score=0)[source]

Bases: object

Complete container for representing a RNA. Contains both the 3D structure information but also includes basepair objects to represent the pairs between residues. RNAStructure is rarely called directly but serves as an abstract class for both Motif and Pose so for example use please see those classes.

Parameters:
  • structure (structure.Structure) – The 3D coordinate information
  • basepairs (list of basepair.Basepairs) – basepairing information for each residue pair
  • ends (list of basepair.Basepairs) – the basepairs at the end of chains. These define connection points to other RNAStructures
  • name (str) – name of RNAStructure
  • path (str) – location of where RNAStructure where 3D information was loaded from either the pdb or directory.
  • mtype (motif_type) – The type of a motif, only needed for Motif.motif objects
  • score (float) – The score generated by motif_scorer.MotifScorer
Attributes:
structure: structure.Structure
structure containing residue and chain information for The 3D coordinate information
basepairs: list of basepair.Basepairs
Basepairs between residues
ends: list of baspir.Basepairs
Basepair ends where RNA structures can be connected
mtype: motif_type
The type of a motif, only needed for Motif.motif objects
name: str
the name of the RNAStructure
path: str
location of where RNAStructure originated from, this is just a place holder for converting from rna_structure.RNAStructure
score : float
the score generated by motif_scorer.MotifScorer, estimates secondary structure stability
end_ids: list of strs
strings indenifying the secondary structure and sequence in the perspective of a given basepair end
beads : list of residue.Bead objects
keeps the beads required for steric clash calulations
Examples:
# load test structure
>>> from rnamake.unittests import instances
>>> r_struct = instances.rna_structure()
chains()[source]

wrapper for rnamake.structure.Structure.chain

get_basepair(bp_uuid=None, res1=None, res2=None, uuid1=None, uuid2=None, name=None)[source]

locates a Basepair object based on residue objects or uuids if nothing is supplied you will get back all the basepairs in the motif. The way to make sure you will only get one basepair back is to supply BOTH res1 and res2 OR uuid1 and uuid2, I have left it open like this because it is sometimes useful to get all basepairs that a single residue is involved

Parameters:
  • res1 (Residue object) – First residue
  • res2 (Residue object) – Second residue
  • uuid1 (uuid object) – First residue uuid
  • uuid2 (uuid object) – Second residue uuid
Examples:
# load test structure
>>> from rnamake.unittests import instances
>>> r_struct = instances.rna_structure()

>>> print r_struct.basepairs[0]
<Basepair(A1-A24)>

>>> r_struct.get_basepair(name=A1-A24)
get_beads(excluded_ends=None, excluded_res=None)[source]

generates 3-bead model residue beads for all residues in current rna_structure.

Parameters:
  • excluded_res (List of residue.Residue objects) – List of residue objects whose beads are not to be included. This is generally end residues that would instantly clash with residues they are being overlayed onto when performing motif aligning
  • excluded_ends (List of basepair.Basepair objects) – List of ends where the resiudes be added to exclude list. This is just a fast way to remove residues at connection sites between RNA structures.
Returns:

steric beads for this structure

Return type:

List of residue.Bead objects

get_residue(num=None, chain_id=None, i_code=None, uuid=None)[source]

wrapper for rnamake.structure.Structure.get_residue()

residues()[source]

wrapper for rnamake.structure.Structure.residues()

to_pdb(fname='motif.pdb', renumber=-1, close_chain=0)[source]

write structure to pdb file

Parameters:
  • fname (str) – name of the file of the pdb file you want to write to
  • renumber (int) – what should the first residue be numbered. -1 is to NOT renumber, Default=-1.
  • close_chain (int) – fixes the phosphate backbone, takes a while, so default is 0 not to run
Returns:

None

to_pdb_str(renumber=-1, close_chain=0)[source]

creates a PDB string formatted verision of this Structure object.

Parameters:
  • renumber (int) – what should the first residue be numbered. -1 is to NOT renumber, Default=-1.
  • close_chain (int) – fixes the phosphate backbone, takes a while, so default is 0 not to run
Returns:

str

rnamake.rna_structure.basepairs_from_x3dna(path, name, structure)[source]

gets x3dna data on basepairing information and then interwines it with the structural information stored in structure for simpler retreival of data