Home > FR3DSource > mSynList.m

mSynList

PURPOSE ^

mSynList.m %By Ali Mokdad %April 21, 2006

SYNOPSIS ^

function [synlist, chi_degree]= mSynList(File)

DESCRIPTION ^

mSynList.m    %By Ali Mokdad     %April 21, 2006
This function finds all SYN occurances in a PDB file that has been read.
It follows the latest definition for SYN (functional SYN) found in my research (see my MS thesis):
A nucleotide is SYN if the angle CHI between the sugar and the base is such that 0<CHI<+90 degrees
(instead of the conventional definition for SYN which is -90<CHI<+90 degrees)
Pay attention that CHI can take values between -180 and +180

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %mSynList.m    %By Ali Mokdad     %April 21, 2006
0002 %This function finds all SYN occurances in a PDB file that has been read.
0003 %It follows the latest definition for SYN (functional SYN) found in my research (see my MS thesis):
0004 %A nucleotide is SYN if the angle CHI between the sugar and the base is such that 0<CHI<+90 degrees
0005 %(instead of the conventional definition for SYN which is -90<CHI<+90 degrees)
0006 %Pay attention that CHI can take values between -180 and +180
0007 
0008 %To run this function, do the following
0009 % Filenames='rr0033_5S';
0010 % [File,SIndex]=zAddNTData(Filenames,0);
0011 % [synlist chi_degree]= mSynList(File);
0012 
0013 function [synlist, chi_degree]= mSynList(File)
0014 
0015 %Declare the main variables:
0016 synlist(1,length(File.NT))=0;
0017 chi_degree(1,length(File.NT))=0;
0018 
0019 for i=1:length(File.NT)
0020     %First define the vectors: O4P_C1P; GN_C1P; C1P_GN; C4orC2_GN;
0021     O4P_C1P     = File.NT(i).Sugar(1,:) - File.NT(i).Sugar(7,:);
0022     GN_C1P      = File.NT(i).Sugar(1,:) - File.NT(i).Loc(1,:);
0023     C1P_GN      = - GN_C1P;
0024     C4orC2_GN   = File.NT(i).Loc(1,:)   - File.NT(i).Loc(2,:);
0025     
0026     %%%%%chi angle definition: O4*_C1*_N1_C2 (for pyrimidines) or O4*_C1*_N9_C4 (for purines):
0027     perp_to_sugar       = cross(O4P_C1P,GN_C1P);
0028     norm_perp_to_sugar  = norm(perp_to_sugar); 
0029     perp_to_sugar       = perp_to_sugar/norm_perp_to_sugar;
0030     
0031     perp_to_base        = cross(C1P_GN,C4orC2_GN);
0032     norm_perp_to_base   = norm(perp_to_base);
0033     perp_to_base        = perp_to_base/norm_perp_to_base;
0034     
0035     cross_cross_chi = cross(perp_to_base,perp_to_sugar);
0036     
0037     % Take the dot product of the 2 vectors 'perp_to_base' & 'perp_to_sugar' to get cos(chi). Take norm(cross product) to get sin(chi).
0038     cos_chi = dot(perp_to_sugar,perp_to_base);
0039     if dot(cross_cross_chi,C1P_GN) < 0
0040         sin_chi = norm(cross_cross_chi);
0041     else
0042         sin_chi = -norm(cross_cross_chi);
0043     end
0044     chi_degree(i) = -180*atan2(sin_chi,cos_chi)/pi; %glycosidic bond angle
0045     
0046     % Giving nomenclature according to chi values: anti (most common), or syn
0047     if (chi_degree(i) >= 0) & (chi_degree(i) <= 90)%This is the new definition for functional syn
0048         synlist(i) = 1; %SYN
0049     else
0050         synlist(i) = 0; %anti
0051     end
0052 end

Generated on Fri 03-Apr-2009 09:52:35 by m2html © 2003