annotate bin/InfoPDBFiles.pl @ 3:90ea638ce878 draft default tip

Uploaded
author deepakjadmin
date Wed, 20 Jan 2016 09:11:59 -0500
parents 2abf0d43254d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
1 #!/usr/bin/perl -w
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
2 #
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
3 # $RCSfile: InfoPDBFiles.pl,v $
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
4 # $Date: 2015/02/28 20:46:20 $
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
5 # $Revision: 1.36 $
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
6 #
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
7 # Author: Manish Sud <msud@san.rr.com>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
8 #
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
9 # Copyright (C) 2015 Manish Sud. All rights reserved.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
10 #
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
11 # This file is part of MayaChemTools.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
12 #
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
13 # MayaChemTools is free software; you can redistribute it and/or modify it under
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
14 # the terms of the GNU Lesser General Public License as published by the Free
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
15 # Software Foundation; either version 3 of the License, or (at your option) any
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
16 # later version.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
17 #
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
18 # MayaChemTools is distributed in the hope that it will be useful, but without
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
19 # any warranty; without even the implied warranty of merchantability of fitness
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
20 # for a particular purpose. See the GNU Lesser General Public License for more
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
21 # details.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
22 #
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
23 # You should have received a copy of the GNU Lesser General Public License
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
24 # along with MayaChemTools; if not, see <http://www.gnu.org/licenses/> or
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
25 # write to the Free Software Foundation Inc., 59 Temple Place, Suite 330,
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
26 # Boston, MA, 02111-1307, USA.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
27 #
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
28
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
29 use strict;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
30 use FindBin; use lib "$FindBin::Bin/../lib";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
31 use Getopt::Long;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
32 use File::Basename;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
33 use Text::ParseWords;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
34 use Benchmark;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
35 use FileUtil;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
36 use TextUtil;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
37 use PDBFileUtil;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
38
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
39 my($ScriptName, %Options, $StartTime, $EndTime, $TotalTime);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
40
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
41 # Autoflush STDOUT
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
42 $| = 1;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
43
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
44 # Starting message...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
45 $ScriptName = basename($0);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
46 print "\n$ScriptName: Starting...\n\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
47 $StartTime = new Benchmark;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
48
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
49 # Get the options and setup script...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
50 SetupScriptUsage();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
51 if ($Options{help} || @ARGV < 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
52 die GetUsageFromPod("$FindBin::Bin/$ScriptName");
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
53 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
54
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
55 my(@PDBFilesList);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
56 @PDBFilesList = ExpandFileNames(\@ARGV, "pdb");
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
57
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
58 # Process options...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
59 print "Processing options...\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
60 my(%OptionsInfo);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
61 ProcessOptions();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
62
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
63 # Setup information about input files...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
64 my(%PDBFilesInfo);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
65 print "Checking input PDB file(s)...\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
66 RetrievePDBFilesInfo();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
67
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
68 # Process input files..
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
69 my($FileIndex);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
70 if (@PDBFilesList > 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
71 print "\nProcessing PDB files...\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
72 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
73 for $FileIndex (0 .. $#PDBFilesList) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
74 if ($PDBFilesInfo{FileOkay}[$FileIndex]) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
75 print "\nProcessing file $PDBFilesList[$FileIndex]...\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
76 ListPDBFileInfo($FileIndex);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
77 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
78 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
79 ListTotalSizeOfFiles();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
80
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
81 print "\n$ScriptName:Done...\n\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
82
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
83 $EndTime = new Benchmark;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
84 $TotalTime = timediff ($EndTime, $StartTime);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
85 print "Total time: ", timestr($TotalTime), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
86
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
87 ###############################################################################
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
88
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
89 # List appropriate information...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
90 sub ListPDBFileInfo {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
91 my($Index) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
92 my($PDBFile, $PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
93
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
94 $PDBFile = $PDBFilesList[$Index];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
95 $PDBRecordLinesRef = ReadPDBFile($PDBFile);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
96
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
97 # Header informaton...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
98 if ($OptionsInfo{ListHeaderInfo}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
99 ListHeaderInfo($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
100 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
101
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
102 # Experiment informaton...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
103 if ($OptionsInfo{ListExperimentalTechniqueInfo}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
104 ListExperimentalTechniqueInfo($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
105 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
106
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
107 # Total number of records...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
108 my($TotalRecordsCount) = scalar @{$PDBRecordLinesRef};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
109 print "\nTotal number of records: $TotalRecordsCount\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
110
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
111 # List record type count information...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
112 ListRecordTypesInfo($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
113
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
114 if ($OptionsInfo{CountChains} || $OptionsInfo{CountResiduesInChains} || $OptionsInfo{ResiduesFrequencyInChains}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
115 ListChainsAndResiduesInfo($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
116 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
117 if ($OptionsInfo{CountResiduesAll} || $OptionsInfo{ResiduesFrequencyAll}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
118 ListAllResiduesInfo($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
119 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
120 if ($OptionsInfo{ResidueNumbersInfo}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
121 ListResidueNumbersInfo($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
122 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
123 if ($OptionsInfo{CalculateBoundingBox}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
124 ListBoundingBox($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
125 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
126
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
127 # File size and modification information...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
128 print "\nFile size: ", FormatFileSize($PDBFilesInfo{FileSize}[$Index]), " \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
129 print "Last modified: ", $PDBFilesInfo{FileLastModified}[$Index], " \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
130 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
131
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
132 sub ListHeaderInfo {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
133 my($PDBRecordLinesRef) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
134 my($HeaderRecordLine, $Classification, $DepositionDate, $IDCode);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
135
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
136 ($Classification, $DepositionDate, $IDCode) = (undef) x 3;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
137 $HeaderRecordLine = $PDBRecordLinesRef->[0];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
138 if (IsHeaderRecordType($HeaderRecordLine)) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
139 ($Classification, $DepositionDate, $IDCode) = ParseHeaderRecordLine($HeaderRecordLine);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
140 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
141
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
142 $Classification = IsEmpty($Classification) ? 'Not available' : $Classification;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
143 $DepositionDate = IsEmpty($DepositionDate) ? 'Not available' : $DepositionDate;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
144 $IDCode = IsEmpty($IDCode) ? 'Not available' : $IDCode;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
145
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
146 print "\nClassification: $Classification\nID: $IDCode\nDeposition date: $DepositionDate\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
147 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
148
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
149 # List experimental technique information info...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
150 sub ListExperimentalTechniqueInfo {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
151 my($PDBRecordLinesRef) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
152 my($ExperimentalTechnique, $Resolution, $ResolutionUnits);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
153
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
154 $ExperimentalTechnique = GetExperimentalTechnique($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
155 print "\nExperimental technique: " . ($ExperimentalTechnique ? $ExperimentalTechnique : "Not available") . "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
156
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
157 ($Resolution, $ResolutionUnits) = GetExperimentalTechniqueResolution($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
158 print "Resolution: " . ($Resolution ? "$Resolution $ResolutionUnits" : "Not available") . "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
159
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
160 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
161
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
162 # List record type info...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
163 sub ListRecordTypesInfo {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
164 my($PDBRecordLinesRef) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
165 my($RecordType, $RecordCount, $RecordTypesCountRef, @RecordTypeCountInfo);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
166
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
167 $RecordTypesCountRef = GetRecordTypesCount($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
168
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
169 @RecordTypeCountInfo = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
170 if ($OptionsInfo{CountRecordType} =~ /^All$/i) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
171 for $RecordType (@{$RecordTypesCountRef->{RecordTypes}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
172 $RecordCount = $RecordTypesCountRef->{Count}{$RecordType};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
173 push @RecordTypeCountInfo, "$RecordType - $RecordCount";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
174 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
175 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
176 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
177 for $RecordType (@{$OptionsInfo{SpecifiedRecordTypes}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
178 $RecordCount = (exists $RecordTypesCountRef->{Count}{$RecordType}) ? ($RecordTypesCountRef->{Count}{$RecordType}) : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
179 push @RecordTypeCountInfo, "$RecordType - $RecordCount";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
180 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
181 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
182 print "Number of individual records: ", JoinWords(\@RecordTypeCountInfo, '; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
183
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
184 if ($OptionsInfo{CheckMasterRecord}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
185 CheckMasterRecord($RecordTypesCountRef, $PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
186 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
187 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
188
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
189 # List information about residues and chains...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
190 sub ListChainsAndResiduesInfo {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
191 my($PDBRecordLinesRef) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
192 my($ResidueName, $ResidueCount, $ChainCount, $ChainID, $CollectChainResiduesBeyondTER, $ChainsAndResiduesInfoRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
193
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
194 $CollectChainResiduesBeyondTER = 1;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
195 $ChainsAndResiduesInfoRef = GetChainsAndResidues($PDBRecordLinesRef, 'AtomAndHetatm', $CollectChainResiduesBeyondTER);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
196 $ChainCount = @{$ChainsAndResiduesInfoRef->{ChainIDs}};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
197 if ($OptionsInfo{CountChains}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
198 print "\nNumber of chains: $ChainCount \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
199 my($ChainID, @ChainIDsList);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
200 @ChainIDsList = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
201 for $ChainID (@{$ChainsAndResiduesInfoRef->{ChainIDs}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
202 push @ChainIDsList, CleanupChainID($ChainID);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
203 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
204 print "Chain IDs: ", JoinWords(\@ChainIDsList, ', ', 0),"\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
205 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
206
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
207 if ($OptionsInfo{CountResiduesInChains}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
208 my($TotalResiduesCount, $ResidueCountInfo, @ResiduesCountInfo);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
209 @ResiduesCountInfo = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
210 $TotalResiduesCount = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
211 for $ChainID (@{$ChainsAndResiduesInfoRef->{ChainIDs}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
212 $ResidueCount = @{$ChainsAndResiduesInfoRef->{Residues}{$ChainID}};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
213 $TotalResiduesCount += $ResidueCount;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
214 $ResidueCountInfo = "Chain ${ChainID} - ${ResidueCount}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
215 push @ResiduesCountInfo, $ResidueCountInfo;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
216 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
217 print "\nNumber of residues in chain(s): ";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
218 if ($ChainCount > 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
219 print "Total - $TotalResiduesCount; ", JoinWords(\@ResiduesCountInfo, '; ', 0),"\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
220 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
221 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
222 print "$TotalResiduesCount\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
223 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
224
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
225 # List of residues in each chain...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
226 if ($OptionsInfo{DetailLevel} >= 3) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
227 print "List of residues in chain(s): \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
228 for $ChainID (@{$ChainsAndResiduesInfoRef->{ChainIDs}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
229 if ($ChainCount > 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
230 print "Chain ", CleanupChainID($ChainID), ": ";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
231 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
232 print JoinWords(\@{$ChainsAndResiduesInfoRef->{Residues}{$ChainID}}, ', ', 0),"\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
233 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
234 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
235 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
236 if ($OptionsInfo{ResiduesFrequencyInChains}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
237 # Setup a hash using residue count as key for sorting the values...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
238 my(%ResiduesCountToNameMap);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
239 %ResiduesCountToNameMap = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
240 @{$ResiduesCountToNameMap{ChainIDs}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
241 %{$ResiduesCountToNameMap{ResidueNames}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
242
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
243 for $ChainID (@{$ChainsAndResiduesInfoRef->{ChainIDs}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
244 push @{$ResiduesCountToNameMap{ChainIDs}}, $ChainID;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
245 %{$ResiduesCountToNameMap{ResidueNames}{$ChainID}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
246
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
247 for $ResidueName (sort keys %{$ChainsAndResiduesInfoRef->{ResidueCount}{$ChainID}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
248 $ResidueCount = $ChainsAndResiduesInfoRef->{ResidueCount}{$ChainID}{$ResidueName};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
249 # Setup count value for each chain...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
250 if (exists $ResiduesCountToNameMap{ResidueNames}{$ChainID}{$ResidueCount}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
251 $ResiduesCountToNameMap{ResidueNames}{$ChainID}{$ResidueCount} .= "~${ResidueName}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
252 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
253 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
254 $ResiduesCountToNameMap{ResidueNames}{$ChainID}{$ResidueCount} = $ResidueName;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
255 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
256 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
257 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
258 # Collect data for all the residues in all the chains...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
259 my(%AllResiduesNameToCountMap, %AllResiduesCountToNameMap);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
260 %AllResiduesNameToCountMap = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
261 %AllResiduesCountToNameMap = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
262 if ($ChainCount > 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
263 for $ChainID (@{$ChainsAndResiduesInfoRef->{ChainIDs}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
264 for $ResidueName (keys %{$ChainsAndResiduesInfoRef->{ResidueCount}{$ChainID}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
265 $ResidueCount = $ChainsAndResiduesInfoRef->{ResidueCount}{$ChainID}{$ResidueName};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
266 if (exists $AllResiduesNameToCountMap{$ResidueName}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
267 $AllResiduesNameToCountMap{$ResidueName} += $ResidueCount;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
268 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
269 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
270 $AllResiduesNameToCountMap{$ResidueName} = $ResidueCount;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
271 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
272 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
273 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
274 for $ResidueName (keys %AllResiduesNameToCountMap) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
275 $ResidueCount = $AllResiduesNameToCountMap{$ResidueName};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
276 if (exists $AllResiduesCountToNameMap{$ResidueCount}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
277 $AllResiduesCountToNameMap{$ResidueCount} .= "~${ResidueName}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
278 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
279 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
280 $AllResiduesCountToNameMap{$ResidueCount} = $ResidueName;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
281 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
282 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
283 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
284
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
285 # Setup distribution data for individual chains and the grand total as well...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
286 my($ChainResidueCount, $PercentResidueCount, $TotalResidueCount, $ResidueNames, @ResidueNamesList, %ResiduesFrequencyInfoMap);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
287 @{$ResiduesFrequencyInfoMap{ChainIDs}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
288 %{$ResiduesFrequencyInfoMap{Frequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
289 %{$ResiduesFrequencyInfoMap{PercentFrequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
290
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
291 @{$ResiduesFrequencyInfoMap{AllChainsFrequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
292 @{$ResiduesFrequencyInfoMap{AllChainsPercentFrequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
293
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
294 $TotalResidueCount = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
295
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
296 for $ChainID (@{$ResiduesCountToNameMap{ChainIDs}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
297 push @{$ResiduesFrequencyInfoMap{ChainIDs}}, $ChainID;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
298 @{$ResiduesFrequencyInfoMap{Frequency}{$ChainID}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
299 @{$ResiduesFrequencyInfoMap{PercentFrequency}{$ChainID}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
300
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
301 $ChainResidueCount = @{$ChainsAndResiduesInfoRef->{Residues}{$ChainID}};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
302 $TotalResidueCount += $ChainResidueCount;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
303
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
304 for $ResidueCount (sort {$b <=> $a} keys %{$ResiduesCountToNameMap{ResidueNames}{$ChainID}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
305 $ResidueNames = $ResiduesCountToNameMap{ResidueNames}{$ChainID}{$ResidueCount};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
306 @ResidueNamesList = split /~/, $ResidueNames;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
307 for $ResidueName (@ResidueNamesList) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
308 push @{$ResiduesFrequencyInfoMap{Frequency}{$ChainID}}, "${ResidueName} - ${ResidueCount}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
309 $PercentResidueCount = sprintf("%.1f", (($ResidueCount/$ChainResidueCount)*100)) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
310 push @{$ResiduesFrequencyInfoMap{PercentFrequency}{$ChainID}}, "${ResidueName} - ${PercentResidueCount}%";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
311 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
312 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
313 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
314 if ($ChainCount > 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
315 for $ResidueCount (sort {$b <=> $a} keys %AllResiduesCountToNameMap) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
316 $ResidueNames = $AllResiduesCountToNameMap{$ResidueCount};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
317 @ResidueNamesList = split /~/, $ResidueNames;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
318 for $ResidueName (@ResidueNamesList) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
319 push @{$ResiduesFrequencyInfoMap{AllChainsFrequency}}, "${ResidueName} - ${ResidueCount}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
320 $PercentResidueCount = sprintf("%.1f", (($ResidueCount/$TotalResidueCount)*100)) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
321 push @{$ResiduesFrequencyInfoMap{AllChainsPercentFrequency}}, "${ResidueName} - ${PercentResidueCount}%";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
322 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
323 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
324 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
325
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
326 # List distribution of residues
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
327 print "\nDistribution of residues in chain(s): \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
328 for $ChainID (@{$ResiduesFrequencyInfoMap{ChainIDs}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
329 if ($ChainCount > 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
330 print "Chain ", CleanupChainID($ChainID), ": ";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
331 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
332 print JoinWords(\@{$ResiduesFrequencyInfoMap{Frequency}{$ChainID}}, '; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
333 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
334 if ($OptionsInfo{DetailLevel} >= 2) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
335 print "\nPercent distribution of residues in chain(s): \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
336 for $ChainID (@{$ResiduesFrequencyInfoMap{ChainIDs}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
337 if ($ChainCount > 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
338 print "Chain ", CleanupChainID($ChainID), ": ";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
339 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
340 print JoinWords(\@{$ResiduesFrequencyInfoMap{PercentFrequency}{$ChainID}}, '; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
341 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
342 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
343 if ($ChainCount > 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
344 print "\nDistribution of residues across all chains: \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
345 print JoinWords(\@{$ResiduesFrequencyInfoMap{AllChainsFrequency}}, '; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
346
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
347 if ($OptionsInfo{DetailLevel} >= 2) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
348 print "\nPercent distribution of residues across all chains: \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
349 print JoinWords(\@{$ResiduesFrequencyInfoMap{AllChainsPercentFrequency}}, '; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
350 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
351 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
352 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
353 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
354
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
355 # List information about all the residues...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
356 sub ListAllResiduesInfo {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
357 my($PDBRecordLinesRef) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
358 my($TotalResidueCount, $AtomResiduesCount, $HetatmResiduesCount, $ResiduesInfoRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
359
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
360 $ResiduesInfoRef = GetAllResidues($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
361 $TotalResidueCount = @{$ResiduesInfoRef->{ResidueNames}};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
362 $AtomResiduesCount = @{$ResiduesInfoRef->{AtomResidueNames}};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
363 $HetatmResiduesCount = @{$ResiduesInfoRef->{HetatmResidueNames}};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
364
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
365 if ($OptionsInfo{CountResiduesAll}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
366 print "\nTotal number of residues: Total - $TotalResidueCount; ATOM residues - $AtomResiduesCount; HETATM residues - $HetatmResiduesCount\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
367
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
368 if ($OptionsInfo{DetailLevel} >= 3) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
369 print "List of residues: \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
370 if ($AtomResiduesCount) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
371 print "ATOM residues: ", JoinWords(\@{$ResiduesInfoRef->{AtomResidueNames}}, ', ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
372 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
373 if ($HetatmResiduesCount) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
374 print "HETATM residues: ", JoinWords(\@{$ResiduesInfoRef->{HetatmResidueNames}}, ', ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
375 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
376 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
377 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
378
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
379 if ($OptionsInfo{ResiduesFrequencyAll}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
380 my($ResidueName, $ResidueCount);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
381
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
382 # Setup a hash using residue count as key for sorting the values...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
383 my(%ResiduesCountToNameMap, %AtomResiduesCountToNameMap, %HetatmResiduesCountToNameMap);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
384 %ResiduesCountToNameMap = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
385 %{$ResiduesCountToNameMap{ResidueNames}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
386
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
387 %AtomResiduesCountToNameMap = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
388 %{$AtomResiduesCountToNameMap{ResidueNames}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
389
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
390 %HetatmResiduesCountToNameMap = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
391 %{$HetatmResiduesCountToNameMap{ResidueNames}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
392
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
393 for $ResidueName (keys %{$ResiduesInfoRef->{ResidueCount}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
394 $ResidueCount = $ResiduesInfoRef->{ResidueCount}{$ResidueName};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
395 if (exists $ResiduesCountToNameMap{ResidueNames}{$ResidueCount}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
396 $ResiduesCountToNameMap{ResidueNames}{$ResidueCount} .= "~${ResidueName}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
397 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
398 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
399 $ResiduesCountToNameMap{ResidueNames}{$ResidueCount} = $ResidueName;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
400 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
401 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
402
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
403 if ($OptionsInfo{DetailLevel} >= 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
404 for $ResidueName (keys %{$ResiduesInfoRef->{AtomResidueCount}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
405 $ResidueCount = $ResiduesInfoRef->{AtomResidueCount}{$ResidueName};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
406 if (exists $AtomResiduesCountToNameMap{ResidueNames}{$ResidueCount}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
407 $AtomResiduesCountToNameMap{ResidueNames}{$ResidueCount} .= "~${ResidueName}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
408 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
409 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
410 $AtomResiduesCountToNameMap{ResidueNames}{$ResidueCount} = $ResidueName;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
411 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
412 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
413 for $ResidueName (keys %{$ResiduesInfoRef->{HetatmResidueCount}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
414 $ResidueCount = $ResiduesInfoRef->{HetatmResidueCount}{$ResidueName};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
415 if (exists $HetatmResiduesCountToNameMap{ResidueNames}{$ResidueCount}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
416 $HetatmResiduesCountToNameMap{ResidueNames}{$ResidueCount} .= "~${ResidueName}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
417 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
418 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
419 $HetatmResiduesCountToNameMap{ResidueNames}{$ResidueCount} = $ResidueName;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
420 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
421 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
422 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
423
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
424 # Setup distribution of residues info...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
425 my($ResidueNames, $PercentResidueCount, @ResidueNamesList, %ResiduesCountInfoMap, %AtomResiduesCountInfoMap, %HetatmResiduesCountInfoMap);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
426
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
427 @{$ResiduesCountInfoMap{Frequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
428 @{$ResiduesCountInfoMap{PercentFrequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
429 for $ResidueCount (sort {$b <=> $a} keys %{$ResiduesCountToNameMap{ResidueNames}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
430 $PercentResidueCount = sprintf("%.1f", (($ResidueCount/$TotalResidueCount)*100)) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
431 $ResidueNames = $ResiduesCountToNameMap{ResidueNames}{$ResidueCount};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
432 @ResidueNamesList = split /~/, $ResidueNames;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
433 for $ResidueName (@ResidueNamesList) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
434 push @{$ResiduesCountInfoMap{Frequency}}, "${ResidueName} - ${ResidueCount}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
435 push @{$ResiduesCountInfoMap{PercentFrequency}}, "${ResidueName} - ${PercentResidueCount}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
436 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
437 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
438 if ($OptionsInfo{DetailLevel} >= 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
439 @{$AtomResiduesCountInfoMap{Frequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
440 @{$AtomResiduesCountInfoMap{PercentFrequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
441 for $ResidueCount (sort {$b <=> $a} keys %{$AtomResiduesCountToNameMap{ResidueNames}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
442 $PercentResidueCount = sprintf("%.1f", (($ResidueCount/$TotalResidueCount)*100)) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
443 $ResidueNames = $AtomResiduesCountToNameMap{ResidueNames}{$ResidueCount};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
444 @ResidueNamesList = split /~/, $ResidueNames;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
445 for $ResidueName (@ResidueNamesList) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
446 push @{$AtomResiduesCountInfoMap{Frequency}}, "${ResidueName} - ${ResidueCount}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
447 push @{$AtomResiduesCountInfoMap{PercentFrequency}}, "${ResidueName} - ${PercentResidueCount}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
448 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
449 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
450 @{$HetatmResiduesCountInfoMap{Frequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
451 @{$HetatmResiduesCountInfoMap{PercentFrequency}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
452 for $ResidueCount (sort {$b <=> $a} keys %{$HetatmResiduesCountToNameMap{ResidueNames}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
453 $PercentResidueCount = sprintf("%.1f", (($ResidueCount/$TotalResidueCount)*100)) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
454 $ResidueNames = $HetatmResiduesCountToNameMap{ResidueNames}{$ResidueCount};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
455 @ResidueNamesList = split /~/, $ResidueNames;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
456 for $ResidueName (@ResidueNamesList) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
457 push @{$HetatmResiduesCountInfoMap{Frequency}}, "${ResidueName} - ${ResidueCount}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
458 push @{$HetatmResiduesCountInfoMap{PercentFrequency}}, "${ResidueName} - ${PercentResidueCount}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
459 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
460 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
461 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
462
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
463 # List distribution of residues
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
464 print "\nDistribution of residues: ", JoinWords(\@{$ResiduesCountInfoMap{Frequency}},'; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
465 if ($OptionsInfo{DetailLevel} >= 2) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
466 print "\nPercent distribution of residues: ", JoinWords(\@{$ResiduesCountInfoMap{PercentFrequency}},'; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
467 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
468
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
469 if ($OptionsInfo{DetailLevel} >= 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
470 print "\nDistribution of ATOM residues: ", JoinWords(\@{$AtomResiduesCountInfoMap{Frequency}},'; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
471 if ($OptionsInfo{DetailLevel} >= 2) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
472 print "\nPercent distribution of ATOM residues: ", JoinWords(\@{$AtomResiduesCountInfoMap{PercentFrequency}},'; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
473 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
474
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
475 print "\nDistribution of HETATM residues: ", JoinWords(\@{$HetatmResiduesCountInfoMap{Frequency}},'; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
476 if ($OptionsInfo{DetailLevel} >= 2) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
477 print "\nPercent distribution of HETATM residues: ", JoinWords(\@{$HetatmResiduesCountInfoMap{PercentFrequency}},'; ', 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
478 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
479 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
480 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
481 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
482
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
483 # List information about residue numbers for each chain...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
484 sub ListResidueNumbersInfo {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
485 my($PDBRecordLinesRef) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
486 my($Index, $ResidueCount, $StartResidueNum, $EndResidueNum, $ChainID, $CollectChainResiduesBeyondTER, $ChainsAndResiduesInfoRef, $ResidueNum, $PreviousResidueNum, $ResidueName, $PreviousResidueName, $GapResiduePairsCount, $GapLength, $DescendingOrderResiduePairsCount, @DescendingOrderResiduePairs, @GapResiduePairs);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
487
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
488 $CollectChainResiduesBeyondTER = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
489 $ChainsAndResiduesInfoRef = GetChainsAndResidues($PDBRecordLinesRef, 'AtomAndHetatm', $CollectChainResiduesBeyondTER);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
490
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
491 print "\nATOM/HETATM residue numbers information for chains:\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
492
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
493 for $ChainID (@{$ChainsAndResiduesInfoRef->{ChainIDs}}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
494 print "\nChain ID - ", CleanupChainID($ChainID), "";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
495
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
496 $ResidueCount = @{$ChainsAndResiduesInfoRef->{ResidueNumbers}{$ChainID}};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
497
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
498 # Start and end residue numbers...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
499 $StartResidueNum = $ChainsAndResiduesInfoRef->{ResidueNumbers}{$ChainID}[0];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
500 $EndResidueNum = $ChainsAndResiduesInfoRef->{ResidueNumbers}{$ChainID}[$ResidueCount - 1];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
501 print "; Number of residues: $ResidueCount; Start residue number - $StartResidueNum; End residue number - $EndResidueNum\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
502
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
503 # Identify any gaps in residue numbers or non-ascending order residue numbers...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
504 $GapResiduePairsCount = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
505 $DescendingOrderResiduePairsCount = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
506
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
507 @DescendingOrderResiduePairs = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
508 @GapResiduePairs = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
509
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
510 RESIDUE: for $Index (1 .. ($ResidueCount - 1)) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
511 $ResidueNum = $ChainsAndResiduesInfoRef->{ResidueNumbers}{$ChainID}[$Index];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
512 $PreviousResidueNum = $ChainsAndResiduesInfoRef->{ResidueNumbers}{$ChainID}[$Index - 1];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
513
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
514 $ResidueName = $ChainsAndResiduesInfoRef->{Residues}{$ChainID}[$Index];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
515 $PreviousResidueName = $ChainsAndResiduesInfoRef->{Residues}{$ChainID}[$Index - 1];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
516
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
517 if ($ResidueNum == ($PreviousResidueNum + 1)) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
518 # All is good...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
519 next RESIDUE;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
520 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
521
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
522 # Are residue in descending order?
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
523 if ($ResidueNum < $PreviousResidueNum) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
524 $DescendingOrderResiduePairsCount++;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
525 push @DescendingOrderResiduePairs, "<${PreviousResidueName}${PreviousResidueNum} - ${ResidueName}${ResidueNum}>";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
526 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
527
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
528 # Track gaps in residue pairs...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
529 $GapResiduePairsCount++;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
530 $GapLength = abs($ResidueNum - $PreviousResidueNum) - 1;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
531
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
532 push @GapResiduePairs, "<${PreviousResidueName}${PreviousResidueNum} - ${ResidueName}${ResidueNum}; $GapLength>";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
533 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
534
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
535 # Print gaps information...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
536 print "Gaps in residue numbers: ", $GapResiduePairsCount ? "Yes" : "None";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
537 if ($GapResiduePairsCount) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
538 print "; Number of gap residue number pairs: $GapResiduePairsCount; Gap residue pairs: <StartRes-EndRes; GapLength> - ", JoinWords(\@GapResiduePairs, "; ", 0);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
539 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
540 print "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
541
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
542 # Print descending residue order information...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
543 print "Residue numbers in descending order: ", $DescendingOrderResiduePairsCount ? "Yes" : "None";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
544 if ($DescendingOrderResiduePairsCount) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
545 print "; Number of descending residue number pairs: $DescendingOrderResiduePairsCount; Descending residue number pairs: <StartRes-EndRes> ", JoinWords(\@DescendingOrderResiduePairs, "; ", 0);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
546 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
547 print "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
548 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
549 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
550
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
551 # List min/max XYZ coordinates for ATOM/HETATM records...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
552 sub ListBoundingBox {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
553 my($PDBRecordLinesRef) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
554 my($XMin, $YMin, $ZMin, $XMax, $YMax, $ZMax, $XSize, $YSize, $ZSize);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
555
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
556 ($XMin, $YMin, $ZMin, $XMax, $YMax, $ZMax) = GetMinMaxCoords($PDBRecordLinesRef);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
557 $XSize = abs($XMax - $XMin);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
558 $YSize = abs($YMax - $YMin);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
559 $ZSize = abs($ZMax - $ZMin);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
560
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
561 $XMin = sprintf("%.3f", $XMin) + 0; $XMax = sprintf("%.3f", $XMax) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
562 $YMin = sprintf("%.3f", $YMin) + 0; $YMax = sprintf("%.3f", $YMax) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
563 $ZMin = sprintf("%.3f", $ZMin) + 0; $ZMax = sprintf("%.3f", $ZMax) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
564
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
565 $XSize = sprintf("%.3f", $XSize) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
566 $YSize = sprintf("%.3f", $YSize) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
567 $ZSize = sprintf("%.3f", $ZSize) + 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
568
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
569 print "\nBounding box coordinates: <XMin, XMax> - <$XMin, $XMax>; <YMin, YMax> - <$YMin, $YMax>; <ZMin, ZMax> - <$ZMin, $ZMax>;\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
570 print "Bounding box size in angstroms: XSize - $XSize; YSize - $YSize; ZSize - $ZSize\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
571
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
572 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
573
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
574 # Check master record counts against actual record counts...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
575 sub CheckMasterRecord {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
576 my($RecordTypesCountRef, $PDBRecordLinesRef) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
577
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
578 # Get master record information...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
579 my($NumOfRemarkRecords, $NumOfHetRecords, $NumOfHelixRecords, $NumOfSheetRecords, $NumOfTurnRecords, $NumOfSiteRecords, $NumOfTransformationsRecords, $NumOfAtomAndHetatmRecords, $NumOfTerRecords, $NumOfConectRecords, $NumOfSeqresRecords) = (undef) x 11;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
580 my($RecordLine, $MasterRecordFound);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
581 $MasterRecordFound = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
582
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
583 LINE: for $RecordLine (@{$PDBRecordLinesRef}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
584 if (IsMasterRecordType($RecordLine)) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
585 ($NumOfRemarkRecords, $NumOfHetRecords, $NumOfHelixRecords, $NumOfSheetRecords, $NumOfTurnRecords, $NumOfSiteRecords, $NumOfTransformationsRecords, $NumOfAtomAndHetatmRecords, $NumOfTerRecords, $NumOfConectRecords, $NumOfSeqresRecords) = ParseMasterRecordLine($RecordLine);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
586 $MasterRecordFound = 1;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
587 last LINE;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
588 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
589 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
590 if (!$MasterRecordFound) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
591 print "\nWarning: MASTER record is missing.\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
592 return;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
593 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
594 my(@MasterRecordValidationInfo);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
595 @MasterRecordValidationInfo = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
596 $NumOfRemarkRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
597 if (exists($RecordTypesCountRef->{Count}{REMARK}) && $NumOfRemarkRecords != $RecordTypesCountRef->{Count}{REMARK}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
598 push @MasterRecordValidationInfo, "Number of REMARK records, $NumOfRemarkRecords, specified in MASTER record doen't match its explict count, $RecordTypesCountRef->{Count}{REMARK}.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
599 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
600 $NumOfHetRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
601 if (exists($RecordTypesCountRef->{Count}{HET}) && $NumOfHetRecords != $RecordTypesCountRef->{Count}{HET}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
602 push @MasterRecordValidationInfo, "Number of HET records, $NumOfHetRecords, specified in MASTER record doen't match its explict count, $RecordTypesCountRef->{Count}{HET}.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
603 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
604 $NumOfHelixRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
605 if (exists($RecordTypesCountRef->{Count}{HELIX}) && $NumOfHelixRecords != $RecordTypesCountRef->{Count}{HELIX}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
606 push @MasterRecordValidationInfo, "Number of HELIX records, $NumOfHelixRecords, specified in MASTER record doen't match its explict count, $RecordTypesCountRef->{Count}{HELIX}.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
607 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
608 $NumOfSheetRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
609 if (exists($RecordTypesCountRef->{Count}{SHEET}) && $NumOfSheetRecords != $RecordTypesCountRef->{Count}{SHEET}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
610 push @MasterRecordValidationInfo, "Number of SHEET records, $NumOfSheetRecords, specified in MASTER record doen't match its explict count, $RecordTypesCountRef->{Count}{SHEET}.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
611 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
612 $NumOfTurnRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
613 if (exists($RecordTypesCountRef->{Count}{TURN}) && $NumOfTurnRecords != $RecordTypesCountRef->{Count}{TURN}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
614 push @MasterRecordValidationInfo, "Number of TURN records, $NumOfTurnRecords, specified in MASTER record doen't match its explict count, $RecordTypesCountRef->{Count}{REMARK}.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
615 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
616 $NumOfSiteRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
617 if (exists($RecordTypesCountRef->{Count}{SITE}) && $NumOfSiteRecords != $RecordTypesCountRef->{Count}{SITE}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
618 push @MasterRecordValidationInfo, "Number of SITE records, $NumOfSiteRecords, specified in MASTER record doen't match its explict count, $RecordTypesCountRef->{Count}{SITE}.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
619 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
620
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
621 $NumOfTransformationsRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
622 my($RecordsCount, $ID, $RecordID, $RecordLabel);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
623 $RecordsCount = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
624 for $RecordLabel ('ORIGX', 'SCALE', 'MTRIX') {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
625 for $ID (1 .. 3) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
626 $RecordID = "${RecordLabel}${ID}";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
627 if (exists $RecordTypesCountRef->{Count}{$RecordID}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
628 $RecordsCount += $RecordTypesCountRef->{Count}{$RecordID};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
629 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
630 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
631 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
632 if ($NumOfTransformationsRecords != $RecordsCount) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
633 push @MasterRecordValidationInfo, "Number of transformation records (ORIGXn+SCALEn+MTRIXn), $NumOfTransformationsRecords, specified in MASTER record doen't match its explict count, $RecordsCount.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
634 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
635
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
636 $RecordsCount = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
637 for $RecordLabel ('ATOM', 'HETATM') {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
638 if (exists $RecordTypesCountRef->{Count}{$RecordLabel}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
639 $RecordsCount += $RecordTypesCountRef->{Count}{$RecordLabel};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
640 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
641 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
642 $NumOfAtomAndHetatmRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
643 if ($NumOfAtomAndHetatmRecords != $RecordsCount) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
644 push @MasterRecordValidationInfo, "Number of ATOM + HETATM records, $NumOfAtomAndHetatmRecords, specified in MASTER record doen't match its explict count, $RecordsCount.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
645 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
646 $NumOfTerRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
647 if (exists($RecordTypesCountRef->{Count}{TER}) && $NumOfTerRecords != $RecordTypesCountRef->{Count}{TER}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
648 push @MasterRecordValidationInfo, "Number of TER records, $NumOfTerRecords, specified in MASTER record doen't match its explict count, $RecordTypesCountRef->{Count}{TER}.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
649 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
650 $NumOfConectRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
651 if (exists($RecordTypesCountRef->{Count}{CONECT}) && $NumOfConectRecords != $RecordTypesCountRef->{Count}{CONECT}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
652 push @MasterRecordValidationInfo, "Number of CONECT records, $NumOfConectRecords, specified in MASTER record doen't match its explict count, $RecordTypesCountRef->{Count}{CONECT}.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
653 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
654 $NumOfSeqresRecords += 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
655 if (exists($RecordTypesCountRef->{Count}{SEQRES}) && $NumOfSeqresRecords != $RecordTypesCountRef->{Count}{SEQRES}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
656 push @MasterRecordValidationInfo, "Number of SITE records, $NumOfSeqresRecords, specified in MASTER record doen't match its explict count, $RecordTypesCountRef->{Count}{SEQRES}.";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
657 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
658
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
659 if (@MasterRecordValidationInfo) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
660 print "\nMASTER record validation: Count mismatches found:\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
661 print JoinWords(\@MasterRecordValidationInfo, "\n", 0), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
662 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
663 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
664 print "\nMASTER record validation: Count values match with the explicit count of the corresponding records.\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
665 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
666 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
667
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
668 # Total size of all the files...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
669 sub ListTotalSizeOfFiles {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
670 my($FileOkayCount, $TotalSize, $Index);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
671
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
672 $FileOkayCount = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
673 $TotalSize = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
674
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
675 for $Index (0 .. $#PDBFilesList) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
676 if ($PDBFilesInfo{FileOkay}[$Index]) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
677 $FileOkayCount++;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
678 $TotalSize += $PDBFilesInfo{FileSize}[$Index];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
679 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
680 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
681 if ($FileOkayCount > 1) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
682 print "\nTotal size of $FileOkayCount files: ", FormatFileSize($TotalSize), "\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
683 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
684
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
685 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
686
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
687 # Empty chain IDs are replaced with "None[1-9]". But for displaying purposes, take out any
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
688 # numbers from label...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
689 sub CleanupChainID {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
690 my($ChainID) = @_;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
691
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
692 if ($ChainID =~ /^None/i) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
693 return 'None';
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
694 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
695 return $ChainID;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
696 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
697
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
698 # Process option values...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
699 sub ProcessOptions {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
700 %OptionsInfo = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
701
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
702 # Setup record types to count...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
703 if ($Options{count}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
704 $OptionsInfo{CountRecordType} = $Options{count};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
705 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
706 else {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
707 $OptionsInfo{CountRecordType} = $Options{all} ? 'All' : 'ATOM,HETATM';
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
708 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
709 @{$OptionsInfo{SpecifiedRecordTypes}} =();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
710 if ($OptionsInfo{CountRecordType} !~ /^All$/i) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
711 my(@RecordTypes);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
712 @RecordTypes = split /\,/, $OptionsInfo{CountRecordType};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
713 push @{$OptionsInfo{SpecifiedRecordTypes}}, @RecordTypes;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
714 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
715 $OptionsInfo{CountChains} = ($Options{chains} || $Options{all}) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
716 $OptionsInfo{CheckMasterRecord} = ($Options{mastercheck} || $Options{all}) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
717
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
718 # Residue count is the default. So $Options{residues} is simply ignored.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
719 my($CountResidues) = 1;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
720 $OptionsInfo{CountResiduesInChains} = (($CountResidues || $Options{all}) && $Options{residuesmode} =~ /^(InChains|Both)$/i) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
721 $OptionsInfo{CountResiduesAll} = (($CountResidues || $Options{all}) && $Options{residuesmode} =~ /^(All|Both)$/i) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
722
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
723 $OptionsInfo{ResiduesFrequencyInChains} = (($Options{frequency} || $Options{all}) && $Options{residuesmode} =~ /^(InChains|Both)$/i) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
724 $OptionsInfo{ResiduesFrequencyAll} = (($Options{frequency} || $Options{all}) && $Options{residuesmode} =~ /^(All|Both)$/i) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
725
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
726 $OptionsInfo{ResidueNumbersInfo} = ($Options{residuenumbers} || $Options{all}) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
727
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
728 $OptionsInfo{CalculateBoundingBox} = ($Options{boundingbox} || $Options{all}) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
729
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
730 $OptionsInfo{ListHeaderInfo} = ($Options{header} || $Options{all}) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
731 $OptionsInfo{DetailLevel} = $Options{detail};
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
732
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
733 $OptionsInfo{ListExperimentalTechniqueInfo} = ($Options{experiment} || $Options{all}) ? 1 : 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
734
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
735 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
736
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
737 # Retrieve information about PDB files...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
738 sub RetrievePDBFilesInfo {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
739 my($Index, $PDBFile, $ModifiedTimeString, $ModifiedDateString);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
740
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
741 %PDBFilesInfo = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
742 @{$PDBFilesInfo{FileOkay}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
743 @{$PDBFilesInfo{FileSize}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
744 @{$PDBFilesInfo{FileLastModified}} = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
745
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
746 FILELIST: for $Index (0 .. $#PDBFilesList) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
747 $PDBFilesInfo{FileOkay}[$Index] = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
748 $PDBFilesInfo{FileSize}[$Index] = 0;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
749 $PDBFilesInfo{FileLastModified}[$Index] = '';
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
750
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
751 $PDBFile = $PDBFilesList[$Index];
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
752 if (!(-e $PDBFile)) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
753 warn "Warning: Ignoring file $PDBFile: It doesn't exist\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
754 next FILELIST;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
755 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
756 if (!CheckFileType($PDBFile, "pdb")) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
757 warn "Warning: Ignoring file $PDBFile: It's not a PDB file\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
758 next FILELIST;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
759 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
760 if (! open PDBFILE, "$PDBFile") {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
761 warn "Warning: Ignoring file $PDBFile: Couldn't open it: $! \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
762 next FILELIST;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
763 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
764 close PDBFILE;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
765
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
766 $PDBFilesInfo{FileOkay}[$Index] = 1;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
767 $PDBFilesInfo{FileSize}[$Index] = FileSize($PDBFile);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
768 ($ModifiedTimeString, $ModifiedDateString) = FormattedFileModificationTimeAndDate($PDBFile);
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
769 $PDBFilesInfo{FileLastModified}[$Index] = "$ModifiedTimeString; $ModifiedDateString";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
770 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
771 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
772
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
773
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
774 # Setup script usage and retrieve command line arguments specified using various options...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
775 sub SetupScriptUsage {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
776
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
777 # Retrieve all the options...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
778 %Options = ();
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
779 $Options{count} = '';
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
780 $Options{detail} = 1;
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
781 $Options{residuesmode} = 'Both';
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
782
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
783 if (!GetOptions(\%Options, "all|a", "boundingbox|b", "count|c=s", "chains", "detail|d=i", "experiment|e", "frequency|f", "mastercheck|m", "header", "help|h", "residues", "residuesmode=s", "residuenumbers", "workingdir|w=s")) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
784 die "\nTo get a list of valid options and their values, use \"$ScriptName -h\" or\n\"perl -S $ScriptName -h\" command and try again...\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
785 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
786 if ($Options{workingdir}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
787 if (! -d $Options{workingdir}) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
788 die "Error: The value specified, $Options{workingdir}, for option \"-w --workingdir\" is not a directory name.\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
789 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
790 chdir $Options{workingdir} or die "Error: Couldn't chdir $Options{workingdir}: $! \n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
791 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
792 if (!IsPositiveInteger($Options{detail})) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
793 die "Error: The value specified, $Options{detail}, for option \"-d --detail\" is not valid. Allowed values: > 0\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
794 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
795 if ($Options{residuesmode} !~ /^(InChains|All|Both)$/i) {
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
796 die "Error: The value specified, $Options{residuesmode}, for option \"--ResiduesMode\" is not valid. Allowed values: InChains, All, or Both\n";
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
797 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
798 }
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
799
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
800 __END__
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
801
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
802 =head1 NAME
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
803
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
804 InfoPDBFiles.pl - List information about PDB files
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
805
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
806 =head1 SYNOPSIS
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
807
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
808 InfoPDBFiles.pl PDBFile(s) PDB(s)...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
809
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
810 InfoPDBFiles.pl [B<-a, --all>] [B<-b, --BoundingBox>]
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
811 [B<-c, --count> "RecordType, [RecordType,...]" | All] [B<--chains>]
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
812 [B<-d, --detail> infolevel] [B<-e, --experiment>] [B<-f, --frequency>]
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
813 [B<-h, --help>] [B<--header>] [B<m, --MasterCheck>] [B<--residues>]
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
814 [B<--ResiduesMode> InChains | All | Both] [B<--ResidueNumbers>]
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
815 [B<-w, --WorkingDir> dirname] PDBFile(s)...
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
816
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
817 =head1 DESCRIPTION
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
818
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
819 List information about contents of I<PDBFile(s)>: number of each record type, number of chains,
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
820 count and percent distribution of residues in each chain, bounding box and so on.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
821 Multiple PDBFile names are separated by spaces. The valid file extension is I<.pdb>.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
822 All other file name extensions are ignored during the wild card expansion. All the PDB files
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
823 in a current directory can be specified either by I<*.pdb> or the current directory name.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
824
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
825 In PDB files containing data for multiple models, all ATOM/HETAM records for chains after the first model
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
826 are ignored.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
827
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
828 =head1 OPTIONS
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
829
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
830 =over 4
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
831
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
832 =item B<-a, --all>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
833
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
834 List all the available information.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
835
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
836 =item B<-b, --BoundingBox>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
837
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
838 List min/max XYZ coordiates of ATOM/HETATM records.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
839
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
840 =item B<-c, --count> I<RecordType,[RecordType,...]|All>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
841
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
842 Types of PDB records to count in I<PDBFile(s)>. You can specify a list of any valid PDB
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
843 record type or count all record types found in the files. Possible values: Comma delimited list
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
844 of valid I<RecordTypes> or I<All>. Default: I<ATOM,HETATM>. And this is also B<default behavior>.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
845
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
846 The list of valid PDB record types includes: I<HEADER, OBSLTE, TITLE, CAVEAT, COMPND, SOURCE, KEYWDS,
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
847 EXPDTA, AUTHOR, REVDAT, SPRSDE, JRN, REMARK, DBRE, SEQADV, SEQRES, MODRES, HET, HETNAM, HETSYN,
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
848 FORMUL, HELIX, SHEET, TURN, SSBOND, LINK, HYDBND, SLTBRG, CISPEP, SITE, CRYST1, ORIGX1, ORIGX2, ORIGX3,
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
849 SCALE1, SCALE2, SCALE3, MTRIX1 MTRIX2 MTRIX3, TVECT, MODEL, ATOM, SIGATM, ANISOU, SIGUIJ, TER,
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
850 HETATM, ENDMDL, CONECT, MASTER, END>.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
851
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
852 =item B<--chains>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
853
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
854 Count number of chains.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
855
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
856 =item B<-d, --detail> I<infolevel>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
857
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
858 Level of information to print about PDB during various options. Default: I<1>.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
859 Possible values: I<1, 2 or 3>.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
860
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
861 =item B<-e, --experiment>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
862
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
863 List experimental technique information along with any applicable resolution.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
864
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
865 =item B<-f, --frequency>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
866
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
867 List distribution of residues: report count and percent of residues in individual chains and
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
868 across all the chains, or for all the residues in the file. The value of option B<--residuesmode>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
869 determines how residues are counted and what is listed. The list is sorted by frequency in
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
870 descending order. By default, only residue count values are reported. To list percent distribution
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
871 of residues, specify B<-d, --detail> value of I<2> or higher.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
872
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
873 =item B<-h, --help>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
874
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
875 Print this help message.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
876
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
877 =item B<--header>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
878
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
879 List header information.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
880
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
881 =item B<m, --MasterCheck>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
882
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
883 Check master record by explicitly counting the number of REMARK, HET, HELIX, SHEET, TURN, SITE,
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
884 ORIGX, SCALE, MTRIX, ATOM, HETATM, TER, CONECT and SEQRES records and comparing their
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
885 values against contents of master record.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
886
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
887 =item B<--residues>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
888
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
889 Count residues in I<PDBFile(s)>. This is also B<default behavior>.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
890
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
891 By default, only residue count values are reported. To list percent distribution of residues,
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
892 specify B<-d, --detail> value of I<2> or higher.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
893
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
894 =item B<--ResiduesMode> <InChains | All | Both>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
895
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
896 Specify how to count residues in I<PDBFile(s)>: Count residue in each chain and across all the chains,
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
897 list count iof all the residues in the file, or list both. Possible values: I<InChains, All, or Both>.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
898 Default: I<Both>.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
899
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
900 =item B<--ResidueNumbers>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
901
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
902 List information about ATOM residue numbers in each chain before TER record: start and end residue
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
903 number; gaps in residue numbers corresponding to non-sequential residue numbers; residue
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
904 numbers not in ascending order.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
905
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
906 =item B<-w, --WorkingDir> I<dirname>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
907
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
908 Location of working directory. Default: current directory.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
909
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
910 =back
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
911
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
912 =head1 EXAMPLES
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
913
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
914 To list total number of records and number of chain(s) residues in PDB files, type:
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
915
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
916 % InfoPDBFiles.pl Sample1.pdb
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
917 % InfoPDBFiles.pl Sample2.pdb
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
918
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
919 To list all available information for PDB file Sample2.pdb, type:
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
920
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
921 % InfoPDBFiles.pl -a Sample2.pdb
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
922
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
923 To list all available information for PDB file Sample2.pdb with all available details, type:
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
924
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
925 % InfoPDBFiles.pl -a -d Sample2.pdb
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
926
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
927 To count ATOM and HETATM records in Sample2.pdb file, type:
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
928
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
929 % InfoPDBFiles.pl -c "ATOM,HETATM" Sample2.pdb
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
930
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
931 To list distribution of residues in chains across the whole PDB file Sample2.pdb along with
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
932 percent distribution, type
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
933
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
934 % InfoPDBFiles.pl --frequency -d 2 Sample2.pdb
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
935
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
936 To list distribution of residues only across chains in PDB file Sample2.pdb along with
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
937 percent distribution, type
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
938
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
939 % InfoPDBFiles.pl --frequency -d 2 --ResiduesMode InChains Sample2.pdb
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
940
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
941 To list min/max coordinates of the bounding box which encompasses the structure in Sample1.pdb
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
942 file, type:
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
943
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
944 % InfoPDBFiles.pl -b Sample1.pdb
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
945
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
946 =head1 AUTHOR
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
947
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
948 Manish Sud <msud@san.rr.com>
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
949
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
950 =head1 SEE ALSO
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
951
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
952 ExtractFromPDBFiles.pl, InfoAminoAcids.pl, InfoNucleicAcids.pl, InfoSequenceFiles.pl, ModifyPDBFiles.pl
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
953
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
954 =head1 COPYRIGHT
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
955
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
956 Copyright (C) 2015 Manish Sud. All rights reserved.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
957
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
958 This file is part of MayaChemTools.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
959
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
960 MayaChemTools is free software; you can redistribute it and/or modify it under
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
961 the terms of the GNU Lesser General Public License as published by the Free
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
962 Software Foundation; either version 3 of the License, or (at your option)
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
963 any later version.
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
964
2abf0d43254d Uploaded
deepakjadmin
parents:
diff changeset
965 =cut