Learn R Programming

BioPhysConnectoR (version 1.6-10)

get.contact.list: Returns a List of Contacts for a given Contact Map

Description

From a given contact map a list of contacts is computed.

Usage

get.contact.list(cm, d = NULL, single = TRUE, val = 1)

Arguments

cm
binary matrix which specifies which amino acid position are in contact
d
vector specifying the last amino acids of each chain
single
bool, if TRUE only indices $i < j$ are returned
val
numeric value, indices of matrix entries with this value are returned

Value

Return value is a list with the indices of all pairs of amino acids that fulfill the above stated condition.

Details

All amino acid pairs with cm[i,j] == val are extracted from the cm. Each pair is listed once $[i,j] = [j,i]$ (if single = TRUE) with $i < j$. If d is specified the contacts of the off-diagonal (peptide bonds) are left out, otherwise they will be returned as well. The values of d are the indices of the off-diagonal entries that do not represent a peptide bond.

See Also

build.contacts, simc

Examples

Run this code
mat<-matrix(c(0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0,
              0, 1, 0, 1, 0, 0), ncol = 5)
get.contact.list(mat)

Run the code above in your browser using DataLab