Last data update: 2014.03.03

R: Extract Data from a PDB-File
extractPDBR Documentation

Extract Data from a PDB-File

Description

This function reads a PDB file and extracts data from it.

Usage

extractPDB(file.name, verbose = TRUE)

Arguments

file.name

name of the PDB file

verbose

logical, if TRUE prints the output from both functions read.pdb() and atom.select().

Details

The input PDB file is read. All C_{α} atoms are extracted. For each C_{α} atom the x-, y- and z-coordinates as well as the amino acid type and the B factor are extracted. The sequence length is compared to the number of C_{α} atoms in the PDB. For each chain of the protein the length is computed.

Value

Returns a list with the following components:

pdb

list of class “pdb” as originally extracted by read.pdb() in the bio3d package

seq

sequence according to the “SEQRES” entries of the PDB file

lseq

length of the extracted sequence seq

lca

number of C_{α} atoms

caseq

sequence data for the C_{α} selection

coords

matrix of coordinates for each C_{α} atom, the rows are the C_{α}'s, the columns are x, y, z

b

B factor for each C_{α}

chains

integer vector with the lengths of the different chains in the protein sequence

Note

Alternate and insert records in the PDB file are ignored. When removing alternate records a message is printed. Please check the PDB file.

If the number of C_{α} atoms lca and the length of the extracted sequence seq differ, a message is printed. It is not advisable to use any other parts of the BioPhysConnectoR-package until you have found an appropriate solution to deal with this problem in the pdb-file.

This function includes source code of the bio3d package.

Author(s)

Franziska Hoffgaard

References

Grant, Rodrigues, ElSawy, McCammon, Caves, (2006) Bioinformatics 22, 2695–2696.

Examples

pdb<-extractPDB(system.file("1KZK.pdb", package = "BioPhysConnectoR"))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(BioPhysConnectoR)
Loading required package: snow
Loading required package: matrixcalc
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/BioPhysConnectoR/extractPDB.Rd_%03d_medium.png", width=480, height=480)
> ### Name: extractPDB
> ### Title: Extract Data from a PDB-File
> ### Aliases: extractPDB
> ### Keywords: IO
> 
> ### ** Examples
> 
> pdb<-extractPDB(system.file("1KZK.pdb", package = "BioPhysConnectoR"))
  HEADER    VIRAL PROTEIN, HYDROLASE                06-FEB-02   1KZK               
   PDB has ALT records, taking A only, rm.alt=TRUE
      segid  chain  resno  resid  eleno  elety
Stest ""     ""     ""     ""     ""     "CA" 
Natom "3019" "3019" "3019" "3019" "3019" "198"
 *  Selected a total of: 198 intersecting atoms  *
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>