Accessing and Displaying Protein Information

Accessing Protein Information

ptn_get function can be used as the entry point to reading and processing a protein. A struct whose fields are the requested information (via comma-separated list given in argument which) is returned. The input argument ptn can either be a pdb-name (the chain and range can also be specified appended to the pdb-name), or a ptn struct.

function [ptn] = ptn_get(ptn, optionname, optionvalue, ...)
 an interface to read/extract/calculate various properties (e.g., atoms,
  CA-atoms) of a protein. keeps track of caching, so properties are not
  calculated each time.

default options:
 chain: -
 range: []
 which: 'protein,info,atoms,caCoords'
 recache: 0
 dbg: 0

A subset of the following list of information can be requested by comma-separating in the value of which input argument:

pdb, protein, info, atoms, caCoords, criticalPoints, atomsWithin_cp, atomsWithin_cp, atomCounts_cp, atomCenterOfMass_cp, cp_cas, writhe_cp, numPieces_cp, features_cp, features_cp_normalized, fasta

For example, let's get information about pdb 1irda:

>> ptn = ptn_get('1irda')

ptn = 
         pdb: '1irda'
     protein: [1x1 struct]
        info: [1x1 struct]
       atoms: [1x1069 struct]
    caCoords: [141x3 double]

The description of each of the protein information fields is given in the table below. Some of the fields are intended as intermediate processing steps, and are cached for fast processing.

Field Description
pdb pdb name with appended chain and range information
protein The complete information as read from the pdb file
info This is the summary of chain containing: residue range, number of broken backbone regions or inconsecutive backbone regions, number of structural models
atoms The list of atoms with their 3D coordinates
caCoords C-alpha carbon atom coordinates
criticalPoints The set of critical points with their coordinates, radii, and persistency values
atomsWithin_cp The side-chain atoms that reside within the each critical point's neighborhood
atomCounts_cp The atomsWithin_cp are compiled into counts for each atom type
atomCenterOfMass_cp the center of mass of atom types within each cp
cp_cas list of alpha Carbons within each cp
writhe_cp writhing values of the backbone pieces within cp
numPieces_cp number of backbone pieces within cp
features_cp the extracted features of each cp
features_cp_normalized normalized values for the features
fasta the sequence of the pdb chain in fasta format

Here is an example of getting caCoords and criticalPoints of 1irda:

>> ptn=ptn_get('1irda','which','caCoords,criticalPoints')

ptn = 
               pdb: '1irda'
          caCoords: [141x3 double]
    criticalPoints: [209x7 double]

Displaying Proteins and Critical Points

draw_backbone function will draw the protein backbone in 3D. As parameter you can give a list of coordinates for alpha Carbons, or a pdb filename, or a protein struct that you get from ptn_get function.

function draw_backbone(coords, varargin)
 draws the protein backbone in 3D
 coords can be pdb file name, a protein struct, or a list of coords.

default options:
 simple:    1 %simple stick figure, or 
 LineWidth: 1 %backbone thickness
 useSphere: 0 %use spheres for c-alpha atoms?
 sphereRadius: .4
 sphereDetails: 6 %number of polygons to use
 cylinderDetail: 8 %number of polygons to use
 color: [.2 .2 .2] %drawing color
 withLabels:  0 %show sequence numbers?
 labelShift:  0.3 %shift the label from center
 R:  [] %rotation matrix, helpful when drawing aligned structures
 T:  [] %translation matrix
 lighting: 'gouraud'
 shading: 'interp'
 colormap: 'gray'
 renderer: 'OpenGL'

As an example, let's draw protein irda:

>> draw_backbone('1irda','simple',0,'useSphere',1,'colormap','bone');

1irda backbone
Figure. irda backbone

You can drag&move the mouse pointer to rotate the protein, or use the Matlab's figure toolbar for zoom and other figure options. Let's draw again, only a section of the backbone, using the protein struct from ptn_get function, as simple sticks with sequence labels:

>> ptn=ptn_get('1irda','which','caCoords,criticalPoints')

ptn = 
               pdb: '1irda'
          caCoords: [141x3 double]
    criticalPoints: [209x7 double]

>> draw_backbone(ptn.caCoords(1:40, :),'simple',1,'withLabels',1);

1irda backbone with labels
Figure. irda backbone piece [1:40] with sequence labels.

Now, we can use draw_center function to draw the critical points onto the protein structure:

function handles=draw_cps(centers, varargin)
 draws critical points. use this together with draw_backbone.

default options:
 large: 0
 shift: 0.3
 withSpheres: 1
 R:  []
 T:  []
 labelStart:  1
 labels: []
 withDetails: 0
 withCenter:  1
 withLabel:   1
 sphereDetails: 16
 color: b
 tetra: []
 caCoords: []

and now, let's draw some critical points of irda:

>> draw_backbone(ptn,'simple',0);
>> draw_centers(ptn.criticalPoints([1 10 20 50], :), 'labels',[1 10 20 50]);

1irda backbone and critical points
Figure. irda backbone and some critical points.

app/lfmpro/sample-ptn_get.txt · Last modified: 2010/01/09 23:33 by Ahmet Sacan