| centres.ppRoll | R Documentation |
Computes the geometric centres using a rolling window on a polypeptide chain
## S3 method for class 'ppRoll'
centres(x, window, ...)
## Default S3 method:
centres.ppRoll(x, window = 34, na.rm = TRUE, ...)
## S3 method for class 'atoms'
centres.ppRoll(x, window = 34, chain = NULL, na.rm = TRUE, ...)
## S3 method for class 'pdb'
centres.ppRoll(x, window = 34, chain = NULL, na.rm = TRUE, ...)
x |
an R object containing atomic coordinates (with additional class |
window |
size of the rolling window, specified as number of amino-acids; |
... |
further arguments passed to or from other methods. |
na.rm |
a logical value indicating whether NA values should be stripped before the computation proceeds. |
chain |
apply only to the respective chains, by default all chains; |
‘centres.ppRoll’ is a generic function to compute the geometric centres using a rolling window on an object containing atomic coordinates for a polypeptide chain. Due to limitations by CRAN check, the function is further referred as ‘centres’.
The function may be useful to visualize the overall protein structure, but in a less cluttered way. Unlike the protein backbone, the centres may capture better the bulk of the protein.
Return an object of class ‘coords’ containing the coordinates of the centres.
coords, atoms, pdb.
### Example 1: Toll-Like Receptor 2
# Download pdb file for TLR2: 2Z81;
# Read the pdb-file:
# x = read.pdb("pdb2z81.ent")
# Compute the centres:
# tmp = centres.ppRoll(x)
# Visualize the structure:
# visualize(x, type="p", pbc.box = FALSE)
# lines3d(tmp, lwd = 5, col = "red")
# Add Another "strand":
# tmp = centres.ppRoll(x, window = 8)
# lines3d(tmp, lwd = 5, col = "#FA3296")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.