Following this link may get you blocked.

Differences

This shows you the differences between two versions of the page.

app:lfmpro:sample-ptn_get [2010/01/09 23:33] (current)
Ahmet Sacan
Line 1: Line 1:
 +====== 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.
 +
 +<code>
 +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
 +</code>
 +
 +A subset of the following list of information can be requested by comma-separating in the value of ''which'' input argument:
 +<style box>
 +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
 +</style>
 +
 +
 +For example, let's get information about pdb ''1irda'':
 +<code>
 +>> ptn = ptn_get('1irda')
 +
 +ptn =
 +         pdb: '1irda'
 +     protein: [1x1 struct]
 +        info: [1x1 struct]
 +       atoms: [1x1069 struct]
 +    caCoords: [141x3 double]
 +</code>
 +
 +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'':
 +<code>
 +>> ptn=ptn_get('1irda','which','caCoords,criticalPoints')
 +
 +ptn =
 +               pdb: '1irda'
 +          caCoords: [141x3 double]
 +    criticalPoints: [209x7 double]
 +</code>
 +
 +===== 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.
 +<code>
 +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'
 +</code>
 +
 +As an example, let's draw protein ''irda'':
 +<code>
 +>> draw_backbone('1irda','simple',0,'useSphere',1,'colormap','bone');
 +</code>
 +<style center>
 +{{1irda.jpg|1irda backbone}}
 +\\
 +Figure. irda backbone
 +</style>
 +
 +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:
 +<code>
 +>> 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);
 +</code>
 +<style center>
 +{{1irda.withlabels.jpg|1irda backbone with labels}}
 +\\
 +Figure. irda backbone piece [1:40] with sequence labels.
 +</style>
 +
 +
 +Now, we can use ''draw_center'' function to draw the critical points onto the protein structure:
 +<code>
 +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: []
 +</code>
 +
 +and now, let's draw some critical points of irda:
 +<code>
 +>> draw_backbone(ptn,'simple',0);
 +>> draw_centers(ptn.criticalPoints([1 10 20 50], :), 'labels',[1 10 20 50]);
 +</code>
 +<style center>
 +{{1irda.withcps.jpg|1irda backbone and critical points}}
 +\\
 +Figure. irda backbone and some critical points.
 +</style>