Learn R Programming

Bios2cor (version 1.2)

rotamer_omes: OMES(Observed minus Expected Squared) function applied to rotamers in molecular dynamics simulations

Description

Calculates difference between observed and expected occurrences of each possible pair of rotamers (x, y) for i and j dihedral angles over all frames

Usage

rotamer_omes(
    dynamic_struct,
    rotamers,
    res_selection= 
      c("C","I","L","M","V","R","H","K","D","E","N","Q","F","Y","W","T","S","P"),
    z_score= TRUE,
    auto_pairing= FALSE
  )

Arguments

dynamic_struct

An object of class 'structure' that is created by the dynamic_struct function

rotamers

A character matrix that is produced by the angle_conversion function. The matrix indicates the rotameric state of each side chain dihedral angle for each frame of the trajectory.

res_selection

Selection of amino acid types that will be taken into account in the covariation matrix. Allows to limit the analysis to a limited selection of amino acid types.

z_score

A logical value for Z-score normalisation of the covariation matrix. Default is TRUE.

auto_pairing

A logical value that maintains (TRUE) or removes (FALSE) covariation scores between dihedral angles within a same residue in the covariation matrix. DEFAULT is FALSE.

Value

returns a list of one or two elements which are a numeric matrix containing the correlation scores for each pair of rotamers and, optionaly, a numeric matrix containing the Z-scores

Details

The OMES score at angles [i,j] has been computed with the following formula :

$${OMES(i,j)} = \frac{1}{N} \sum_{x,y}^{ }(N_{x,y}^{obs}(i,j)-N_{x,y}^{ex}(i,j))^2$$

with : \(N_{x,y}^{ex}(i,j) = p_{x}(i)p_{y}(j)N\)

where :

  • \(N_{x,y}^{obs}(i,j)\) is number of times that each (x,y) rotamer pair is observed at angles i and j

  • \(N_{x,y}^{ex}(i,j)\) is number of times that each (x,y) rotamer pair would be expected, based on the frequency of rotamer x and y at angles i and j

  • \(N\) is the number of frames

  • \(p_{x}(i)\) is the frequency of rotamer x at angle i

  • \(p_{y}(j)\) is the frequency of rotamer y at angle j

References

Fodor AA and Aldrich RW. Influence of conservation on calculations of amino acid covariance in multiple sequence alignments. Proteins. 2004;56(2):211-21.

Examples

Run this code
# NOT RUN {
  #Calculating rotamers
  pdb <- system.file("rotamer/toy_coordinates.pdb", package= "Bios2cor")
  trj <- system.file("rotamer/toy_dynamics.dcd", package= "Bios2cor")

  conversion_file <- system.file("rotamer/dynameomics_rotameres.csv", package= "Bios2cor")

  wanted_residues <- c("W")
  
  nb_frames_wanted <- 40
  wanted_frames <- seq(from= 5, to= nb_frames_wanted, by= 10)
  dynamic_struct <- dynamic_struct(pdb, trj, wanted_frames)
  
  my_angles <- angle_conversion(dynamic_struct, conversion_file)
  
  #Creating OMES object
  omes_corr <- rotamer_omes(dynamic_struct, my_angles, wanted_residues, z_score= FALSE)
# }

Run the code above in your browser using DataLab