Learn R Programming

Rknots (version 1.3.2)

loadProtein: Import a pdb file or fetch it from the Protein Data Bank. Check for structural gaps. Build and return a backbone trace for each polypeptide chain.

Description

Import a pdb file either by fetching the Protein Data Bank or from the file system and return the alpha-Carbon atoms coordinates.

Usage

loadProtein(pdbID, join.gaps = FALSE, cutoff = 7, ...)

Arguments

pdbID
a single element character vector containing the path to the file in the file system and the name of the PDB file to be read, or the four letter PDB identifier for online file access (fetched from the PDB). For the latter, the pdbID is not case sensitive.
join.gaps
logical (default FALSE). If TRUE, gaps are joined together with a straight line.
cutoff
numeric (in Angstrom), distances between consecutive alpha-Carbon atoms greater than cutoff are considered as gaps.
...
any other parameter for the read.pdb function of bio3d. See the manual for details.

Value

A list of length equal to the number of polypeptide chain (if gaps are not present or not considered) or greater (if gaps are present), where each element contains an $N$ x 3 matrix with the $x$, $y$, $z$ coordinates of the chain (or subchain) model.

Details

If the selected PDB entry contains more than one polypeptide chain, all the available chains are loaded or downloaded. The PDB atom field is then filtered individually to retain the coordinates of the protein C-alpha trace. If join.gaps is FALSE, additional chains (one for each split) will be produced and labeled according to the following: if $C$ is a chain and $C$ is split in $j$ subchains due to gaps, the resulting subchains will be labeled with $C_1, \ldots, C_j$.

Notice that any other model or any three-dimensional structure can be directly loaded in R as an $N$ x 3 matrix, where the columns represents the $x$, $y$, $z$ coordinates. To this purpose, please see the help pages of read.table, read.delim, read.csv, etc.

References

Grant, Rodrigues, ElSawy, McCammon, Caves (2006) Bio3D: An R package for the comparative analysis of protein structures., Bioinformatics 22, 2695-2696

Examples

Run this code
## Not run: 
# ## Loading from the file system
# fn <- system.file("extdata", "1AJC_chainA.pdb", package="Rknots")
# protein <- loadProtein(fn)
# 
# ## Fetching the PDB
# protein<- loadProtein('2K0A')
# #more than one chain (notice the split)
# protein <- loadProtein('1GZ0')
# str(protein)
# 
# #A protein with two subunits. The first one is split in two subchains.
# protein <- loadProtein('1AJC', join.gaps = FALSE, cutoff = 7)
# str(protein)
# ## End(Not run)

Run the code above in your browser using DataLab